Skip to content

Commit

Permalink
[Java] Refine Java config item (ray-project#4014)
Browse files Browse the repository at this point in the history
* Refine

* Address comment.
  • Loading branch information
jovany-wang authored and guoyuhong committed Feb 11, 2019
1 parent ab809bd commit bc438ca
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public RayConfig(Config config) {
// 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);
}
Expand Down Expand Up @@ -233,6 +233,7 @@ public String toString() {
+ ", redirectOutput=" + redirectOutput
+ ", libraryPath=" + libraryPath
+ ", classpath=" + classpath
+ ", jvmParameters=" + jvmParameters
+ ", redisAddress='" + redisAddress + '\''
+ ", redisIp='" + redisIp + '\''
+ ", redisPort=" + redisPort
Expand All @@ -241,9 +242,13 @@ public String toString() {
+ ", objectStoreSocketName='" + objectStoreSocketName + '\''
+ ", objectStoreSize=" + objectStoreSize
+ ", rayletSocketName='" + rayletSocketName + '\''
+ ", rayletConfigParameters=" + rayletConfigParameters
+ ", redisServerExecutablePath='" + redisServerExecutablePath + '\''
+ ", redisModulePath='" + redisModulePath + '\''
+ ", plasmaStoreExecutablePath='" + plasmaStoreExecutablePath + '\''
+ ", rayletExecutablePath='" + rayletExecutablePath + '\''
+ ", driverResourcePath='" + driverResourcePath + '\''
+ ", pythonWorkerCommand='" + pythonWorkerCommand + '\''
+ '}';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private void startRaylet() {
"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
);
Expand Down
2 changes: 2 additions & 0 deletions java/runtime/src/main/resources/ray.default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
4 changes: 0 additions & 4 deletions java/test/src/main/java/org/ray/api/test/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
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 {

@BeforeMethod
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();
}

Expand All @@ -30,7 +27,6 @@ public void tearDown() {
// unset system properties
System.clearProperty("ray.home");
System.clearProperty("ray.resources");
System.clearProperty("ray.raylet.config.inline_object_max_size_bytes");
}

}

0 comments on commit bc438ca

Please sign in to comment.