iemejia commented on a change in pull request #14520:
URL: https://github.com/apache/beam/pull/14520#discussion_r613738572



##########
File path: 
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/resources/PipelineResources.java
##########
@@ -64,6 +70,31 @@
     return resourcePath -> !resourcePath.contains("gradle/wrapper");
   }
 
+  /**
+   * Goes through the list of files that need to be staged on runner. Removes 
nonexistent
+   * directories and packages existing ones. This is necessary for runners 
that require filesToStage
+   * to be jars only.
+   *
+   * @param options options object with the files to stage and temp location 
for staging
+   */
+  public static void prepareFilesForStaging(FileStagingOptions options) {
+    List<String> filesToStage = options.getFilesToStage();
+    if (filesToStage == null || filesToStage.isEmpty()) {
+      filesToStage = 
detectClassPathResourcesToStage(ReflectHelpers.findClassLoader(), options);

Review comment:
       Thanks for the pointer, I am going to try this at least on YARN to be 
cautious about any possible deployment issue.




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


Reply via email to