[ https://issues.apache.org/jira/browse/BEAM-9562?focusedWorklogId=411555&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411555 ]
ASF GitHub Bot logged work on BEAM-9562: ---------------------------------------- Author: ASF GitHub Bot Created on: 28/Mar/20 00:22 Start Date: 28/Mar/20 00:22 Worklog Time Spent: 10m Work Description: lukecwik commented on pull request #11199: [BEAM-9562][WIP] Update Timer encoding with respect of dynamic timers URL: https://github.com/apache/beam/pull/11199#discussion_r399591519 ########## File path: sdks/python/apache_beam/coders/coder_impl.py ########## @@ -629,22 +629,56 @@ def estimate_size(self, unused_value, nested=False): class TimerCoderImpl(StreamCoderImpl): """For internal use only; no backwards-compatibility guarantees.""" - def __init__(self, payload_coder_impl): + def __init__(self, key_coder_impl, window_coder_impl, tag_coder_impl): self._timestamp_coder_impl = TimestampCoderImpl() - self._payload_coder_impl = payload_coder_impl + self._boolean_coder_impl = BooleanCoderImpl() + self._pane_info_coder_impl = PaneInfoCoderImpl() + self._key_coder_impl = key_coder_impl + self._windows_coder_impl = TupleSequenceCoderImpl(window_coder_impl) + self._tag_coder_impl = tag_coder_impl def encode_to_stream(self, value, out, nested): # type: (dict, create_OutputStream, bool) -> None - self._timestamp_coder_impl.encode_to_stream(value['timestamp'], out, True) - self._payload_coder_impl.encode_to_stream(value.get('payload'), out, True) + self._key_coder_impl.encode_to_stream(value.user_key, out, nested) + self._tag_coder_impl.encode_to_stream( + value.dynamic_timer_tag, out, True) + self._boolean_coder_impl.encode_to_stream(value.clear_bit, out, True) + if not value.clear_bit: + self._timestamp_coder_impl.encode_to_stream( + value.fire_timestamp, out, True) + self._timestamp_coder_impl.encode_to_stream( + value.hold_timestamp, out, True) + self._windows_coder_impl.encode_to_stream(value.windows, out, True) + self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, True) Review comment: ```suggestion self._pane_info_coder_impl.encode_to_stream(value.paneinfo, out, nested) ``` ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 411555) > 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-py-harness > Reporter: Boyuan Zhang > Assignee: Boyuan Zhang > Priority: Major > Time Spent: 6h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)