diff --git a/src/ray/common/task/scheduling_resources.cc b/src/ray/common/task/scheduling_resources.cc index 492133339..cc8dc1d95 100644 --- a/src/ray/common/task/scheduling_resources.cc +++ b/src/ray/common/task/scheduling_resources.cc @@ -762,8 +762,8 @@ void SchedulingResources::Acquire(const ResourceSet &resources) { resources_available_.SubtractResourcesStrict(resources); } -void SchedulingResources::UpdateResource(const std::string &resource_name, - int64_t capacity) { +void SchedulingResources::UpdateResourceCapacity(const std::string &resource_name, + int64_t capacity) { const FractionalResourceQuantity new_capacity = FractionalResourceQuantity(capacity); const FractionalResourceQuantity ¤t_capacity = resources_total_.GetResource(resource_name); diff --git a/src/ray/common/task/scheduling_resources.h b/src/ray/common/task/scheduling_resources.h index 4c5a7121a..cee29d2fd 100644 --- a/src/ray/common/task/scheduling_resources.h +++ b/src/ray/common/task/scheduling_resources.h @@ -506,7 +506,7 @@ class SchedulingResources { /// \param resource_name: Name of the resource to be modified /// \param capacity: New capacity of the resource. /// \return Void. - void UpdateResource(const std::string &resource_name, int64_t capacity); + void UpdateResourceCapacity(const std::string &resource_name, int64_t capacity); /// \brief Delete resource from total, available and load resources. /// diff --git a/src/ray/raylet/node_manager.cc b/src/ray/raylet/node_manager.cc index f1511327a..6c73e1bd8 100644 --- a/src/ray/raylet/node_manager.cc +++ b/src/ray/raylet/node_manager.cc @@ -568,7 +568,7 @@ void NodeManager::ResourceCreateUpdated(const ClientID &client_id, const std::string &resource_label = resource_pair.first; const double &new_resource_capacity = resource_pair.second; - cluster_schedres.UpdateResource(resource_label, new_resource_capacity); + cluster_schedres.UpdateResourceCapacity(resource_label, new_resource_capacity); if (client_id == local_client_id) { local_available_resources_.AddOrUpdateResource(resource_label, new_resource_capacity);