You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2018/07/23 17:19:24 UTC

mesos git commit: Document SUPPRESS HTTP call [MESOS-7211].

Repository: mesos
Updated Branches:
  refs/heads/master 9af920c75 -> a7638a833


Document SUPPRESS HTTP call [MESOS-7211].

This closes #301


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

Branch: refs/heads/master
Commit: a7638a833acd82d5ccffff4f1d374b1867510c76
Parents: 9af920c
Author: Thodoris Zois <th...@gmail.com>
Authored: Mon Jul 23 10:19:01 2018 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Mon Jul 23 10:19:01 2018 -0700

----------------------------------------------------------------------
 docs/scheduler-http-api.md | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a7638a83/docs/scheduler-http-api.md
----------------------------------------------------------------------
diff --git a/docs/scheduler-http-api.md b/docs/scheduler-http-api.md
index 3d7d789..79370ec 100644
--- a/docs/scheduler-http-api.md
+++ b/docs/scheduler-http-api.md
@@ -484,6 +484,32 @@ HTTP/1.1 202 Accepted
 
 ```
 
+### SUPPRESS
+Sent by the scheduler when it doesn't need offers for a given set of its roles. When Mesos master receives this request, it will stop sending offers for the given set of roles to the framework. As a special case, if roles are not specified, all subscribed roles of this framework are suppressed.
+
+Note that master continues to send offers to other subscribed roles of this framework that are not suppressed. Also, status updates about tasks, executors and agents are not affected by this call. 
+
+If the scheduler wishes to receive offers for the suppressed roles again (e.g., it needs to schedule new workloads), it can send `REVIVE` call.
+
+```
+SUPPRESS Request (JSON):
+POST /api/v1/scheduler  HTTP/1.1
+
+Host: masterhost:5050
+Content-Type: application/json
+Mesos-Stream-Id: 130ae4e3-6b13-4ef4-baa9-9f2e85c3e9af
+
+{
+  "framework_id" : {"value" : "12220-3440-12532-2345"},
+  "type"         : "SUPPRESS",
+  "suppress"     : {"roles": <an-array-of-strings>}
+}
+
+SUPPRESS Response:
+HTTP/1.1 202 Accepted
+
+```
+
 ## Events
 
 Schedulers are expected to keep a **persistent** connection to the "/scheduler" endpoint (even after getting a `SUBSCRIBED` HTTP Response event). This is indicated by the "Connection: keep-alive" and "Transfer-Encoding: chunked" headers with *no* "Content-Length" header set. All subsequent events that are relevant to this framework generated by Mesos are streamed on this connection. The master encodes each Event in RecordIO format, i.e., string representation of the length of the event in bytes followed by JSON or binary Protobuf (possibly compressed) encoded event. The length of an event is a 64-bit unsigned integer (encoded as a textual value) and will never be "0". Also, note that the RecordIO encoding should be decoded by the scheduler whereas the underlying HTTP chunked encoding is typically invisible at the application (scheduler) layer. The type of content encoding used for the events will be determined by the accept header of the POST request (e.g., Accept: application/json)
 .