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

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

                Author: ASF GitHub Bot
            Created on: 20/May/19 04:32
            Start Date: 20/May/19 04:32
    Worklog Time Spent: 10m 
      Work Description: rakeshcusat commented on pull request #8408: 
[BEAM-7141] Add window & timestamp in timer callback method argument
URL: https://github.com/apache/beam/pull/8408#discussion_r285426364
 
 

 ##########
 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 \
+              v.param_id == core.DoFn.TimestampParam.param_id:
+        self.timestamp_arg_name = kw
 
 Review comment:
    I think this has already taken care.
 
----------------------------------------------------------------
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: 244794)
    Time Spent: 2h 40m  (was: 2.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: 2h 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)

Reply via email to