[
https://issues.apache.org/jira/browse/BEAM-5264?focusedWorklogId=142140&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-142140
]
ASF GitHub Bot logged work on BEAM-5264:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Sep/18 11:34
Start Date: 07/Sep/18 11:34
Worklog Time Spent: 10m
Work Description: robertwb commented on a change in pull request #6304:
[BEAM-5264] Reference DirectRunner implementation of Python User State and
Timers API
URL: https://github.com/apache/beam/pull/6304#discussion_r215930186
##########
File path: sdks/python/apache_beam/runners/common.py
##########
@@ -159,6 +159,29 @@ def __init__(self, obj_to_invoke, method_name):
self.args = args
self.defaults = defaults
+ self.has_userstate_arguments = False
+ self.state_args_to_replace = {}
+ self.timer_args_to_replace = {}
+ for kw, v in zip(args[-len(defaults):], defaults):
+ if v.__class__ == core.DoFn.StateParam:
+ self.state_args_to_replace[kw] = v.state_spec
+ self.has_userstate_arguments = True
+ elif v.__class__ == core.DoFn.TimerParam:
+ self.timer_args_to_replace[kw] = v.timer_spec
+ self.has_userstate_arguments = True
+
+ def invoke_timer_callback(self, user_state_context, key, window):
+ # TODO(ccy): support WindowParam and TimestampParam.
Review comment:
(can't reply to the original comment due to the rebase...)
Side inputs would be provided just as they are for process(...). This can
remain a TODO.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 142140)
Time Spent: 4h 20m (was: 4h 10m)
> Reference DirectRunner implementation of Python user state and timers API
> -------------------------------------------------------------------------
>
> Key: BEAM-5264
> URL: https://issues.apache.org/jira/browse/BEAM-5264
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Affects Versions: 2.6.0
> Reporter: Charles Chen
> Assignee: Charles Chen
> Priority: Major
> Time Spent: 4h 20m
> Remaining Estimate: 0h
>
> This issue tracks the reference DirectRunner implementation of the Beam
> Python User State and Timer API, described here:
> [https://s.apache.org/beam-python-user-state-and-timers].
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)