This is an automated email from the ASF dual-hosted git repository. qianzhang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mesos.git
commit f0ccee1572e434815d524ef6bd3c3b75a4fffdb4 Author: Qian Zhang <[email protected]> AuthorDate: Fri Jan 3 16:31:02 2020 +0800 Added resource limits into the `Task` protobuf message. Review: https://reviews.apache.org/r/71951 --- include/mesos/mesos.proto | 3 +++ include/mesos/v1/mesos.proto | 3 +++ src/common/protobuf_utils.cpp | 1 + 3 files changed, 7 insertions(+) diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto index 40c45de..6dba47e 100644 --- a/include/mesos/mesos.proto +++ b/include/mesos/mesos.proto @@ -2362,6 +2362,9 @@ message Task { // Specific user under which task is running. optional string user = 14; + + // Resource limits associated with the task. + map<string, Value.Scalar> limits = 17; } diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto index 6387636..e96f51f 100644 --- a/include/mesos/v1/mesos.proto +++ b/include/mesos/v1/mesos.proto @@ -2351,6 +2351,9 @@ message Task { // Specific user under which task is running. optional string user = 14; + + // Resource limits associated with the task. + map<string, Value.Scalar> limits = 17; } diff --git a/src/common/protobuf_utils.cpp b/src/common/protobuf_utils.cpp index b3057be..723d85a 100644 --- a/src/common/protobuf_utils.cpp +++ b/src/common/protobuf_utils.cpp @@ -395,6 +395,7 @@ Task createTask( t.mutable_task_id()->CopyFrom(task.task_id()); t.mutable_slave_id()->CopyFrom(task.slave_id()); t.mutable_resources()->CopyFrom(task.resources()); + *t.mutable_limits() = task.limits(); if (task.has_executor()) { t.mutable_executor_id()->CopyFrom(task.executor().executor_id());
