You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/11/01 01:58:00 UTC

[jira] [Work logged] (BEAM-8435) Allow access to PaneInfo from Python DoFns

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

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

                Author: ASF GitHub Bot
            Created on: 01/Nov/19 01:57
            Start Date: 01/Nov/19 01:57
    Worklog Time Spent: 10m 
      Work Description: angoenka commented on pull request #9836: [BEAM-8435] Implement PaneInfo computation for Python.
URL: https://github.com/apache/beam/pull/9836#discussion_r341426171
 
 

 ##########
 File path: sdks/python/apache_beam/transforms/trigger.py
 ##########
 @@ -1162,12 +1173,33 @@ def process_timer(self, window_id, unused_name, time_domain, timestamp,
         if self.trigger_fn.should_fire(time_domain, timestamp,
                                        window, context):
           finished = self.trigger_fn.on_fire(timestamp, window, context)
-          yield self._output(window, finished, state)
+          yield self._output(window, finished, state, timestamp,
+                             time_domain == TimeDomain.WATERMARK)
     else:
       raise Exception('Unexpected time domain: %s' % time_domain)
 
-  def _output(self, window, finished, state):
+  def _output(self, window, finished, state, watermark, maybe_ontime):
     """Output window and clean up if appropriate."""
+    index = state.get_state(window, self.INDEX)
+    state.add_state(window, self.INDEX, 1)
+    if watermark <= window.max_timestamp():
+      nonspeculative_index = -1
+      timing = windowed_value.PaneInfoTiming.EARLY
+      if state.get_state(window, self.NONSPECULATIVE_INDEX):
+        logging.warning('Watermark moved backwards in time.')
 
 Review comment:
   Session window max_timestamp can move forward which can result in this log.
 
----------------------------------------------------------------
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:
users@infra.apache.org


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

    Worklog Id:     (was: 337134)

> Allow access to PaneInfo from Python DoFns
> ------------------------------------------
>
>                 Key: BEAM-8435
>                 URL: https://issues.apache.org/jira/browse/BEAM-8435
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Robert Bradshaw
>            Assignee: Robert Bradshaw
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> PaneInfoParam exists, but the plumbing to actually populate it at runtime was never added. (Nor, clearly, were any tests...)



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