[
https://issues.apache.org/jira/browse/BEAM-7141?focusedWorklogId=239985&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-239985
]
ASF GitHub Bot logged work on BEAM-7141:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/May/19 00:06
Start Date: 10/May/19 00:06
Worklog Time Spent: 10m
Work Description: aaltay commented on pull request #8408: [BEAM-7141] Add
window & timestamp in timer callback method argument
URL: https://github.com/apache/beam/pull/8408#discussion_r282708463
##########
File path: sdks/python/apache_beam/runners/common.py
##########
@@ -168,22 +169,41 @@ def __init__(self, obj_to_invoke, method_name):
self.has_userstate_arguments = False
self.state_args_to_replace = {}
self.timer_args_to_replace = {}
+ self.timestamp_arg_name = None
+ self.window_arg_name = None
+
for kw, v in zip(args[-len(defaults):], defaults):
if isinstance(v, core.DoFn.StateParam):
self.state_args_to_replace[kw] = v.state_spec
self.has_userstate_arguments = True
elif isinstance(v, core.DoFn.TimerParam):
self.timer_args_to_replace[kw] = v.timer_spec
self.has_userstate_arguments = True
+ elif isinstance(v, core._DoFnParam) and \
Review comment:
Should we elevate them to their own classes similar to StateParam and
TimerParam and also modify core.py
(https://github.com/apache/beam/blob/8154ec5bfd74f58a9a0317792dc8274702a6cf25/sdks/python/apache_beam/transforms/core.py#L430)
a little bit, so that the linked comment correctly reflects what could be
passed to timer/state methods.
----------------------------------------------------------------
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: 239985)
Time Spent: 1.5h (was: 1h 20m)
> Expose kv and window parameters for on_timer
> --------------------------------------------
>
> Key: BEAM-7141
> URL: https://issues.apache.org/jira/browse/BEAM-7141
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Affects Versions: 2.12.0
> Reporter: Thomas Weise
> Assignee: Rakesh Kumar
> Priority: Major
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> We would like to have access to key and window inside the timer callback.
> Without, it is also difficult to debug. We run into this while working onĀ
> BEAM-7112
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)