Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
c8f81ba3
F
flink
项目概览
doujutun3207
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
24
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flink
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c8f81ba3
编写于
3月 01, 2016
作者:
U
Ufuk Celebi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-3556] [runtime] Remove false check in HA blob store configuration
This closes #1749.
上级
e8e88afd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
18 deletion
+12
-18
flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServer.java
...c/main/java/org/apache/flink/runtime/blob/BlobServer.java
+5
-9
flink-runtime/src/main/java/org/apache/flink/runtime/blob/FileSystemBlobStore.java
...va/org/apache/flink/runtime/blob/FileSystemBlobStore.java
+7
-8
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
...in/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
+0
-1
未找到文件。
flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServer.java
浏览文件 @
c8f81ba3
...
...
@@ -22,6 +22,7 @@ import org.apache.commons.io.FileUtils;
import
org.apache.flink.api.common.JobID
;
import
org.apache.flink.configuration.ConfigConstants
;
import
org.apache.flink.configuration.Configuration
;
import
org.apache.flink.configuration.IllegalConfigurationException
;
import
org.apache.flink.runtime.jobmanager.RecoveryMode
;
import
org.apache.flink.util.NetUtils
;
import
org.slf4j.Logger
;
...
...
@@ -99,16 +100,11 @@ public class BlobServer extends Thread implements BlobService {
if
(
recoveryMode
==
RecoveryMode
.
STANDALONE
)
{
this
.
blobStore
=
new
VoidBlobStore
();
}
// Recovery. Check that everything has been setup correctly. This is not clean, but it's
// better to resolve this with some upcoming changes to the state backend setup.
else
if
(
config
.
containsKey
(
ConfigConstants
.
STATE_BACKEND
)
&&
config
.
containsKey
(
ConfigConstants
.
ZOOKEEPER_RECOVERY_PATH
))
{
// Recovery.
else
if
(
recoveryMode
==
RecoveryMode
.
ZOOKEEPER
)
{
this
.
blobStore
=
new
FileSystemBlobStore
(
config
);
}
// Fallback.
else
{
this
.
blobStore
=
new
VoidBlobStore
();
}
else
{
throw
new
IllegalConfigurationException
(
"Unexpected recovery mode '"
+
recoveryMode
+
"."
);
}
// configure the maximum number of concurrent connections
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/blob/FileSystemBlobStore.java
浏览文件 @
c8f81ba3
...
...
@@ -40,6 +40,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
/**
* Blob store backed by {@link FileSystem}.
*
* <p>This is used in addition to the local blob storage
*/
class
FileSystemBlobStore
implements
BlobStore
{
...
...
@@ -49,18 +51,15 @@ class FileSystemBlobStore implements BlobStore {
private
final
String
basePath
;
FileSystemBlobStore
(
Configuration
config
)
throws
IOException
{
String
stateBackendBasePath
=
config
.
getString
(
ConfigConstants
.
ZOOKEEPER_RECOVERY_PATH
,
""
);
String
recoveryPath
=
config
.
getString
(
ConfigConstants
.
ZOOKEEPER_RECOVERY_PATH
,
null
);
if
(
stateBackendBasePath
.
equals
(
""
)
)
{
if
(
recoveryPath
==
null
)
{
throw
new
IllegalConfigurationException
(
String
.
format
(
"Missing configuration for "
+
"file system state backend recovery path. Please specify via "
+
"'%s' key."
,
ConfigConstants
.
ZOOKEEPER_RECOVERY_PATH
));
"file system state backend recovery path. Please specify via "
+
"'%s' key."
,
ConfigConstants
.
ZOOKEEPER_RECOVERY_PATH
));
}
stateBackendBasePath
+=
"/blob"
;
this
.
basePath
=
stateBackendBasePath
;
this
.
basePath
=
recoveryPath
+
"/blob"
;
FileSystem
.
get
(
new
Path
(
basePath
).
toUri
()).
mkdirs
(
new
Path
(
basePath
));
LOG
.
info
(
"Created blob directory {}."
,
basePath
);
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
浏览文件 @
c8f81ba3
...
...
@@ -225,7 +225,6 @@ public class ZooKeeperUtils {
ConfigConstants
.
ZOOKEEPER_CHECKPOINTS_PATH
,
ConfigConstants
.
DEFAULT_ZOOKEEPER_CHECKPOINTS_PATH
);
StateStorageHelper
<
CompletedCheckpoint
>
stateStorage
=
createFileSystemStateStorage
(
configuration
,
"completedCheckpoint"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录