You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by me...@apache.org on 2016/02/19 22:39:31 UTC
mesos git commit: Documented that labels should not contain duplicate
key-value pairs.
Repository: mesos
Updated Branches:
refs/heads/master a16cd2a18 -> e12fecc3b
Documented that labels should not contain duplicate key-value pairs.
The implementation of the equality operator for `Labels` is buggy for
labels that contain duplicates. We might want to revisit fixing the
implementation of that operator (which might be expensive; MESOS-4445),
but in the short-term we should document that duplicates should not be
specified.
Review: https://reviews.apache.org/r/43616/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e12fecc3
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e12fecc3
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e12fecc3
Branch: refs/heads/master
Commit: e12fecc3b57584decbf02bec0a858af3e624a0fb
Parents: a16cd2a
Author: Neil Conway <ne...@gmail.com>
Authored: Fri Feb 19 13:37:18 2016 -0800
Committer: Adam B <ad...@mesosphere.io>
Committed: Fri Feb 19 13:37:18 2016 -0800
----------------------------------------------------------------------
include/mesos/mesos.proto | 10 +++++++---
include/mesos/v1/mesos.proto | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/e12fecc3/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 636550f..a27c505 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -275,6 +275,7 @@ message FrameworkInfo {
// Labels are free-form key value pairs supplied by the framework
// scheduler (e.g., to describe additional functionality offered by
// the framework). These labels are not interpreted by Mesos itself.
+ // Labels should not contain duplicate key-value pairs.
optional Labels labels = 11;
}
@@ -596,7 +597,8 @@ message Resource {
// associate arbitrary metadata with a reserved resource. For
// example, frameworks can use labels to identify the intended
// purpose for a portion of the resources the framework has
- // reserved at a given slave.
+ // reserved at a given slave. Labels should not contain duplicate
+ // key-value pairs.
optional Labels labels = 2;
}
@@ -1194,6 +1196,7 @@ message TaskInfo {
// acted upon by Mesos itself. As opposed to the data field, labels
// will be kept in memory on master and slave processes. Therefore,
// labels should be used to tag tasks with light-weight meta-data.
+ // Labels should not contain duplicate key-value pairs.
optional Labels labels = 10;
// Service discovery information for the task. It is not interpreted
@@ -1301,7 +1304,7 @@ message TaskStatus {
// acted upon by Mesos itself. As opposed to the data field, labels
// will be kept in memory on master and slave processes. Therefore,
// labels should be used to tag TaskStatus message with light-weight
- // meta-data.
+ // meta-data. Labels should not contain duplicate key-value pairs.
optional Labels labels = 12;
// Container related information that is resolved dynamically such as
@@ -1690,7 +1693,8 @@ message CgroupInfo {
/**
- * Collection of labels.
+ * Collection of labels. Labels should not contain duplicate key-value
+ * pairs.
*/
message Labels {
repeated Label labels = 1;
http://git-wip-us.apache.org/repos/asf/mesos/blob/e12fecc3/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index 1d5af88..e4224af 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -275,6 +275,7 @@ message FrameworkInfo {
// Labels are free-form key value pairs supplied by the framework
// scheduler (e.g., to describe additional functionality offered by
// the framework). These labels are not interpreted by Mesos itself.
+ // Labels should not contain duplicate key-value pairs.
optional Labels labels = 11;
}
@@ -593,7 +594,8 @@ message Resource {
// associate arbitrary metadata with a reserved resource. For
// example, frameworks can use labels to identify the intended
// purpose for a portion of the resources the framework has
- // reserved at a given agent.
+ // reserved at a given agent. Labels should not contain duplicate
+ // key-value pairs.
optional Labels labels = 2;
}
@@ -1095,6 +1097,7 @@ message TaskInfo {
// acted upon by Mesos itself. As opposed to the data field, labels
// will be kept in memory on master and agent processes. Therefore,
// labels should be used to tag tasks with light-weight meta-data.
+ // Labels should not contain duplicate key-value pairs.
optional Labels labels = 10;
// Service discovery information for the task. It is not interpreted
@@ -1202,7 +1205,7 @@ message TaskStatus {
// acted upon by Mesos itself. As opposed to the data field, labels
// will be kept in memory on master and agent processes. Therefore,
// labels should be used to tag TaskStatus message with light-weight
- // meta-data.
+ // meta-data. Labels should not contain duplicate key-value pairs.
optional Labels labels = 12;
// Container related information that is resolved dynamically such as
@@ -1591,7 +1594,8 @@ message CgroupInfo {
/**
- * Collection of labels.
+ * Collection of labels. Labels should not contain duplicate key-value
+ * pairs.
*/
message Labels {
repeated Label labels = 1;