[Java] Refine Java config item (#4014)

* Refine

* Address comment.
This commit is contained in:
Wang Qing
2019-02-11 23:55:40 +08:00
committed by Yuhong Guo
parent ab809bd927
commit bc438ca73b
4 changed files with 9 additions and 6 deletions
@@ -168,7 +168,7 @@ public class RayConfig {
// raylet parameters
rayletConfigParameters = new ArrayList<String>();
Config rayletConfig = config.getConfig("ray.raylet.config");
for (java.util.Map.Entry<java.lang.String,ConfigValue> entry : rayletConfig.entrySet()) {
for (Map.Entry<String,ConfigValue> entry : rayletConfig.entrySet()) {
String parameter = entry.getKey() + "," + String.valueOf(entry.getValue().unwrapped());
rayletConfigParameters.add(parameter);
}
@@ -233,6 +233,7 @@ public class RayConfig {
+ ", redirectOutput=" + redirectOutput
+ ", libraryPath=" + libraryPath
+ ", classpath=" + classpath
+ ", jvmParameters=" + jvmParameters
+ ", redisAddress='" + redisAddress + '\''
+ ", redisIp='" + redisIp + '\''
+ ", redisPort=" + redisPort
@@ -241,9 +242,13 @@ public class RayConfig {
+ ", objectStoreSocketName='" + objectStoreSocketName + '\''
+ ", objectStoreSize=" + objectStoreSize
+ ", rayletSocketName='" + rayletSocketName + '\''
+ ", rayletConfigParameters=" + rayletConfigParameters
+ ", redisServerExecutablePath='" + redisServerExecutablePath + '\''
+ ", redisModulePath='" + redisModulePath + '\''
+ ", plasmaStoreExecutablePath='" + plasmaStoreExecutablePath + '\''
+ ", rayletExecutablePath='" + rayletExecutablePath + '\''
+ ", driverResourcePath='" + driverResourcePath + '\''
+ ", pythonWorkerCommand='" + pythonWorkerCommand + '\''
+ '}';
}
@@ -205,7 +205,7 @@ public class RunManager {
"0", // number of initial workers
String.valueOf(maximumStartupConcurrency),
ResourceUtil.getResourcesStringFromMap(rayConfig.resources),
String.join(",", rayConfig.rayletConfigParameters), // The internal config list.
String.join(",", rayConfig.rayletConfigParameters), // The internal config list.
buildPythonWorkerCommand(), // python worker command
buildWorkerCommandRaylet() // java worker command
);
@@ -88,6 +88,8 @@ ray {
// See src/ray/ray_config_def.h for options.
config {
// Maximum size of an inline object (bytes).
inline_object_max_size_bytes: 0
}
}
@@ -3,9 +3,7 @@ package org.ray.api.test;
import java.io.File;
import org.ray.api.Ray;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
public class BaseTest {
@@ -13,7 +11,6 @@ public class BaseTest {
public void setUp() {
System.setProperty("ray.home", "../..");
System.setProperty("ray.resources", "CPU:4,RES-A:4");
System.setProperty("ray.raylet.config.inline_object_max_size_bytes", "0");
Ray.init();
}
@@ -30,7 +27,6 @@ public class BaseTest {
// unset system properties
System.clearProperty("ray.home");
System.clearProperty("ray.resources");
System.clearProperty("ray.raylet.config.inline_object_max_size_bytes");
}
}