[
https://issues.apache.org/jira/browse/BEAM-7141?focusedWorklogId=242362&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-242362
]
ASF GitHub Bot logged work on BEAM-7141:
----------------------------------------
Author: ASF GitHub Bot
Created on: 15/May/19 09:20
Start Date: 15/May/19 09:20
Worklog Time Spent: 10m
Work Description: robertwb commented on pull request #8408: [BEAM-7141]
Add window & timestamp in timer callback method argument
URL: https://github.com/apache/beam/pull/8408#discussion_r284156982
##########
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:
Or at the very least could this be simplified with `v ==
core.DoFn.TimestampParam`?
----------------------------------------------------------------
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: 242362)
Time Spent: 1h 40m (was: 1.5h)
> 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: 1h 40m
> 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)