[
https://issues.apache.org/jira/browse/BEAM-6778?focusedWorklogId=215739&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-215739
]
ASF GitHub Bot logged work on BEAM-6778:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Mar/19 20:58
Start Date: 19/Mar/19 20:58
Worklog Time Spent: 10m
Work Description: robertwb 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_r267094349
##########
File path: sdks/python/apache_beam/runners/worker/sdk_worker.py
##########
@@ -199,21 +195,26 @@ def task():
"Currently using %s threads." %
len(self._process_thread_pool._threads))
def _request_process_bundle_split(self, request):
- self._request_process_bundle_action(request)
+ self._request_process_bundle_action(request, self._progress_thread_pool)
+
+ def _request_finalize_bundle(self, request):
+ self._request_process_bundle_action(request, self._finalize_thread_pool)
def _request_process_bundle_progress(self, request):
- self._request_process_bundle_action(request)
+ self._request_process_bundle_action(request, self._progress_thread_pool)
- def _request_process_bundle_action(self, request):
+ def _request_process_bundle_action(self, request, thread_pool):
def task():
instruction_reference = getattr(
request, request.WhichOneof('request')).instruction_reference
- if instruction_reference in self._instruction_id_vs_worker:
- self._execute(
- lambda: self._instruction_id_vs_worker[
- instruction_reference
- ].do_instruction(request), request)
+ if instruction_reference not in self._unscheduled_process_bundle:
+ worker = self.workers.get()
Review comment:
The concurrency is handled by two different caps, (1) the number of worker
instances created and (2) the size of the threadpools. They don't really live
in either pool (despite looking like they do, that's why I suggested a TODO to
clean this relationship up).
If we have number of workers >= size of process pool + size of progress
pool, we should be fine. So, yes, let's allocate size of process pool + size of
progress pool workers. It's fine for finalize to allocate slot(s) in the
progress bundle pool.
----------------------------------------------------------------
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: 215739)
Time Spent: 8h 10m (was: 8h)
> 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: 8h 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)