[ 
https://issues.apache.org/jira/browse/BEAM-9562?focusedWorklogId=419759&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-419759
 ]

ASF GitHub Bot logged work on BEAM-9562:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Apr/20 21:01
            Start Date: 09/Apr/20 21:01
    Worklog Time Spent: 10m 
      Work Description: robertwb commented on pull request #11314: [BEAM-9562] 
Send Timers over Data Channel as Elements
URL: https://github.com/apache/beam/pull/11314#discussion_r406473230
 
 

 ##########
 File path: 
sdks/python/apache_beam/runners/portability/fn_api_runner/fn_runner.py
 ##########
 @@ -914,6 +926,17 @@ def process_bundle(self,
 
     split_manager = self._select_split_manager()
     if not split_manager:
+      # Send the fired timers if any.
+      for (transform_id, timer_family_id), timers in fired_timers.items():
+        self._send_timers_to_worker(
+            process_bundle_id, transform_id, timer_family_id, timers)
+
+      for transform_id, timer_family_id in (
+          set(expected_output_timers.keys()) - set(fired_timers.keys())):
+        # Close the stream if there is no timers to be sent.
 
 Review comment:
   This is a subtle point. I might write something like "The worker waits for a 
logical timer stream to be closed for every possible timer, regardless of 
whether there are any timers to be sent."
   
   Maybe it'd be clearer to iterate over `expected_output_timers`, and send 
`fired_timers.get((transform_id, timer_family_id), [])`. 
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 419759)
    Time Spent: 19.5h  (was: 19h 20m)

> Remove timer from PCollection and treat timers as Elements 
> -----------------------------------------------------------
>
>                 Key: BEAM-9562
>                 URL: https://issues.apache.org/jira/browse/BEAM-9562
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-harness, sdk-py-harness
>            Reporter: Boyuan Zhang
>            Assignee: Boyuan Zhang
>            Priority: Major
>             Fix For: 2.21.0
>
>          Time Spent: 19.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to