Repository: mesos
Updated Branches:
  refs/heads/master 1f571b347 -> a6157150f


Introduced Resource.AllocationInfo.

To determine which role resources are allocated to, we now need to
store allocation information within the Resources. This is part of
the effort to support multi-role frameworks. See MESOS-6633 for more
details.

Review: https://reviews.apache.org/r/54197/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a6157150
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a6157150
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a6157150

Branch: refs/heads/master
Commit: a6157150fe44b738d18943c9fcb003fbb9319303
Parents: 1f571b3
Author: Jay Guo <guojian...@cn.ibm.com>
Authored: Thu Dec 1 15:07:15 2016 -0800
Committer: Benjamin Mahler <bmah...@apache.org>
Committed: Thu Dec 1 15:08:54 2016 -0800

----------------------------------------------------------------------
 include/mesos/mesos.proto    | 18 ++++++++++++++++++
 include/mesos/v1/mesos.proto | 18 ++++++++++++++++++
 2 files changed, 36 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a6157150/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index e6953ef..5981cb8 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -789,6 +789,24 @@ message Resource {
   // be offered to frameworks that belong to this role.
   optional string role = 6 [default = "*"];
 
+  // This was initially introduced to support MULTI_ROLE capable
+  // frameworks. Frameworks that are not MULTI_ROLE capable can
+  // continue to assume that the offered resources are allocated
+  // to their role.
+  //
+  // NOTE: Implementation of this is in-progress, DO NOT USE!
+  message AllocationInfo {
+    // If set, this resource is allocated to a role. Note that in the
+    // future, this may be unset and the scheduler may be responsible
+    // for allocating to one of its roles.
+    optional string role = 1;
+
+    // In the future, we may add additional fields here, e.g. priority
+    // tier, type of allocation (quota / fair share).
+  }
+
+  optional AllocationInfo allocation_info = 11;
+
   message ReservationInfo {
     // Describes a dynamic reservation. A dynamic reservation is
     // acquired by an operator via the '/reserve' HTTP endpoint or by

http://git-wip-us.apache.org/repos/asf/mesos/blob/a6157150/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index ae0fab0..a560ed3 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -783,6 +783,24 @@ message Resource {
   // be offered to frameworks that belong to this role.
   optional string role = 6 [default = "*"];
 
+  // This was initially introduced to support MULTI_ROLE capable
+  // frameworks. Frameworks that are not MULTI_ROLE capable can
+  // continue to assume that the offered resources are allocated
+  // to their role.
+  //
+  // NOTE: Implementation of this is in-progress, DO NOT USE!
+  message AllocationInfo {
+    // If set, this resource is allocated to a role. Note that in the
+    // future, this may be unset and the scheduler may be responsible
+    // for allocating to one of its roles.
+    optional string role = 1;
+
+    // In the future, we may add additional fields here, e.g. priority
+    // tier, type of allocation (quota / fair share).
+  }
+
+  optional AllocationInfo allocation_info = 11;
+
   message ReservationInfo {
     // Describes a dynamic reservation. A dynamic reservation is
     // acquired by an operator via the '/reserve' HTTP endpoint or by

Reply via email to