Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
abbb0a93
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,发现更多精彩内容 >>
提交
abbb0a93
编写于
3月 09, 2015
作者:
S
Stephan Ewen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-1668] [core] Add a config option to specify delays between restarts
上级
500ddff4
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
27 addition
and
7 deletion
+27
-7
flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java
.../java/org/apache/flink/configuration/ConfigConstants.java
+7
-1
flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
...cala/org/apache/flink/runtime/jobmanager/JobManager.scala
+15
-3
flink-runtime/src/test/scala/org/apache/flink/runtime/jobmanager/RecoveryITCase.scala
.../org/apache/flink/runtime/jobmanager/RecoveryITCase.scala
+1
-0
flink-tests/src/test/java/org/apache/flink/test/misc/AutoParallelismITCase.java
...ava/org/apache/flink/test/misc/AutoParallelismITCase.java
+0
-2
flink-tests/src/test/java/org/apache/flink/test/recovery/ProcessFailureBatchRecoveryITCase.java
...link/test/recovery/ProcessFailureBatchRecoveryITCase.java
+1
-0
flink-tests/src/test/java/org/apache/flink/test/recovery/SimpleRecoveryITCase.java
.../org/apache/flink/test/recovery/SimpleRecoveryITCase.java
+1
-1
flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/jobmanager/JobManagerFailsITCase.scala
.../api/scala/runtime/jobmanager/JobManagerFailsITCase.scala
+1
-0
flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/taskmanager/TaskManagerFailsITCase.scala
...pi/scala/runtime/taskmanager/TaskManagerFailsITCase.scala
+1
-0
未找到文件。
flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java
浏览文件 @
abbb0a93
...
...
@@ -40,6 +40,12 @@ public final class ConfigConstants {
* value to 0 effectively disables fault tolerance.
*/
public
static
final
String
DEFAULT_EXECUTION_RETRIES_KEY
=
"execution-retries.default"
;
/**
* Config parameter for the delay between execution retries. The value must be specified in the
* notation "10 s" or "1 min" (style of Scala Finite Durations)
*/
public
static
final
String
DEFAULT_EXECUTION_RETRY_DELAY_KEY
=
"execution-retries.delay"
;
// -------------------------------- Runtime -------------------------------
...
...
@@ -339,7 +345,7 @@ public final class ConfigConstants {
public
static
final
String
AKKA_ASK_TIMEOUT
=
"akka.ask.timeout"
;
/**
* Timeout for all blocking calls
* Timeout for all blocking calls
that look up remote actors
*/
public
static
final
String
AKKA_LOOKUP_TIMEOUT
=
"akka.lookup.timeout"
;
...
...
flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
浏览文件 @
abbb0a93
...
...
@@ -850,9 +850,21 @@ object JobManager {
ConfigConstants
.
DEFAULT_EXECUTION_RETRIES_KEY
,
ConfigConstants
.
DEFAULT_EXECUTION_RETRIES
)
val
delayBetweenRetries
=
2
*
Duration
(
configuration
.
getString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_PAUSE
,
ConfigConstants
.
DEFAULT_AKKA_ASK_TIMEOUT
)).
toMillis
// configure the delay between execution retries.
// unless explicitly specifies, this is dependent on the heartbeat timeout
val
pauseString
=
configuration
.
getString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_PAUSE
,
ConfigConstants
.
DEFAULT_AKKA_ASK_TIMEOUT
)
val
delayString
=
configuration
.
getString
(
ConfigConstants
.
DEFAULT_EXECUTION_RETRY_DELAY_KEY
,
pauseString
)
val
delayBetweenRetries
:
Long
=
try
{
Duration
(
delayString
).
toMillis
}
catch
{
case
n
:
NumberFormatException
=>
throw
new
Exception
(
s
"Invalid config value for ${ConfigConstants.DEFAULT_EXECUTION_RETRY_DELAY_KEY}: "
+
s
"${pauseString}. Value must be a valid duration (such as 100 milli or 1 min)"
);
}
val
archiveProps
:
Props
=
Props
(
classOf
[
MemoryArchivist
],
archiveCount
)
...
...
flink-runtime/src/test/scala/org/apache/flink/runtime/jobmanager/RecoveryITCase.scala
浏览文件 @
abbb0a93
...
...
@@ -49,6 +49,7 @@ WordSpecLike with Matchers with BeforeAndAfterAll {
config
.
setInteger
(
ConfigConstants
.
TASK_MANAGER_NUM_TASK_SLOTS
,
numSlots
)
config
.
setInteger
(
ConfigConstants
.
LOCAL_INSTANCE_MANAGER_NUMBER_TASK_MANAGER
,
numTaskManagers
)
config
.
setString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_PAUSE
,
heartbeatTimeout
)
config
.
setString
(
ConfigConstants
.
DEFAULT_EXECUTION_RETRY_DELAY_KEY
,
heartbeatTimeout
)
new
TestingCluster
(
config
)
}
...
...
flink-tests/src/test/java/org/apache/flink/test/misc/AutoParallelismITCase.java
浏览文件 @
abbb0a93
...
...
@@ -56,8 +56,6 @@ public class AutoParallelismITCase {
Configuration
config
=
new
Configuration
();
config
.
setInteger
(
ConfigConstants
.
LOCAL_INSTANCE_MANAGER_NUMBER_TASK_MANAGER
,
NUM_TM
);
config
.
setInteger
(
ConfigConstants
.
TASK_MANAGER_NUM_TASK_SLOTS
,
SLOTS_PER_TM
);
config
.
setString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_PAUSE
,
"2 s"
);
cluster
=
new
ForkableFlinkMiniCluster
(
config
,
false
);
}
...
...
flink-tests/src/test/java/org/apache/flink/test/recovery/ProcessFailureBatchRecoveryITCase.java
浏览文件 @
abbb0a93
...
...
@@ -125,6 +125,7 @@ public class ProcessFailureBatchRecoveryITCase {
jmConfig
.
setString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_INTERVAL
,
"500 ms"
);
jmConfig
.
setString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_PAUSE
,
"2 s"
);
jmConfig
.
setInteger
(
ConfigConstants
.
AKKA_WATCH_THRESHOLD
,
2
);
jmConfig
.
setString
(
ConfigConstants
.
DEFAULT_EXECUTION_RETRY_DELAY_KEY
,
"4 s"
);
jmActorSystem
=
AkkaUtils
.
createActorSystem
(
jmConfig
,
new
Some
<
Tuple2
<
String
,
Object
>>(
localAddress
));
ActorRef
jmActor
=
JobManager
.
startJobManagerActors
(
jmConfig
,
jmActorSystem
).
_1
();
...
...
flink-tests/src/test/java/org/apache/flink/test/recovery/SimpleRecoveryITCase.java
浏览文件 @
abbb0a93
...
...
@@ -51,7 +51,7 @@ public class SimpleRecoveryITCase {
Configuration
config
=
new
Configuration
();
config
.
setInteger
(
ConfigConstants
.
LOCAL_INSTANCE_MANAGER_NUMBER_TASK_MANAGER
,
2
);
config
.
setInteger
(
ConfigConstants
.
TASK_MANAGER_NUM_TASK_SLOTS
,
2
);
config
.
setString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_PAUSE
,
"2
s"
);
config
.
setString
(
ConfigConstants
.
DEFAULT_EXECUTION_RETRY_DELAY_KEY
,
"100 m
s"
);
cluster
=
new
ForkableFlinkMiniCluster
(
config
,
false
);
}
...
...
flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/jobmanager/JobManagerFailsITCase.scala
浏览文件 @
abbb0a93
...
...
@@ -137,6 +137,7 @@ with WordSpecLike with Matchers with BeforeAndAfterAll {
config
.
setInteger
(
ConfigConstants
.
LOCAL_INSTANCE_MANAGER_NUMBER_TASK_MANAGER
,
numTaskmanagers
)
config
.
setString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_INTERVAL
,
"1000 ms"
)
config
.
setString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_PAUSE
,
"4000 ms"
)
config
.
setString
(
ConfigConstants
.
DEFAULT_EXECUTION_RETRY_DELAY_KEY
,
"8000 ms"
)
config
.
setDouble
(
ConfigConstants
.
AKKA_WATCH_THRESHOLD
,
5
)
new
ForkableFlinkMiniCluster
(
config
,
singleActorSystem
=
false
)
...
...
flink-tests/src/test/scala/org/apache/flink/api/scala/runtime/taskmanager/TaskManagerFailsITCase.scala
浏览文件 @
abbb0a93
...
...
@@ -232,6 +232,7 @@ with WordSpecLike with Matchers with BeforeAndAfterAll {
config
.
setInteger
(
ConfigConstants
.
LOCAL_INSTANCE_MANAGER_NUMBER_TASK_MANAGER
,
numTaskmanagers
)
config
.
setString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_INTERVAL
,
"1000 ms"
)
config
.
setString
(
ConfigConstants
.
AKKA_WATCH_HEARTBEAT_PAUSE
,
"4000 ms"
)
config
.
setString
(
ConfigConstants
.
DEFAULT_EXECUTION_RETRY_DELAY_KEY
,
"4000 ms"
)
config
.
setDouble
(
ConfigConstants
.
AKKA_WATCH_THRESHOLD
,
5
)
new
ForkableFlinkMiniCluster
(
config
,
singleActorSystem
=
false
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录