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

   ### What happened?
   
   Running the following code, we can see that the logging of the early pane 
and and on-time pane appear on the terminal at the same time.
   
   The expected behavior should be for each window, the early pane is logged 
first and then after about 8 seconds (i.e. 10-2) the on-time pane is logged.
   
   ```
   import apache_beam as beam
   from apache_beam.options.pipeline_options import PipelineOptions
   from apache_beam.transforms.window import FixedWindows
   from apache_beam.transforms import trigger
   from apache_beam.transforms.periodicsequence import PeriodicImpulse, 
RebaseMode
   from apache_beam.utils.timestamp import Timestamp
   
   # prism runner option
   options = PipelineOptions([
       "--streaming",
       "--environment_type=LOOPBACK",
       "--runner=PrismRunner",
       "--experiments=prism_enable_rtc",
       "--prism_log_level=info",
        "--allow_unsafe_triggers",
   ])
   
   
   # Output PCollection
   class Output(beam.PTransform):
   
     class _OutputFn(beam.DoFn):
   
       def __init__(self, prefix=''):
         super().__init__()
         self.prefix = prefix
   
       def process(self, element):
         print(self.prefix + str(element))
   
     def __init__(self, label=None, prefix=''):
       super().__init__(label)
       self.prefix = prefix
   
     def expand(self, input):
       input | beam.ParDo(self._OutputFn(self.prefix))
   
   
   with beam.Pipeline(options=options) as p:
     _ = (
         p | PeriodicImpulse(
             start_timestamp=Timestamp.now(),
             stop_timestamp=Timestamp.now() + 20,
             fire_interval=1,
             rebase=RebaseMode.REBASE_ALL)
         | 'window' >> beam.WindowInto(
             FixedWindows(6),
             trigger=trigger.AfterCount(2),
             accumulation_mode=trigger.AccumulationMode.DISCARDING)
         | beam.GroupBy()
         | beam.LogElements(
             with_timestamp=True, with_window=True, with_pane_info=True))
   ```
   
   ### Issue Priority
   
   Priority: 2 (default / most bugs should be filed as P2)
   
   ### Issue Components
   
   - [ ] Component: Python SDK
   - [ ] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [ ] Component: IO connector
   - [ ] Component: Beam YAML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Infrastructure
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Samza Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
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-unsubscr...@beam.apache.org.apache.org

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

Reply via email to