From 95bf977839e006e2394ab381ae93cdc55628f9ca Mon Sep 17 00:00:00 2001 From: mehrdadn Date: Wed, 20 Nov 2019 20:44:13 -0800 Subject: [PATCH] Rename UpdateResource due to conflict with Windows (#6205) * Rename UpdateResource due to conflict with Windows * Rename UpdateResource_ to UpdateResourceCapacity --- src/ray/common/task/scheduling_resources.cc | 4 ++-- src/ray/common/task/scheduling_resources.h | 2 +- src/ray/raylet/node_manager.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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);