[
https://issues.apache.org/jira/browse/BEAM-6754?focusedWorklogId=207724&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-207724
]
ASF GitHub Bot logged work on BEAM-6754:
----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Mar/19 10:12
Start Date: 05/Mar/19 10:12
Worklog Time Spent: 10m
Work Description: mxm commented on pull request #7984: [BEAM-6754] Use
subprocess instead of threads in loopback environment
URL: https://github.com/apache/beam/pull/7984#discussion_r262427823
##########
File path: sdks/python/apache_beam/runners/portability/portable_runner.py
##########
@@ -445,15 +446,22 @@ def start(cls, worker_threads=1):
def NotifyRunnerAvailable(self, start_worker_request, context):
try:
- worker = sdk_worker.SdkHarness(
- start_worker_request.control_endpoint.url,
- worker_count=self._worker_threads,
- worker_id=start_worker_request.worker_id)
- worker_thread = threading.Thread(
- name='run_worker_%s' % start_worker_request.worker_id,
- target=worker.run)
- worker_thread.daemon = True
- worker_thread.start()
+ command = ['python', '-c',
+ 'from apache_beam.runners.worker.sdk_worker '
+ 'import SdkHarness as SH; '
+ 'SH("%s",worker_count=%d,worker_id="%s").run()' % (
+ start_worker_request.control_endpoint.url,
+ self._worker_threads,
+ start_worker_request.worker_id), ]
+ logging.warn("Starting worker with command %s" % (command))
+ process = subprocess.Popen(command, stdout=subprocess.PIPE, )
Review comment:
intentional `, `?
----------------------------------------------------------------
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: 207724)
Time Spent: 40m (was: 0.5h)
> Support multi core machines for python pipeline on flink for loopback
> environment
> ---------------------------------------------------------------------------------
>
> Key: BEAM-6754
> URL: https://issues.apache.org/jira/browse/BEAM-6754
> Project: Beam
> Issue Type: Task
> Components: runner-core, runner-flink
> Reporter: Ankur Goenka
> Assignee: Ankur Goenka
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Loopbck worker is shared across multiple taskmanagers on a single machine. We
> should supportĀ starting multiple processĀ in loopback worker based on number
> of cores.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)