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/12/08 04:44:02 UTC
[2/4] mesos git commit: Added the `OfferOperationStatusUpdateRecord`
protobuf message.
Added the `OfferOperationStatusUpdateRecord` protobuf message.
This protobuf message is used to checkpoint offer operation status
updates and acknowledgments.
Review: https://reviews.apache.org/r/64094/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/680ccee6
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/680ccee6
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/680ccee6
Branch: refs/heads/master
Commit: 680ccee60c29747a1e929e4b7bb8dbed52162222
Parents: 06209e6
Author: Gaston Kleiman <ga...@mesosphere.io>
Authored: Thu Dec 7 19:59:48 2017 -0800
Committer: Greg Mann <gr...@gmail.com>
Committed: Thu Dec 7 20:42:13 2017 -0800
----------------------------------------------------------------------
src/messages/messages.cpp | 10 ++++++++++
src/messages/messages.hpp | 5 +++++
src/messages/messages.proto | 21 +++++++++++++++++++++
3 files changed, 36 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/680ccee6/src/messages/messages.cpp
----------------------------------------------------------------------
diff --git a/src/messages/messages.cpp b/src/messages/messages.cpp
index 47f7dee..56876f2 100644
--- a/src/messages/messages.cpp
+++ b/src/messages/messages.cpp
@@ -160,5 +160,15 @@ ostream& operator<<(ostream& stream, const StatusUpdateRecord::Type& type)
<< StatusUpdateRecord::Type_descriptor()->FindValueByNumber(type)->name();
}
+
+ostream& operator<<(
+ ostream& stream,
+ const OfferOperationStatusUpdateRecord::Type& type)
+{
+ return stream << OfferOperationStatusUpdateRecord::Type_descriptor()
+ ->FindValueByNumber(type)
+ ->name();
+}
+
} // namespace internal {
} // namespace mesos {
http://git-wip-us.apache.org/repos/asf/mesos/blob/680ccee6/src/messages/messages.hpp
----------------------------------------------------------------------
diff --git a/src/messages/messages.hpp b/src/messages/messages.hpp
index 60b1065..8e42893 100644
--- a/src/messages/messages.hpp
+++ b/src/messages/messages.hpp
@@ -67,6 +67,11 @@ std::ostream& operator<<(
std::ostream& stream,
const StatusUpdateRecord::Type& type);
+
+std::ostream& operator<<(
+ std::ostream& stream,
+ const OfferOperationStatusUpdateRecord::Type& type);
+
} // namespace internal {
} // namespace mesos {
http://git-wip-us.apache.org/repos/asf/mesos/blob/680ccee6/src/messages/messages.proto
----------------------------------------------------------------------
diff --git a/src/messages/messages.proto b/src/messages/messages.proto
index 7ab07d7..1a70967 100644
--- a/src/messages/messages.proto
+++ b/src/messages/messages.proto
@@ -753,6 +753,27 @@ message OfferOperationStatusUpdate {
/**
+ * Encapsulates how we checkpoint an `OfferOperationStatusUpdate` to disk.
+ *
+ * See the `OfferOperationStatusUpdateManager`.
+ */
+message OfferOperationStatusUpdateRecord {
+ enum Type {
+ UPDATE = 0;
+ ACK = 1;
+ }
+
+ required Type type = 1;
+
+ // Required if type == UPDATE.
+ optional OfferOperationStatusUpdate update = 2;
+
+ // Required if type == ACK.
+ optional bytes uuid = 3;
+}
+
+
+/**
* This message is sent from the master to the resource provider
* manager (either on the agent for local resource providers, or on
* the master for external resource providers) to apply an offer