From 2455de78cef4163ec603b12fe79c313076073419 Mon Sep 17 00:00:00 2001 From: Alexey Tumanov Date: Thu, 13 Dec 2018 20:39:42 -0800 Subject: [PATCH] save initial config instead of initial resource config (#3532) --- src/ray/raylet/node_manager.cc | 6 +++--- src/ray/raylet/node_manager.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ray/raylet/node_manager.cc b/src/ray/raylet/node_manager.cc index aa49bcd3b..ea8baa1ad 100644 --- a/src/ray/raylet/node_manager.cc +++ b/src/ray/raylet/node_manager.cc @@ -55,7 +55,7 @@ NodeManager::NodeManager(boost::asio::io_service &io_service, debug_dump_period_(config.debug_dump_period_ms), temp_dir_(config.temp_dir), object_manager_profile_timer_(io_service), - local_resources_(config.resource_config), + initial_config_(config), local_available_resources_(config.resource_config), worker_pool_(config.num_initial_workers, config.num_workers_per_process, config.maximum_startup_concurrency, config.worker_commands), @@ -332,7 +332,7 @@ void NodeManager::ClientAdded(const ClientTableDataT &client_data) { if (client_id == gcs_client_->client_table().GetLocalClientId()) { // We got a notification for ourselves, so we are connected to the GCS now. // Save this NodeManager's resource information in the cluster resource map. - cluster_resource_map_[client_id] = local_resources_; + cluster_resource_map_[client_id] = initial_config_.resource_config; return; } @@ -1778,7 +1778,7 @@ std::string NodeManager::DebugString() const { std::stringstream result; uint64_t now_ms = current_time_ms(); result << "NodeManager:"; - result << "\nLocalResources: " << local_resources_.DebugString(); + result << "\nInitialConfigResources: " << initial_config_.resource_config.ToString(); result << "\nClusterResources:"; for (auto &pair : cluster_resource_map_) { result << "\n" << pair.first.hex() << ": " << pair.second.DebugString(); diff --git a/src/ray/raylet/node_manager.h b/src/ray/raylet/node_manager.h index 7fd820a5e..fd73ddec4 100644 --- a/src/ray/raylet/node_manager.h +++ b/src/ray/raylet/node_manager.h @@ -389,8 +389,8 @@ class NodeManager { uint64_t last_heartbeat_at_ms_; /// The time that the last debug string was logged to the console. uint64_t last_debug_dump_at_ms_; - /// The resources local to this node. - const SchedulingResources local_resources_; + /// Initial node manager configuration. + const NodeManagerConfig initial_config_; /// The resources (and specific resource IDs) that are currently available. ResourceIdSet local_available_resources_; std::unordered_map cluster_resource_map_;