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_r279313822
##########
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:
This method is the same as in the reverted commit - instead of adding it
again, do you think, it makes sense to just not revert this part?
Otherwise please fix the indentation of the parameter list.
----------------------------------------------------------------
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