[Java] Disable the multi-worker feature by default (#10593)

This commit is contained in:
Kai Yang
2020-09-08 13:10:46 +08:00
committed by GitHub
parent 66e125d6e6
commit ca8792e4ff
12 changed files with 42 additions and 42 deletions
@@ -31,8 +31,6 @@ public class RayConfig {
public static final String DEFAULT_CONFIG_FILE = "ray.default.conf";
public static final String CUSTOM_CONFIG_FILE = "ray.conf";
private static int DEFAULT_NUM_JAVA_WORKER_PER_PROCESS = 10;
private static final Random RANDOM = new Random();
private static final DateTimeFormatter DATE_TIME_FORMATTER =
@@ -97,7 +95,6 @@ public class RayConfig {
}
}
public final int numWorkersPerProcess;
public final List<String> jvmOptionsForJavaWorker;
@@ -242,14 +239,13 @@ public class RayConfig {
}
if (!enableMultiTenancy) {
numWorkersPerProcess = config.getInt("ray.raylet.config.num_workers_per_process_java");
} else {
final int localNumWorkersPerProcess = config.getInt("ray.job.num-java-workers-per-process");
if (localNumWorkersPerProcess <= 0) {
numWorkersPerProcess = DEFAULT_NUM_JAVA_WORKER_PER_PROCESS;
if (!isDriver) {
numWorkersPerProcess = config.getInt("ray.raylet.config.num_workers_per_process_java");
} else {
numWorkersPerProcess = localNumWorkersPerProcess;
numWorkersPerProcess = 1; // Actually this value isn't used in RayNativeRuntime.
}
} else {
numWorkersPerProcess = config.getInt("ray.job.num-java-workers-per-process");
}
// Validate config.
@@ -27,7 +27,7 @@ ray {
// the path for job 123 will be '/tmp/job_resources/123'.
resource-path: ""
/// The number of java worker per worker process.
num-java-workers-per-process: 10
num-java-workers-per-process: 1
/// The jvm options for java workers of the job.
jvm-options: []
// Environment variables to be set on worker processes.
@@ -98,7 +98,6 @@ ray {
raylet {
// See src/ray/ray_config_def.h for options.
config {
num_workers_per_process_java: 10
// TODO(zhuohan): enable this for java
put_small_object_in_memory_store: false
}