[ 
https://issues.apache.org/jira/browse/BEAM-12091?focusedWorklogId=581799&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-581799
 ]

ASF GitHub Bot logged work on BEAM-12091:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Apr/21 14:14
            Start Date: 13/Apr/21 14:14
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on a change in pull request #14520:
URL: https://github.com/apache/beam/pull/14520#discussion_r612486904



##########
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:
       I am assuming that this is the 'correct' way to find the correct 
classloader, it is the only possible breaking change of this PR




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 581799)
    Time Spent: 20m  (was: 10m)

> Make file staging uniform among runners
> ---------------------------------------
>
>                 Key: BEAM-12091
>                 URL: https://issues.apache.org/jira/browse/BEAM-12091
>             Project: Beam
>          Issue Type: Improvement
>          Components: runner-core
>            Reporter: Ismaël Mejía
>            Assignee: Ismaël Mejía
>            Priority: P2
>             Fix For: 2.30.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to