You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gr...@apache.org on 2017/11/21 00:54:17 UTC
[2/6] mesos git commit: Added 'ReconcileOfferOperations' response to
the scheduler API.
Added 'ReconcileOfferOperations' response to the scheduler API.
This patch adds a first-class `Response` message to the scheduler API
along with its first member, the `ReconcileOfferOperations` response
message.
Review: https://reviews.apache.org/r/63768/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f6359bd3
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f6359bd3
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f6359bd3
Branch: refs/heads/master
Commit: f6359bd3e660e6fa883bc5895ac8366715fb79f0
Parents: 056349f
Author: Greg Mann <gr...@mesosphere.io>
Authored: Mon Nov 20 16:42:28 2017 -0800
Committer: Greg Mann <gr...@gmail.com>
Committed: Mon Nov 20 16:49:10 2017 -0800
----------------------------------------------------------------------
include/mesos/scheduler/scheduler.proto | 19 +++++++++++++++++++
include/mesos/v1/scheduler/scheduler.proto | 19 +++++++++++++++++++
src/scheduler/scheduler.cpp | 5 ++---
3 files changed, 40 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/f6359bd3/include/mesos/scheduler/scheduler.proto
----------------------------------------------------------------------
diff --git a/include/mesos/scheduler/scheduler.proto b/include/mesos/scheduler/scheduler.proto
index 112f496..a7907e2 100644
--- a/include/mesos/scheduler/scheduler.proto
+++ b/include/mesos/scheduler/scheduler.proto
@@ -208,6 +208,25 @@ message Event {
/**
+ * Synchronous responses for calls made to the scheduler API.
+ */
+message Response {
+ // Each of the responses of type `FOO` corresponds to `Foo` message below.
+ enum Type {
+ UNKNOWN = 0;
+
+ RECONCILE_OFFER_OPERATIONS = 1; // See 'ReconcileOfferOperations' below.
+ }
+
+ message ReconcileOfferOperations {
+ repeated OfferOperationStatus offer_operation_statuses = 1;
+ }
+
+ optional ReconcileOfferOperations reconcile_offer_operations = 1;
+}
+
+
+/**
* Scheduler call API.
*
* Like Event, a Call is described using the standard protocol buffer
http://git-wip-us.apache.org/repos/asf/mesos/blob/f6359bd3/include/mesos/v1/scheduler/scheduler.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/scheduler/scheduler.proto b/include/mesos/v1/scheduler/scheduler.proto
index 4fa6606..e115bca 100644
--- a/include/mesos/v1/scheduler/scheduler.proto
+++ b/include/mesos/v1/scheduler/scheduler.proto
@@ -206,6 +206,25 @@ message Event {
/**
+ * Synchronous responses for calls made to the scheduler API.
+ */
+message Response {
+ // Each of the responses of type `FOO` corresponds to `Foo` message below.
+ enum Type {
+ UNKNOWN = 0;
+
+ RECONCILE_OFFER_OPERATIONS = 1; // See 'ReconcileOfferOperations' below.
+ }
+
+ message ReconcileOfferOperations {
+ repeated OfferOperationStatus offer_operation_statuses = 1;
+ }
+
+ optional ReconcileOfferOperations reconcile_offer_operations = 1;
+}
+
+
+/**
* Scheduler call API.
*
* Like Event, a Call is described using the standard protocol buffer
http://git-wip-us.apache.org/repos/asf/mesos/blob/f6359bd3/src/scheduler/scheduler.cpp
----------------------------------------------------------------------
diff --git a/src/scheduler/scheduler.cpp b/src/scheduler/scheduler.cpp
index 286a760..7294f23 100644
--- a/src/scheduler/scheduler.cpp
+++ b/src/scheduler/scheduler.cpp
@@ -121,7 +121,6 @@ using process::http::Connection;
using process::http::Pipe;
using process::http::post;
using process::http::Request;
-using process::http::Response;
using process::http::URL;
using ::recordio::Decoder;
@@ -555,7 +554,7 @@ protected:
return;
}
- Future<Response> response;
+ Future<process::http::Response> response;
if (call.type() == Call::SUBSCRIBE) {
state = SUBSCRIBING;
@@ -581,7 +580,7 @@ protected:
void __send(
const UUID& _connectionId,
const Call& call,
- const Future<Response>& response)
+ const Future<process::http::Response>& response)
{
// It is possible that we detected a new master before a response could
// be received.