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

 ##########
 File path: flink-yarn/src/main/java/org/apache/flink/yarn/Utils.java
 ##########
 @@ -187,6 +226,27 @@ public static void deleteApplicationFiles(final 
Map<String, String> env) {
                        LOG.debug("No yarn application files directory set. 
Therefore, cannot clean up the data.");
                }
        }
+       /**
+        * Creates a YARN resource for the remote object at the given location.
+        *
+        * @param remoteRsrcPath        remote location of the resource
+        * @param resourceSize          size of the resource
+        * @param resourceModificationTime last modification time of the 
resource
+        *
+        * @return YARN resource
+        */
+       private static LocalResource registerLocalResource(
+               Path remoteRsrcPath,
+               long resourceSize,
+               long resourceModificationTime) {
+               LocalResource localResource = 
Records.newRecord(LocalResource.class);
+               
localResource.setResource(ConverterUtils.getYarnUrlFromURI(remoteRsrcPath.toUri()));
+               localResource.setSize(resourceSize);
+               localResource.setTimestamp(resourceModificationTime);
+               localResource.setType(LocalResourceType.FILE);
+               
localResource.setVisibility(LocalResourceVisibility.APPLICATION);
+               return localResource;
+       }
 
 Review comment:
   The revert is suggested by Till in the Jira. Could you be specific on 
indentation on which line? It seems following the convention. 

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