wangyang0918 commented on a change in pull request #9711: [FLINK-14033] upload
user artifacts for yarn job cluster
URL: https://github.com/apache/flink/pull/9711#discussion_r328029351
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
##########
@@ -738,6 +738,25 @@ public ApplicationReport startAppMaster(
// add user code jars from the provided JobGraph
: jobGraph.getUserJars().stream().map(f ->
f.toUri()).map(File::new).collect(Collectors.toSet());
+ // only for per job mode
+ if (jobGraph != null) {
+ final Collection<Tuple2<String,
org.apache.flink.core.fs.Path>> userArtifacts =
jobGraph.getUserArtifacts().entrySet().stream()
+ .map(entry -> Tuple2.of(entry.getKey(), new
org.apache.flink.core.fs.Path(entry.getValue().filePath)))
+ .collect(Collectors.toList());
+
+ for (Tuple2<String, org.apache.flink.core.fs.Path>
userArtifact : userArtifacts) {
Review comment:
Can we use `for (Map.Entry<String, DistributedCache.DistributedCacheEntry>
entry : jobGraph.getUserArtifacts().entrySet())` for the loop here? We may not
need to create the userArtifacts list.
----------------------------------------------------------------
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