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

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

                Author: ASF GitHub Bot
            Created on: 19/Apr/19 23:28
            Start Date: 19/Apr/19 23:28
    Worklog Time Spent: 10m 
      Work Description: yifanmai commented on pull request #7994: [BEAM-562] 
Add DoFn.setup and DoFn.teardown to Python SDK
URL: https://github.com/apache/beam/pull/7994#discussion_r277111918
 
 

 ##########
 File path: sdks/python/apache_beam/runners/direct/transform_evaluator.py
 ##########
 @@ -619,6 +619,7 @@ def start_bundle(self):
         step_name=self._applied_ptransform.full_label,
         state=DoFnState(self._counter_factory),
         user_state_context=self.user_state_context)
+    self.runner.setup()
 
 Review comment:
   I added some pdb breakpoints and confirmed that the DoFn is cloned during 
the test and that the lifecycle methods are called on the clones. See this 
[thread](https://github.com/apache/beam/pull/7994#discussion_r277110671) for 
where the cloning occurs.
 
----------------------------------------------------------------
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: 230318)
    Time Spent: 6h 50m  (was: 6h 40m)

> DoFn Reuse: Add new methods to DoFn
> -----------------------------------
>
>                 Key: BEAM-562
>                 URL: https://issues.apache.org/jira/browse/BEAM-562
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-py-core
>            Reporter: Ahmet Altay
>            Priority: Major
>              Labels: sdk-consistency, triaged
>          Time Spent: 6h 50m
>  Remaining Estimate: 0h
>
> Java SDK added setup and teardown methods to the DoFns. This makes DoFns 
> reusable and provide performance improvements. Python SDK should add support 
> for these new DoFn methods:
> Proposal doc: 
> https://docs.google.com/document/d/1LLQqggSePURt3XavKBGV7SZJYQ4NW8yCu63lBchzMRk/edit?ts=5771458f#



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to