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 2022/06/03 23:44:12 UTC

[GitHub] [beam] kennknowles opened a new issue, #19326: Triggers not working for bounded data

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

   pCollection
    .apply(Window.<String\>into(FixedWindows.of(Duration.millis(100)))
    .triggering(Repeatedly.forever(AfterPane.elementCountAtLeast(1000)))
    .discardingFiredPanes().withAllowedLateness(Duration.ZERO))
    .apply(TextIO.write().withWindowedWrites().withNumShards(1).to('gs-path'));
   
   Here pCollection is a *bounded* PCollection. I'm trying to break it into files of 1000 roughly, but all I get is 2 files one having 1000 other having the rest of the data.
   If instead I do:-
   
   pCollection
   .apply(new GlobalWindow())
   .triggering(Repeatedly.forever(AfterPane.elementCountAtLeast(1000)))
   .discardingFiredPanes().withAllowedLateness(Duration.ZERO))
   .apply(TextIO.write().withWindowedWrites().withNumShards(1).to('gs-path'));
   
   
   I get just one file. 
   Both of the above cases should have conceptually divided the records into chucks of 1000 to be written in a file.
   
   Imported from Jira [BEAM-6743](https://issues.apache.org/jira/browse/BEAM-6743). Original Jira may contain additional context.
   Reported by: aditya.guru149.


-- 
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: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org