[Java] Support multiple workers in Java worker process (#5505)

This commit is contained in:
Kai Yang
2019-09-07 22:52:05 +08:00
committed by Hao Chen
parent d89ceb3ee5
commit 732336fc4f
37 changed files with 512 additions and 148 deletions
+4 -1
View File
@@ -1181,12 +1181,15 @@ def build_java_worker_command(
command += "-Dray.home={} ".format(RAY_HOME)
command += "-Dray.log-dir={} ".format(os.path.join(session_dir, "logs"))
command += ("-Dray.raylet.config.num_workers_per_process_java=" +
"RAY_WORKER_NUM_WORKERS_PLACEHOLDER ")
if java_worker_options:
# Put `java_worker_options` in the last, so it can overwrite the
# above options.
command += java_worker_options + " "
command += "RAY_WORKER_OPTION_0 "
command += "RAY_WORKER_DYNAMIC_OPTION_PLACEHOLDER_0 "
command += "org.ray.runtime.runner.worker.DefaultWorker"
return command