Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
f2b804a7
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,发现更多精彩内容 >>
提交
f2b804a7
编写于
11月 23, 2017
作者:
Y
yew1eb
提交者:
Greg Hogan
11月 27, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-8142] [config] Cleanup references to deprecated constants in ConfigConstants
This closes #5067
上级
45c86407
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
11 addition
and
9 deletion
+11
-9
flink-connectors/flink-connector-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/manualtests/ManualExactlyOnceTest.java
...connectors/kinesis/manualtests/ManualExactlyOnceTest.java
+2
-1
flink-connectors/flink-connector-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/manualtests/ManualExactlyOnceWithStreamReshardingTest.java
...anualtests/ManualExactlyOnceWithStreamReshardingTest.java
+2
-1
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/RestartStrategyFactory.java
...untime/executiongraph/restart/RestartStrategyFactory.java
+3
-3
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskManagerStartupTest.java
...che/flink/runtime/taskmanager/TaskManagerStartupTest.java
+1
-1
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
.../org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
+2
-2
flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
...n/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
+1
-1
未找到文件。
flink-connectors/flink-connector-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/manualtests/ManualExactlyOnceTest.java
浏览文件 @
f2b804a7
...
@@ -20,6 +20,7 @@ package org.apache.flink.streaming.connectors.kinesis.manualtests;
...
@@ -20,6 +20,7 @@ package org.apache.flink.streaming.connectors.kinesis.manualtests;
import
org.apache.flink.api.java.utils.ParameterTool
;
import
org.apache.flink.api.java.utils.ParameterTool
;
import
org.apache.flink.configuration.ConfigConstants
;
import
org.apache.flink.configuration.ConfigConstants
;
import
org.apache.flink.configuration.Configuration
;
import
org.apache.flink.configuration.Configuration
;
import
org.apache.flink.configuration.TaskManagerOptions
;
import
org.apache.flink.runtime.minicluster.LocalFlinkMiniCluster
;
import
org.apache.flink.runtime.minicluster.LocalFlinkMiniCluster
;
import
org.apache.flink.streaming.connectors.kinesis.config.AWSConfigConstants
;
import
org.apache.flink.streaming.connectors.kinesis.config.AWSConfigConstants
;
import
org.apache.flink.streaming.connectors.kinesis.testutils.ExactlyOnceValidatingConsumerThread
;
import
org.apache.flink.streaming.connectors.kinesis.testutils.ExactlyOnceValidatingConsumerThread
;
...
@@ -79,7 +80,7 @@ public class ManualExactlyOnceTest {
...
@@ -79,7 +80,7 @@ public class ManualExactlyOnceTest {
final
Configuration
flinkConfig
=
new
Configuration
();
final
Configuration
flinkConfig
=
new
Configuration
();
flinkConfig
.
setInteger
(
ConfigConstants
.
LOCAL_NUMBER_TASK_MANAGER
,
1
);
flinkConfig
.
setInteger
(
ConfigConstants
.
LOCAL_NUMBER_TASK_MANAGER
,
1
);
flinkConfig
.
setInteger
(
ConfigConstants
.
TASK_MANAGER_NUM_TASK_SLOTS
,
8
);
flinkConfig
.
setInteger
(
ConfigConstants
.
TASK_MANAGER_NUM_TASK_SLOTS
,
8
);
flinkConfig
.
set
Integer
(
ConfigConstants
.
TASK_MANAGER_MEMORY_SIZE_KEY
,
16
);
flinkConfig
.
set
Long
(
TaskManagerOptions
.
MANAGED_MEMORY_SIZE
,
16
);
flinkConfig
.
setString
(
ConfigConstants
.
RESTART_STRATEGY_FIXED_DELAY_DELAY
,
"0 s"
);
flinkConfig
.
setString
(
ConfigConstants
.
RESTART_STRATEGY_FIXED_DELAY_DELAY
,
"0 s"
);
LocalFlinkMiniCluster
flink
=
new
LocalFlinkMiniCluster
(
flinkConfig
,
false
);
LocalFlinkMiniCluster
flink
=
new
LocalFlinkMiniCluster
(
flinkConfig
,
false
);
...
...
flink-connectors/flink-connector-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/manualtests/ManualExactlyOnceWithStreamReshardingTest.java
浏览文件 @
f2b804a7
...
@@ -20,6 +20,7 @@ package org.apache.flink.streaming.connectors.kinesis.manualtests;
...
@@ -20,6 +20,7 @@ package org.apache.flink.streaming.connectors.kinesis.manualtests;
import
org.apache.flink.api.java.utils.ParameterTool
;
import
org.apache.flink.api.java.utils.ParameterTool
;
import
org.apache.flink.configuration.ConfigConstants
;
import
org.apache.flink.configuration.ConfigConstants
;
import
org.apache.flink.configuration.Configuration
;
import
org.apache.flink.configuration.Configuration
;
import
org.apache.flink.configuration.TaskManagerOptions
;
import
org.apache.flink.runtime.minicluster.LocalFlinkMiniCluster
;
import
org.apache.flink.runtime.minicluster.LocalFlinkMiniCluster
;
import
org.apache.flink.streaming.connectors.kinesis.config.ConsumerConfigConstants
;
import
org.apache.flink.streaming.connectors.kinesis.config.ConsumerConfigConstants
;
import
org.apache.flink.streaming.connectors.kinesis.testutils.ExactlyOnceValidatingConsumerThread
;
import
org.apache.flink.streaming.connectors.kinesis.testutils.ExactlyOnceValidatingConsumerThread
;
...
@@ -90,7 +91,7 @@ public class ManualExactlyOnceWithStreamReshardingTest {
...
@@ -90,7 +91,7 @@ public class ManualExactlyOnceWithStreamReshardingTest {
final
Configuration
flinkConfig
=
new
Configuration
();
final
Configuration
flinkConfig
=
new
Configuration
();
flinkConfig
.
setInteger
(
ConfigConstants
.
LOCAL_NUMBER_TASK_MANAGER
,
1
);
flinkConfig
.
setInteger
(
ConfigConstants
.
LOCAL_NUMBER_TASK_MANAGER
,
1
);
flinkConfig
.
setInteger
(
ConfigConstants
.
TASK_MANAGER_NUM_TASK_SLOTS
,
8
);
flinkConfig
.
setInteger
(
ConfigConstants
.
TASK_MANAGER_NUM_TASK_SLOTS
,
8
);
flinkConfig
.
set
Integer
(
ConfigConstants
.
TASK_MANAGER_MEMORY_SIZE_KEY
,
16
);
flinkConfig
.
set
Long
(
TaskManagerOptions
.
MANAGED_MEMORY_SIZE
,
16
);
flinkConfig
.
setString
(
ConfigConstants
.
RESTART_STRATEGY_FIXED_DELAY_DELAY
,
"0 s"
);
flinkConfig
.
setString
(
ConfigConstants
.
RESTART_STRATEGY_FIXED_DELAY_DELAY
,
"0 s"
);
LocalFlinkMiniCluster
flink
=
new
LocalFlinkMiniCluster
(
flinkConfig
,
false
);
LocalFlinkMiniCluster
flink
=
new
LocalFlinkMiniCluster
(
flinkConfig
,
false
);
...
...
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/RestartStrategyFactory.java
浏览文件 @
f2b804a7
...
@@ -87,10 +87,10 @@ public abstract class RestartStrategyFactory implements Serializable {
...
@@ -87,10 +87,10 @@ public abstract class RestartStrategyFactory implements Serializable {
switch
(
restartStrategyName
.
toLowerCase
())
{
switch
(
restartStrategyName
.
toLowerCase
())
{
case
"none"
:
case
"none"
:
// support deprecated ConfigConstants values
// support deprecated ConfigConstants values
final
int
numberExecutionRetries
=
configuration
.
getInteger
(
ConfigConstants
.
EXECUTION_RETRIES_KEY
,
final
int
numberExecutionRetries
=
configuration
.
getInteger
(
ConfigConstants
.
RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS
,
ConfigConstants
.
DEFAULT_EXECUTION_RETRIES
);
ConfigConstants
.
DEFAULT_EXECUTION_RETRIES
);
String
pauseString
=
configuration
.
getString
(
AkkaOptions
.
WATCH_HEARTBEAT_PAUSE
);
String
pauseString
=
configuration
.
getString
(
AkkaOptions
.
WATCH_HEARTBEAT_PAUSE
);
String
delayString
=
configuration
.
getString
(
ConfigConstants
.
EXECUTION_RETRY_DELAY_KE
Y
,
String
delayString
=
configuration
.
getString
(
ConfigConstants
.
RESTART_STRATEGY_FIXED_DELAY_DELA
Y
,
pauseString
);
pauseString
);
long
delay
;
long
delay
;
...
@@ -104,7 +104,7 @@ public abstract class RestartStrategyFactory implements Serializable {
...
@@ -104,7 +104,7 @@ public abstract class RestartStrategyFactory implements Serializable {
". Value must be a valid duration (such as '10 s' or '1 min')"
);
". Value must be a valid duration (such as '10 s' or '1 min')"
);
}
else
{
}
else
{
throw
new
Exception
(
"Invalid config value for "
+
throw
new
Exception
(
"Invalid config value for "
+
ConfigConstants
.
EXECUTION_RETRY_DELAY_KE
Y
+
": "
+
delayString
+
ConfigConstants
.
RESTART_STRATEGY_FIXED_DELAY_DELA
Y
+
": "
+
delayString
+
". Value must be a valid duration (such as '100 milli' or '10 s')"
);
". Value must be a valid duration (such as '100 milli' or '10 s')"
);
}
}
}
}
...
...
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskManagerStartupTest.java
浏览文件 @
f2b804a7
...
@@ -187,7 +187,7 @@ public class TaskManagerStartupTest extends TestLogger {
...
@@ -187,7 +187,7 @@ public class TaskManagerStartupTest extends TestLogger {
Configuration
cfg
=
new
Configuration
();
Configuration
cfg
=
new
Configuration
();
cfg
.
setString
(
JobManagerOptions
.
ADDRESS
,
"localhost"
);
cfg
.
setString
(
JobManagerOptions
.
ADDRESS
,
"localhost"
);
cfg
.
setInteger
(
JobManagerOptions
.
PORT
,
21656
);
cfg
.
setInteger
(
JobManagerOptions
.
PORT
,
21656
);
cfg
.
set
String
(
ConfigConstants
.
TASK_MANAGER_MEMORY_PRE_ALLOCATE_KEY
,
"true"
);
cfg
.
set
Boolean
(
TaskManagerOptions
.
MANAGED_MEMORY_PRE_ALLOCATE
,
true
);
// something invalid
// something invalid
cfg
.
setLong
(
TaskManagerOptions
.
MANAGED_MEMORY_SIZE
,
-
42L
);
cfg
.
setLong
(
TaskManagerOptions
.
MANAGED_MEMORY_SIZE
,
-
42L
);
...
...
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
浏览文件 @
f2b804a7
...
@@ -466,8 +466,8 @@ public abstract class AbstractYarnClusterDescriptor implements ClusterDescriptor
...
@@ -466,8 +466,8 @@ public abstract class AbstractYarnClusterDescriptor implements ClusterDescriptor
int
port
=
report
.
getRpcPort
();
int
port
=
report
.
getRpcPort
();
// Correctly initialize the Flink config
// Correctly initialize the Flink config
flinkConfiguration
.
setString
(
ConfigConstants
.
JOB_MANAGER_IPC_ADDRESS_KEY
,
host
);
flinkConfiguration
.
setString
(
JobManagerOptions
.
ADDRESS
,
host
);
flinkConfiguration
.
setInteger
(
ConfigConstants
.
JOB_MANAGER_IPC_PORT_KEY
,
port
);
flinkConfiguration
.
setInteger
(
JobManagerOptions
.
PORT
,
port
);
// the Flink cluster is deployed in YARN. Represent cluster
// the Flink cluster is deployed in YARN. Represent cluster
return
createYarnClusterClient
(
return
createYarnClusterClient
(
...
...
flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
浏览文件 @
f2b804a7
...
@@ -118,7 +118,7 @@ public class FlinkYarnSessionCli implements CustomCommandLine<YarnClusterClient>
...
@@ -118,7 +118,7 @@ public class FlinkYarnSessionCli implements CustomCommandLine<YarnClusterClient>
/**
/**
* @deprecated Streaming mode has been deprecated without replacement. Set the
* @deprecated Streaming mode has been deprecated without replacement. Set the
* {@link
ConfigConstants#TASK_MANAGER_MEMORY_PRE_ALLOCATE_KEY
} configuration
* {@link
TaskManagerOptions#MANAGED_MEMORY_PRE_ALLOCATE
} configuration
* key to true to get the previous batch mode behaviour.
* key to true to get the previous batch mode behaviour.
*/
*/
@Deprecated
@Deprecated
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录