damccorm opened a new issue, #21257:
URL: https://github.com/apache/beam/issues/21257

   The following pipeline fails to print out all numbers 1 to 100 when run on 
DirectRunner in streaming mode.
   
   This was identified implementing 
org.apache.beam.sdk.io.gcp.pubsublite.ReadWriteIT, which uses a workaround for 
the bug in either Create or DirectRunner:
   
   ```
   
   private static final int COUNT = 100;
   
   private static AtomicInteger CREATED_COUNT = new AtomicInteger();
   
   public
   static void run(Pipeline pipeline) {
     PCollection<Integer> indexes = pipeline.apply( "createIndexes",
   
        Create.of(IntStream.range(0, 
COUNT).boxed().collect(Collectors.toList())));
   
   indexes.apply(
   
   "createMessages",
    MapElements.via(
        new SimpleFunction<Integer, Integer>(
            index ->
   {
              System.err.println("Created message index " + 
createdCount.incrementAndGet());
        
        return index;
            }) {}));
   
     pipeline.run().waitUntilFinish();  // Never terminates
   }
   
   ```
   
   
   Imported from Jira 
[BEAM-12867](https://issues.apache.org/jira/browse/BEAM-12867). Original Jira 
may contain additional context.
   Reported by: dpcollins-google.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to