Rename UpdateResource due to conflict with Windows (#6205)

* Rename UpdateResource due to conflict with Windows

* Rename UpdateResource_ to UpdateResourceCapacity
This commit is contained in:
mehrdadn
2019-11-20 20:44:13 -08:00
committed by Edward Oakes
parent c0be9e6738
commit 95bf977839
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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 &current_capacity =
resources_total_.GetResource(resource_name);
+1 -1
View File
@@ -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.
///
+1 -1
View File
@@ -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);