robertwb commented on a change in pull request #11314: [BEAM-9562] Send Timers 
over Data Channel as Elements
URL: https://github.com/apache/beam/pull/11314#discussion_r405825392
 
 

 ##########
 File path: sdks/python/apache_beam/runners/worker/bundle_processor.py
 ##########
 @@ -846,6 +870,30 @@ def process_bundle(self, instruction_id):
         data_channels[input_op.data_channel].append(input_op.transform_id)
         input_op_by_transform_id[input_op.transform_id] = input_op
 
+        # Set up timer output stream
+      timer_output_streams = {}
+      for transform_id, timer_list in self.timer_ids.items():
+        output_streams = {}
+        for timer_id in timer_list:
+          output_streams[
+              timer_id] = self.timer_data_channel.output_timer_stream(
+                  instruction_id, transform_id, timer_id)
+          timer_output_streams[transform_id] = output_streams
+        self.process_timer_ops[
+            transform_id].user_state_context.update_timer_output_streams(
 
 Review comment:
   Nit: rather than this double nesting, it might simplify things to have an 
`update_timer_output_streams(timer_id, output_stream)` method that could be 
called repeatedly. 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to