NicoK 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_r282089272
##########
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:
your revert commit is actually already a partial revert - these lines are
basically removed by the revert and then added back - unnecessarily. History
(and authorship) would be clearer without this.
----------------------------------------------------------------
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