You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2017/07/12 00:15:44 UTC
mesos git commit: Renamed 'resources' to 'allocatedResources' in
master::Role.
Repository: mesos
Updated Branches:
refs/heads/master 6b42c5fdf -> 4fe22dd33
Renamed 'resources' to 'allocatedResources' in master::Role.
This method collects resources allocated to the particular role.
It's more precise to rename it as such.
Review: https://reviews.apache.org/r/60423/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/4fe22dd3
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/4fe22dd3
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/4fe22dd3
Branch: refs/heads/master
Commit: 4fe22dd337680b49043d020602afc7d518a97245
Parents: 6b42c5f
Author: Jay Guo <gu...@gmail.com>
Authored: Tue Jul 11 17:14:45 2017 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Jul 11 17:14:45 2017 -0700
----------------------------------------------------------------------
src/master/http.cpp | 4 ++--
src/master/master.hpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/4fe22dd3/src/master/http.cpp
----------------------------------------------------------------------
diff --git a/src/master/http.cpp b/src/master/http.cpp
index 69f7561..948aa11 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -3408,7 +3408,7 @@ JSON::Object model(
} else {
Role* role = _role.get();
- object.values["resources"] = model(role->resources());
+ object.values["resources"] = model(role->allocatedResources());
{
JSON::Array array;
@@ -3643,7 +3643,7 @@ Future<Response> Master::Http::getRoles(
if (master->roles.contains(name)) {
Role* role_ = master->roles.at(name);
- role.mutable_resources()->CopyFrom(role_->resources());
+ role.mutable_resources()->CopyFrom(role_->allocatedResources());
foreachkey (const FrameworkID& frameworkId, role_->frameworks) {
role.add_frameworks()->CopyFrom(frameworkId);
http://git-wip-us.apache.org/repos/asf/mesos/blob/4fe22dd3/src/master/master.hpp
----------------------------------------------------------------------
diff --git a/src/master/master.hpp b/src/master/master.hpp
index 28b384c..84465af 100644
--- a/src/master/master.hpp
+++ b/src/master/master.hpp
@@ -2883,7 +2883,7 @@ struct Role
frameworks.erase(framework->id());
}
- Resources resources() const
+ Resources allocatedResources() const
{
Resources resources;