You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2020/03/20 07:42:18 UTC

[GitHub] [beam] piotr-szuberski commented on a change in pull request #11122: [BEAM-9346] Improve the efficiency of TFRecordIO

piotr-szuberski commented on a change in pull request #11122: [BEAM-9346] Improve the efficiency of TFRecordIO
URL: https://github.com/apache/beam/pull/11122#discussion_r395475008
 
 

 ##########
 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java
 ##########
 @@ -410,13 +412,44 @@ private GatherResults(Coder<ResultT> resultCoder) {
       } else {
         // Pass results via a side input rather than reshuffle, because we need to get an empty
         // iterable to finalize if there are no results.
-        return input
-            .getPipeline()
-            .apply(Reify.viewInGlobalWindow(input.apply(View.asList()), ListCoder.of(resultCoder)));
+        return input.apply("ToList", Combine.globally(new ToListCombineFn<>()));
       }
     }
   }
 
+  public static class ToListCombineFn<ResultT>
 
 Review comment:
   You're right, I just copy pasted the code from Jira. It was my first PR in Beam and I wanted to get the workflow without digging the code proposed.

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


With regards,
Apache Git Services