[Java] Change log dir to /tmp/raylogs (#2677)

Currently, log directory in Java is a relative path . This PR changes it to `/tmp/raylogs` (with the same format as Python, e.g., `local_scheduler-2018-51-17_17-8-6-05164.err`). It also cleans up some relative code.
This commit is contained in:
Hao Chen
2018-08-19 14:46:36 +08:00
committed by Robert Nishihara
parent e56eb354eb
commit 78b6bfb7f9
8 changed files with 101 additions and 191 deletions
@@ -80,7 +80,7 @@ public abstract class RayRuntime implements RayApi {
configReader = new ConfigReader(configPath, updateConfigStr);
RayRuntime.params = new RayParameters(configReader);
RayLog.init(params.working_directory);
RayLog.init(params.log_dir);
assert RayLog.core != null;
ins = instantiate(params);
@@ -46,8 +46,8 @@ public class RayParameters {
@AConfig(comment = "driver ID when the worker is served as a driver")
public UniqueID driver_id = UniqueID.nil;
@AConfig(comment = "working directory")
public String working_directory = "./run";
@AConfig(comment = "logging directory")
public String log_dir = "/tmp/raylogs";
@AConfig(comment = "primary redis port")
public int redis_port = 34222;