diff --git a/src/ray/gcs/tables.cc b/src/ray/gcs/tables.cc index c8ef17d46..81b1f0863 100644 --- a/src/ray/gcs/tables.cc +++ b/src/ray/gcs/tables.cc @@ -238,7 +238,7 @@ void ClientTable::HandleNotification(AsyncGcsClient *client, if (!entry->second.is_insertion) { RAY_CHECK(!data.is_insertion) << "Notification for addition of a client that was already removed:" - << client_id.hex(); + << client_id; } } @@ -262,8 +262,8 @@ void ClientTable::HandleNotification(AsyncGcsClient *client, void ClientTable::HandleConnected(AsyncGcsClient *client, const std::shared_ptr data) { auto connected_client_id = ClientID::from_binary(data->client_id); - RAY_CHECK(client_id_ == connected_client_id) << connected_client_id.hex() << " " - << client_id_.hex(); + RAY_CHECK(client_id_ == connected_client_id) << connected_client_id << " " + << client_id_; } const ClientID &ClientTable::GetLocalClientId() { return client_id_; } diff --git a/src/ray/raylet/mock_gcs_client.cc b/src/ray/raylet/mock_gcs_client.cc index f41ca80bc..c8c370227 100644 --- a/src/ray/raylet/mock_gcs_client.cc +++ b/src/ray/raylet/mock_gcs_client.cc @@ -8,7 +8,7 @@ namespace ray { ray::Status ObjectTable::GetObjectClientIDs(const ray::ObjectID &object_id, const ClientIDsCallback &success, const FailCallback &fail) { - RAY_LOG(DEBUG) << "GetObjectClientIDs " << object_id.hex(); + RAY_LOG(DEBUG) << "GetObjectClientIDs " << object_id; if (client_lookup.count(object_id) > 0) { if (!client_lookup[object_id].empty()) { std::vector v; @@ -30,12 +30,12 @@ ray::Status ObjectTable::GetObjectClientIDs(const ray::ObjectID &object_id, ray::Status ObjectTable::Add(const ObjectID &object_id, const ClientID &client_id, const DoneCallback &done_callback) { if (client_lookup.count(object_id) == 0) { - RAY_LOG(DEBUG) << "Add ObjectID set " << object_id.hex(); + RAY_LOG(DEBUG) << "Add ObjectID set " << object_id; client_lookup[object_id] = std::unordered_set(); } else if (client_lookup[object_id].count(client_id) != 0) { return ray::Status::KeyError("ClientID already exists."); } - RAY_LOG(DEBUG) << "Insert ClientID " << client_id.hex(); + RAY_LOG(DEBUG) << "Insert ClientID " << client_id; client_lookup[object_id].insert(client_id); done_callback(); return ray::Status::OK(); diff --git a/src/ray/raylet/node_manager.cc b/src/ray/raylet/node_manager.cc index 722fc98b5..08d7d0983 100644 --- a/src/ray/raylet/node_manager.cc +++ b/src/ray/raylet/node_manager.cc @@ -141,7 +141,7 @@ void NodeManager::Heartbeat() { void NodeManager::ClientAdded(const ClientTableDataT &client_data) { ClientID client_id = ClientID::from_binary(client_data.client_id); - RAY_LOG(DEBUG) << "[ClientAdded] received callback from client id " << client_id.hex(); + RAY_LOG(DEBUG) << "[ClientAdded] received callback from client id " << client_id; 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. @@ -152,12 +152,12 @@ void NodeManager::ClientAdded(const ClientTableDataT &client_data) { // TODO(atumanov): make remote client lookup O(1) if (std::find(remote_clients_.begin(), remote_clients_.end(), client_id) == remote_clients_.end()) { - RAY_LOG(DEBUG) << "a new client: " << client_id.hex(); + RAY_LOG(DEBUG) << "a new client: " << client_id; remote_clients_.push_back(client_id); } else { // NodeManager connection to this client was already established. RAY_LOG(DEBUG) << "received a new client connection that already exists: " - << client_id.hex(); + << client_id; return; } @@ -180,8 +180,7 @@ void NodeManager::ClientAdded(const ClientTableDataT &client_data) { void NodeManager::HeartbeatAdded(gcs::AsyncGcsClient *client, const ClientID &client_id, const HeartbeatTableDataT &heartbeat_data) { - RAY_LOG(DEBUG) << "[HeartbeatAdded]: received heartbeat from client id " - << client_id.hex(); + RAY_LOG(DEBUG) << "[HeartbeatAdded]: received heartbeat from client id " << client_id; if (client_id == gcs_client_->client_table().GetLocalClientId()) { // Skip heartbeats from self. return; @@ -191,7 +190,7 @@ void NodeManager::HeartbeatAdded(gcs::AsyncGcsClient *client, const ClientID &cl if (this->cluster_resource_map_.count(client_id) == 0) { // Haven't received the client registration for this client yet, skip this heartbeat. RAY_LOG(INFO) << "[HeartbeatAdded]: received heartbeat from unknown client id " - << client_id.hex(); + << client_id; return; } SchedulingResources &resources = this->cluster_resource_map_[client_id]; @@ -317,7 +316,7 @@ void NodeManager::ProcessClientMessage(std::shared_ptr cl // TODO(hme): handle multiple object ids. auto message = flatbuffers::GetRoot(message_data); ObjectID object_id = from_flatbuf(*message->object_id()); - RAY_LOG(DEBUG) << "reconstructing object " << object_id.hex(); + RAY_LOG(DEBUG) << "reconstructing object " << object_id; RAY_CHECK_OK(object_manager_.Pull(object_id)); } break; @@ -369,7 +368,7 @@ void NodeManager::ScheduleTasks() { for (const auto &pair : policy_decision) { TaskID task_id = pair.first; ClientID client_id = pair.second; - RAY_LOG(DEBUG) << task_id.hex() << " --> " << client_id.hex(); + RAY_LOG(DEBUG) << task_id << " --> " << client_id; } // Extract decision for this local scheduler. @@ -598,8 +597,7 @@ ray::Status NodeManager::ForwardTask(const Task &task, const ClientID &node_id) auto request = uncommitted_lineage.ToFlatbuffer(fbb, task_id); fbb.Finish(request); - RAY_LOG(DEBUG) << "Forwarding task " << task_id.hex() << " to " << node_id.hex() - << " spillback=" + RAY_LOG(DEBUG) << "Forwarding task " << task_id << " to " << node_id << " spillback=" << lineage_cache_entry_task.GetTaskExecutionSpec().NumForwards(); auto client_info = gcs_client_->client_table().GetClient(node_id); @@ -607,8 +605,7 @@ ray::Status NodeManager::ForwardTask(const Task &task, const ClientID &node_id) // Lookup remote server connection for this node_id and use it to send the request. if (remote_server_connections_.count(node_id) == 0) { // TODO(atumanov): caller must handle failure to ensure tasks are not lost. - RAY_LOG(INFO) << "No NodeManager connection found for GCS client id " - << node_id.hex(); + RAY_LOG(INFO) << "No NodeManager connection found for GCS client id " << node_id; return ray::Status::IOError("NodeManager connection not found"); } @@ -623,8 +620,8 @@ ray::Status NodeManager::ForwardTask(const Task &task, const ClientID &node_id) } else { // TODO(atumanov): caller must handle ForwardTask failure to ensure tasks are not // lost. - RAY_LOG(FATAL) << "[NodeManager][ForwardTask] failed to forward task " - << task_id.hex() << " to node " << node_id.hex(); + RAY_LOG(FATAL) << "[NodeManager][ForwardTask] failed to forward task " << task_id + << " to node " << node_id; } return status; } diff --git a/src/ray/raylet/task_dependency_manager.cc b/src/ray/raylet/task_dependency_manager.cc index d034fb6db..9294d4e1a 100644 --- a/src/ray/raylet/task_dependency_manager.cc +++ b/src/ray/raylet/task_dependency_manager.cc @@ -31,7 +31,7 @@ bool TaskDependencyManager::argumentsReady(const std::vector arguments } void TaskDependencyManager::handleObjectReady(const ray::ObjectID &object_id) { - RAY_LOG(DEBUG) << "object ready " << object_id.hex(); + RAY_LOG(DEBUG) << "object ready " << object_id; // Add the object to the table of locally available objects. RAY_CHECK(local_objects_.count(object_id) == 0); local_objects_.insert(object_id);