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

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

                Author: ASF GitHub Bot
            Created on: 09/Apr/20 07:21
            Start Date: 09/Apr/20 07:21
    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_r405990026
 
 

 ##########
 File path: sdks/python/apache_beam/runners/worker/bundle_processor.py
 ##########
 @@ -629,28 +628,28 @@ def __init__(self,
     self._transform_id = transform_id
     self._key_coder = key_coder
     self._window_coder = window_coder
-    self._timer_family_specs = timer_family_specs
-    self._timer_receivers = None  # type: Optional[Dict[str, 
operations.ConsumerSet]]
+    # A mapping of {timer_family_id: OutputStream}
+    self._timer_output_streams = {}
+    self._timer_coders_impl = {}
     self._all_states = {
     }  # type: Dict[tuple, userstate.AccumulatingRuntimeState]
 
-  def update_timer_receivers(self, receivers):
-    # type: (operations._TaggedReceivers) -> None
-
-    """TODO"""
-    self._timer_receivers = {}
-    for tag in self._timer_family_specs:
-      self._timer_receivers[tag] = receivers.pop(tag)
+  def add_timer_info(self, timer_family_id, output_stream, coder_impl):
+    self._timer_output_streams[timer_family_id] = output_stream
+    self._timer_coders_impl[timer_family_id] = coder_impl
 
   def get_timer(
       self,
       timer_spec,
       key,
-      window  # type: windowed_value.BoundedWindow
-  ):
+      window,  # type: windowed_value.BoundedWindow
+      pane):
     # type: (...) -> OutputTimer
-    assert self._timer_receivers is not None
-    return OutputTimer(key, window, self._timer_receivers[timer_spec.name])
+    output_stream = self._timer_output_streams[timer_spec.name]
 
 Review comment:
   If this were a single map rather that two parallel maps, you could write 
something like
   
   `output_tream, timer_coder_impl = self._timer_info(timer_spec.name]`
 
----------------------------------------------------------------
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: 419192)
    Time Spent: 17h 10m  (was: 17h)

> 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: 17h 10m
>  Remaining Estimate: 0h
>




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

Reply via email to