Github user wenlong88 commented on a diff in the pull request: https://github.com/apache/flink/pull/3388#discussion_r103878668 --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java --- @@ -742,6 +755,24 @@ public FileVisitResult preVisitDirectory(java.nio.file.Path dir, BasicFileAttrib } } + for (URI originURI : archives) { + Path remoteParent = Utils.getRemoteResourceRoot(appId.toString(), new Path(originURI.getPath()), fs.getHomeDirectory()); + String fragment = originURI.getFragment(); + Path target = new Path( + FileUtils.localizeRemoteFiles(new org.apache.flink.core.fs.Path(remoteParent.toUri()), originURI).toUri()); + URI targetURI = target.toUri(); + if (targetURI.getFragment() == null && fragment != null) { + targetURI = new URI(target.toUri().toString() + "#" + fragment); --- End diff -- you are right about the file naming rule. When using Path as localizeFile's output type, the uri fragment will be dropped, so we need to recover the fragment there. I have change the return type to `URI`, so it is not needed any more.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---