Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/ray/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,7 @@ def start_raylet(redis_address,
"--java_worker_command={}".format(java_worker_command),
"--redis_password={}".format(redis_password or ""),
"--temp_dir={}".format(temp_dir),
"--session_dir={}".format(session_dir),
]
process_info = start_ray_process(
command,
Expand Down
3 changes: 3 additions & 0 deletions src/ray/raylet/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ DEFINE_string(python_worker_command, "", "Python worker command.");
DEFINE_string(java_worker_command, "", "Java worker command.");
DEFINE_string(redis_password, "", "The password of redis.");
DEFINE_string(temp_dir, "", "Temporary directory.");
DEFINE_string(session_dir, "", "The path of this ray session directory.");
DEFINE_bool(disable_stats, false, "Whether disable the stats.");
DEFINE_string(stat_address, "127.0.0.1:8888", "The address that we report metrics to.");
DEFINE_bool(enable_stdout_exporter, false,
Expand Down Expand Up @@ -61,6 +62,7 @@ int main(int argc, char *argv[]) {
const std::string java_worker_command = FLAGS_java_worker_command;
const std::string redis_password = FLAGS_redis_password;
const std::string temp_dir = FLAGS_temp_dir;
const std::string session_dir = FLAGS_session_dir;
const bool disable_stats = FLAGS_disable_stats;
const std::string stat_address = FLAGS_stat_address;
const bool enable_stdout_exporter = FLAGS_enable_stdout_exporter;
Expand Down Expand Up @@ -132,6 +134,7 @@ int main(int argc, char *argv[]) {
node_manager_config.max_lineage_size = RayConfig::instance().max_lineage_size();
node_manager_config.store_socket_name = store_socket_name;
node_manager_config.temp_dir = temp_dir;
node_manager_config.session_dir = session_dir;

// Configuration for the object manager.
ray::ObjectManagerConfig object_manager_config;
Expand Down
3 changes: 2 additions & 1 deletion src/ray/raylet/node_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2334,7 +2334,8 @@ void NodeManager::ForwardTask(

void NodeManager::DumpDebugState() const {
std::fstream fs;
fs.open(temp_dir_ + "/debug_state.txt", std::fstream::out | std::fstream::trunc);
fs.open(initial_config_.session_dir + "/debug_state.txt",
std::fstream::out | std::fstream::trunc);
fs << DebugString();
fs.close();
}
Expand Down
2 changes: 2 additions & 0 deletions src/ray/raylet/node_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ struct NodeManagerConfig {
std::string store_socket_name;
/// The path to the ray temp dir.
std::string temp_dir;
/// The path of this ray session dir.
std::string session_dir;
};

class NodeManager {
Expand Down