wangyang0918 commented on a change in pull request #12143:
URL: https://github.com/apache/flink/pull/12143#discussion_r434464224
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
##########
@@ -733,67 +737,49 @@ private ApplicationReport startAppMaster(
1));
}
- final Set<File> userJarFiles = new HashSet<>();
+ final Set<Path> userJarFiles = new HashSet<>();
if (jobGraph != null) {
-
userJarFiles.addAll(jobGraph.getUserJars().stream().map(f ->
f.toUri()).map(File::new).collect(Collectors.toSet()));
+
userJarFiles.addAll(jobGraph.getUserJars().stream().map(f ->
f.toUri()).map(Path::new).collect(Collectors.toSet()));
}
final List<URI> jarUrls =
ConfigUtils.decodeListFromConfig(configuration, PipelineOptions.JARS,
URI::create);
if (jarUrls != null &&
YarnApplicationClusterEntryPoint.class.getName().equals(yarnClusterEntrypoint))
{
-
userJarFiles.addAll(jarUrls.stream().map(File::new).collect(Collectors.toSet()));
+
userJarFiles.addAll(jarUrls.stream().map(Path::new).collect(Collectors.toSet()));
}
- int yarnFileReplication =
yarnConfiguration.getInt(DFSConfigKeys.DFS_REPLICATION_KEY,
DFSConfigKeys.DFS_REPLICATION_DEFAULT);
- int fileReplication =
configuration.getInteger(YarnConfigOptions.FILE_REPLICATION);
- fileReplication = fileReplication > 0 ? fileReplication :
yarnFileReplication;
-
// only for per job mode
if (jobGraph != null) {
for (Map.Entry<String,
DistributedCache.DistributedCacheEntry> entry :
jobGraph.getUserArtifacts().entrySet()) {
- org.apache.flink.core.fs.Path path = new
org.apache.flink.core.fs.Path(entry.getValue().filePath);
// only upload local files
- if (!path.getFileSystem().isDistributedFS()) {
- Path localPath = new
Path(path.getPath());
+ if
(Utils.isRemotePath(entry.getValue().filePath)) {
Review comment:
@klion26 Thanks for your comments about this. It is indeed a bug and
should be fixed in 1.11. I will create a ticket right now. Moreover, i will dig
in and find why the related tests does not fail.
----------------------------------------------------------------
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]