[
https://issues.apache.org/jira/browse/BEAM-6778?focusedWorklogId=209834&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-209834
]
ASF GitHub Bot logged work on BEAM-6778:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Mar/19 23:26
Start Date: 07/Mar/19 23:26
Worklog Time Spent: 10m
Work Description: boyuanzz commented on pull request #7937: [BEAM-6778]
Enable Bundle Finalization in Python SDK harness over FnApi
URL: https://github.com/apache/beam/pull/7937#discussion_r263613050
##########
File path: sdks/python/apache_beam/runners/worker/sdk_worker.py
##########
@@ -305,10 +316,14 @@ def get_bundle_processor(self, instruction_id,
bundle_descriptor_id):
with state_handler.process_instruction_id(instruction_id):
yield processor
finally:
- del self.active_bundle_processors[instruction_id]
+ requires_finalization = \
+ self.active_bundle_processors[instruction_id].requires_finalization
+ if not requires_finalization:
+ del self.active_bundle_processors[instruction_id]
# Outside the finally block as we only want to re-use on success.
- processor.reset()
- self.cached_bundle_processors[bundle_descriptor_id].append(processor)
+ if not requires_finalization:
+ processor.reset()
Review comment:
If there is a finalization requires for one bundle, then that
bundle_processor should stay in active cache until calling on finalize. Added
reusing bundle_processor after finalization call. I'll refactor this part after
https://github.com/apache/beam/pull/8009 merged.
----------------------------------------------------------------
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: 209834)
Time Spent: 10m
Remaining Estimate: 0h
> Enable Bundle Finalization in Python SDK
> ----------------------------------------
>
> Key: BEAM-6778
> URL: https://issues.apache.org/jira/browse/BEAM-6778
> Project: Beam
> Issue Type: New Feature
> Components: sdk-py-harness
> Reporter: Boyuan Zhang
> Assignee: Boyuan Zhang
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)