[
https://issues.apache.org/jira/browse/BEAM-11868?focusedWorklogId=559692&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-559692
]
ASF GitHub Bot logged work on BEAM-11868:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Mar/21 01:41
Start Date: 02/Mar/21 01:41
Worklog Time Spent: 10m
Work Description: robertwb commented on a change in pull request #14060:
URL: https://github.com/apache/beam/pull/14060#discussion_r585184471
##########
File path: sdks/python/apache_beam/transforms/trigger.py
##########
@@ -369,6 +370,53 @@ def has_ontime_pane(self):
return False
+class AfterSynchronizedProcessingTime(TriggerFn):
+ """A "runner's-discretion" trigger downstream of a GroupByKey
+ with AfterProcessingTime trigger.
+
+ AfterSynchronizedProcessingTime is experimental.
+ No backwards compatibility guarantees.
+ """
Review comment:
Maybe make a note that this current implementation simply always fires.
##########
File path: sdks/python/apache_beam/transforms/core.py
##########
@@ -2364,6 +2364,22 @@ def from_runner_api_parameter(
def runner_api_requires_keyed_input(self):
return True
+ def get_windowing(self, inputs):
+ # Circular dep, because trigger pulls in CombineFn
+ from apache_beam.transforms.trigger import AfterProcessingTime
+ from apache_beam.transforms.trigger import AfterSynchronizedProcessingTime
+ windowing = inputs[0].windowing
+ if not isinstance(windowing.triggerfn, AfterProcessingTime):
Review comment:
Nit: I find "if [special case] else ..." easier to read than "if not
[special case] else ..."
##########
File path: sdks/python/apache_beam/transforms/core.py
##########
@@ -2364,6 +2364,22 @@ def from_runner_api_parameter(
def runner_api_requires_keyed_input(self):
return True
+ def get_windowing(self, inputs):
Review comment:
It's been a while since I've touched this code, but I think so. Can't be
hard to verify.
##########
File path: sdks/python/apache_beam/transforms/trigger.py
##########
@@ -369,6 +370,53 @@ def has_ontime_pane(self):
return False
+class AfterSynchronizedProcessingTime(TriggerFn):
Review comment:
Do we want users to use this directly, or should we make it private?
----------------------------------------------------------------
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: 559692)
Time Spent: 0.5h (was: 20m)
> Python AfterProcessingTime triggers result in additional delay at each GBK
> --------------------------------------------------------------------------
>
> Key: BEAM-11868
> URL: https://issues.apache.org/jira/browse/BEAM-11868
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Reporter: Kenneth Knowles
> Assignee: Kenneth Knowles
> Priority: P2
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> See thread discussing it:
> https://lists.apache.org/thread.html/rd1b59fead3927b8769514f65fa66c051f80f68a6115dae356e86302c%40%3Cdev.beam.apache.org%3E
> The solution is to switch to match Java and have
> "AfterSynchronizedProcessingTime" but also to allow a runner to ignore that
> trigger and do whatever it wants.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)