HuangZhenQiu commented on a change in pull request #8303: [FLINK-12343]
[flink-yarn] add file replication config for yarn configuration
URL: https://github.com/apache/flink/pull/8303#discussion_r316978992
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
##########
@@ -747,6 +747,17 @@ public ApplicationReport startAppMaster(
// ship list that enables reuse of resources for task manager
containers
StringBuilder envShipFileList = new StringBuilder();
+ int fileReplication =
yarnConfiguration.getInt(DFSConfigKeys.DFS_REPLICATION_KEY,
DFSConfigKeys.DFS_REPLICATION_DEFAULT);
+ if
(flinkConfiguration.contains(YarnConfigOptions.FILE_REPLICATION)) {
+ try {
+ final String replication =
flinkConfiguration.getString(YarnConfigOptions.FILE_REPLICATION);
+ fileReplication = Integer.parseInt(replication);
+ } catch (NumberFormatException e) {
+ throw new RuntimeException(
+ "The yarn configuration
yarn.file-replication has to be a positive integer", e);
+ }
+ }
Review comment:
As S3, hdfs are both possible storage layer for resources, there is no
replication concept for s3. If I use integer config, I need to set a default
value for it. As hdfs usually use 3 replica for its files, but the value is not
meaningful for S3. Thus, I feel it is better to use String. How do you think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services