tillrohrmann commented on a change in pull request #8215: [FLINK-8801][yarn/s3] 
Fix jars downloading issues due to inconsistent timestamp in S3 Filesystem
URL: https://github.com/apache/flink/pull/8215#discussion_r299367608
 
 

 ##########
 File path: flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
 ##########
 @@ -161,15 +169,37 @@ public static void setupYarnClassPath(Configuration 
conf, Map<String, String> ap
 
                fs.copyFromLocalFile(false, true, localSrcPath, dst);
 
-               // Note: If we used registerLocalResource(FileSystem, Path) 
here, we would access the remote
+               // Note: If we directly used registerLocalResource(FileSystem, 
Path) here, we would access the remote
                //       file once again which has problems with eventually 
consistent read-after-write file
-               //       systems. Instead, we decide to preserve the 
modification time at the remote
-               //       location because this and the size of the resource 
will be checked by YARN based on
-               //       the values we provide to #registerLocalResource() 
below.
-               fs.setTimes(dst, localFile.lastModified(), -1);
-               // now create the resource instance
-               LocalResource resource = registerLocalResource(dst, 
localFile.length(), localFile.lastModified());
 
 Review comment:
   I think we no longer need `registerLocalResource(Path, long, long)`

----------------------------------------------------------------
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

Reply via email to