You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/05/05 02:14:37 UTC

[GitHub] [beam] ihji commented on a change in pull request #11039: [BEAM-9383] Staging Dataflow artifacts from environment

ihji commented on a change in pull request #11039:
URL: https://github.com/apache/beam/pull/11039#discussion_r419829659



##########
File path: runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/Environments.java
##########
@@ -210,56 +209,55 @@ public static Environment createProcessEnvironment(
     }
   }
 
-  private static List<ArtifactInformation> getArtifacts(List<String> stagingFiles) {
-    Set<String> pathsToStage = Sets.newHashSet(stagingFiles);
+  public static List<ArtifactInformation> getArtifacts(
+      List<String> stagingFiles, StagingFileNameGenerator generator) {
     ImmutableList.Builder<ArtifactInformation> artifactsBuilder = ImmutableList.builder();
-    for (String path : pathsToStage) {
+    for (String path : ImmutableSet.copyOf(stagingFiles)) {

Review comment:
       `ImmutableSet` preserves the order but I think we don't need to make a copy here. Will use `LinkedHashSet` instead.




----------------------------------------------------------------
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:
users@infra.apache.org