Repository: mesos
Updated Branches:
  refs/heads/master 868ec364b -> 0dcf5c7f0


Added `max_completion_time` to `TaskInfo` and new reason.

This new field can be used support tasks which have a maximum duration
scheduling requirement. The new reason is added to distinguish from
normal task kills.

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


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

Branch: refs/heads/master
Commit: 835f52bfdd0951ec731c19e084a5bc0ab58a287e
Parents: 868ec36
Author: Zhitao Li <zhitaoli...@gmail.com>
Authored: Thu May 3 08:33:04 2018 -0700
Committer: James Peach <jpe...@apache.org>
Committed: Thu May 3 08:33:04 2018 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/835f52bf/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 5bc4a80..a61de9d 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -2111,6 +2111,14 @@ message TaskInfo {
   // to use this information as needed and to handle tasks without
   // service discovery information.
   optional DiscoveryInfo discovery = 11;
+
+  // Maximum duration for task completion. If the task is non-terminal at the
+  // end of this duration, it will fail with the reason
+  // `REASON_MAX_COMPLETION_TIME_REACHED`. Mesos supports this field for
+  // executor-less tasks, and tasks that use Docker or default executors.
+  // It is the executor's responsibility to implement this, so it might not be
+  // supported by all custom executors.
+  optional DurationInfo max_completion_time = 14;
 }
 
 
@@ -2443,6 +2451,7 @@ message TaskStatus {
     REASON_CONTAINER_LIMITATION_MEMORY = 8;
     REASON_CONTAINER_PREEMPTED = 17;
     REASON_CONTAINER_UPDATE_FAILED = 22;
+    REASON_MAX_COMPLETION_TIME_REACHED = 33;
     REASON_EXECUTOR_REGISTRATION_TIMEOUT = 23;
     REASON_EXECUTOR_REREGISTRATION_TIMEOUT = 24;
     REASON_EXECUTOR_TERMINATED = 1;

http://git-wip-us.apache.org/repos/asf/mesos/blob/835f52bf/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index 5a4e733..317d9ef 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -2103,6 +2103,14 @@ message TaskInfo {
   // to use this information as needed and to handle tasks without
   // service discovery information.
   optional DiscoveryInfo discovery = 11;
+
+  // Maximum duration for task completion. If the task is non-terminal at the
+  // end of this duration, it will fail with the reason
+  // `REASON_MAX_COMPLETION_TIME_REACHED`. Mesos supports this field for
+  // executor-less tasks, and tasks that use Docker or default executors.
+  // It is the executor's responsibility to implement this, so it might not be
+  // supported by all custom executors.
+  optional DurationInfo max_completion_time = 14;
 }
 
 
@@ -2435,6 +2443,7 @@ message TaskStatus {
     REASON_CONTAINER_LIMITATION_MEMORY = 8;
     REASON_CONTAINER_PREEMPTED = 17;
     REASON_CONTAINER_UPDATE_FAILED = 22;
+    REASON_MAX_COMPLETION_TIME_REACHED = 33;
     REASON_EXECUTOR_REGISTRATION_TIMEOUT = 23;
     REASON_EXECUTOR_REREGISTRATION_TIMEOUT = 24;
     REASON_EXECUTOR_TERMINATED = 1;

Reply via email to