You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/11/23 00:30:04 UTC
[3/3] mesos git commit: Improved log messages of offer operations.
Improved log messages of offer operations.
Review: https://reviews.apache.org/r/63799/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7d55c924
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7d55c924
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7d55c924
Branch: refs/heads/master
Commit: 7d55c9244b4b2a6f6222d65e785f99cb4c3e53aa
Parents: a8cbb32
Author: Jan Schlicht <ja...@mesosphere.io>
Authored: Wed Nov 22 16:27:03 2017 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Nov 22 16:27:42 2017 -0800
----------------------------------------------------------------------
src/resource_provider/message.hpp | 14 ++++++++++++--
src/slave/slave.cpp | 5 ++++-
2 files changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/7d55c924/src/resource_provider/message.hpp
----------------------------------------------------------------------
diff --git a/src/resource_provider/message.hpp b/src/resource_provider/message.hpp
index 05879cd..19cf08e 100644
--- a/src/resource_provider/message.hpp
+++ b/src/resource_provider/message.hpp
@@ -27,6 +27,7 @@
#include <stout/option.hpp>
#include <stout/protobuf.hpp>
#include <stout/unreachable.hpp>
+#include <stout/uuid.hpp>
#include "messages/messages.hpp"
@@ -84,9 +85,18 @@ inline std::ostream& operator<<(
CHECK_SOME(updateOfferOperationStatus);
+ Try<UUID> operationUUID =
+ UUID::fromBytes(updateOfferOperationStatus->update.operation_uuid());
+ CHECK_SOME(operationUUID);
+
return stream
- << "UPDATE_OFFER_OPERATION_STATUS: "
- << jsonify(JSON::Protobuf(updateOfferOperationStatus->update));
+ << "UPDATE_OFFER_OPERATION_STATUS: (uuid: " << operationUUID.get()
+ << ") for framework "
+ << updateOfferOperationStatus->update.framework_id()
+ << " (latest state: "
+ << updateOfferOperationStatus->update.latest_status().state()
+ << ", status update state: "
+ << updateOfferOperationStatus->update.status().state() << ")";
}
}
http://git-wip-us.apache.org/repos/asf/mesos/blob/7d55c924/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index e57c9e9..f93ff7b 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -6983,9 +6983,12 @@ void Slave::updateOfferOperation(
operation->add_statuses()->CopyFrom(status);
+ Try<UUID> operationUUID = UUID::fromBytes(operation->operation_uuid());
+ CHECK_SOME(operationUUID);
+
LOG(INFO) << "Updating the state of offer operation '"
<< operation->info().id()
- << "' (uuid: " << operation->operation_uuid()
+ << "' (uuid: " << operationUUID.get()
<< ") of framework " << operation->framework_id()
<< " (latest state: " << operation->latest_status().state()
<< ", status update state: " << status.state() << ")";