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

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

                Author: ASF GitHub Bot
            Created on: 04/Sep/18 06:56
            Start Date: 04/Sep/18 06:56
    Worklog Time Spent: 10m 
      Work Description: charlesccychen 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_r214790724
 
 

 ##########
 File path: sdks/python/apache_beam/runners/common.py
 ##########
 @@ -159,6 +159,28 @@ 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:
 
 Review comment:
   My understanding is that isinstance is slow since it has to resolve the mro. 
 I therefore used this form in `invoke_per_window` below, and for consistency, 
used this form everywhere else too.  Since at least that part will probably 
need to be kept as `obj.__class__ == ...` for performance, I would prefer to 
keep the other forms for consistency.  Let me know if you feel strongly about 
changing this here and on line 473.

----------------------------------------------------------------
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: 140765)
    Time Spent: 2h 40m  (was: 2.5h)

> 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: 2h 40m
>  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)

Reply via email to