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

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

                Author: ASF GitHub Bot
            Created on: 19/Mar/19 18:04
            Start Date: 19/Mar/19 18:04
    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_r267027534
 
 

 ##########
 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:
   caching/re-using worker would be helpful for progress/split. We can still 
maintain a worker cache map only for progress/split request.
 
----------------------------------------------------------------
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: 215624)
    Time Spent: 7h  (was: 6h 50m)

> 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: 7h
>  Remaining Estimate: 0h
>




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

Reply via email to