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 2015/03/04 20:51:45 UTC

[1/2] mesos git commit: Fixed a regression of replicated log logging.

Repository: mesos
Updated Branches:
  refs/heads/master d9ba9199a -> 9d8658959


Fixed a regression of replicated log logging.

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


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

Branch: refs/heads/master
Commit: 63b56e3de653f53d2406fa398915345f02f44a5d
Parents: d9ba919
Author: Jie Yu <yu...@gmail.com>
Authored: Wed Mar 4 10:13:33 2015 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Mar 4 11:51:16 2015 -0800

----------------------------------------------------------------------
 src/messages/log.hpp      | 29 +++++++++++++++++++++++++++++
 src/messages/messages.hpp | 21 +--------------------
 2 files changed, 30 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/63b56e3d/src/messages/log.hpp
----------------------------------------------------------------------
diff --git a/src/messages/log.hpp b/src/messages/log.hpp
index b9c1dab..4ddf35f 100644
--- a/src/messages/log.hpp
+++ b/src/messages/log.hpp
@@ -19,6 +19,35 @@
 #ifndef __MESSAGES_LOG_HPP__
 #define __MESSAGES_LOG_HPP__
 
+#include <ostream>
+
 #include "messages/log.pb.h"
 
+
+// Definitions for operators on protobuf classes that don't have these
+// operators generated by the protobuf compiler.
+
+namespace mesos {
+namespace internal {
+namespace log {
+
+inline std::ostream& operator << (
+    std::ostream& stream,
+    const Action::Type& type)
+{
+  return stream << Action::Type_Name(type);
+}
+
+
+inline std::ostream& operator << (
+    std::ostream& stream,
+    const Metadata::Status& status)
+{
+  return stream << Metadata::Status_Name(status);
+}
+
+} // namespace log {
+} // namespace internal {
+} // namespace mesos {
+
 #endif // __MESSAGES_LOG_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/63b56e3d/src/messages/messages.hpp
----------------------------------------------------------------------
diff --git a/src/messages/messages.hpp b/src/messages/messages.hpp
index 4333b90..f7afcf7 100644
--- a/src/messages/messages.hpp
+++ b/src/messages/messages.hpp
@@ -23,12 +23,12 @@
 
 #include <google/protobuf/io/zero_copy_stream_impl.h> // For ArrayInputStream.
 
+#include <ostream>
 #include <string>
 
 #include <stout/error.hpp>
 #include <stout/try.hpp>
 
-#include "messages/log.hpp"
 #include "messages/messages.pb.h"
 
 namespace messages {
@@ -83,25 +83,6 @@ inline std::ostream& operator << (
     << StatusUpdateRecord::Type_descriptor()->FindValueByNumber(type)->name();
 }
 
-
-namespace log {
-
-inline std::ostream& operator << (
-    std::ostream& stream,
-    const Action::Type& type)
-{
-  return stream << Action::Type_Name(type);
-}
-
-
-inline std::ostream& operator << (
-    std::ostream& stream,
-    const Metadata::Status& status)
-{
-  return stream << Metadata::Status_Name(status);
-}
-
-} // namespace log {
 } // namespace internal {
 } // namespace mesos {
 


[2/2] mesos git commit: Fixed a bug in the log benchmark tool.

Posted by ji...@apache.org.
Fixed a bug in the log benchmark tool.

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


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

Branch: refs/heads/master
Commit: 9d86589599deebd1a2b465e39fb9d4713d4f9377
Parents: 63b56e3
Author: Jie Yu <yu...@gmail.com>
Authored: Wed Mar 4 11:15:14 2015 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Mar 4 11:51:20 2015 -0800

----------------------------------------------------------------------
 src/log/tool/benchmark.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9d865895/src/log/tool/benchmark.cpp
----------------------------------------------------------------------
diff --git a/src/log/tool/benchmark.cpp b/src/log/tool/benchmark.cpp
index 54d7898..01e5511 100644
--- a/src/log/tool/benchmark.cpp
+++ b/src/log/tool/benchmark.cpp
@@ -241,7 +241,7 @@ Try<Nothing> Benchmark::execute(int argc, char** argv)
 
     position = writer.append(data[i]);
 
-    if (position.await(Seconds(10))) {
+    if (!position.await(Seconds(10))) {
       return Error("Failed to append: timed out");
     } else if (!position.isReady()) {
       return Error("Failed to append: " +