You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ka...@apache.org on 2016/04/18 14:22:23 UTC

[03/11] mesos git commit: Exposed log/log.hpp.

Exposed log/log.hpp.

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


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

Branch: refs/heads/master
Commit: e7f1e6b5c48e8986c50cd65e819006122dc394f8
Parents: 9be895c
Author: Kapil Arya <ka...@mesosphere.io>
Authored: Tue Apr 12 15:46:13 2016 -0400
Committer: Kapil Arya <ka...@mesosphere.io>
Committed: Sun Apr 17 23:38:26 2016 -0400

----------------------------------------------------------------------
 include/mesos/log/log.hpp                       | 237 +++++++++++++++++++
 src/Makefile.am                                 |   6 +-
 src/java/jni/org_apache_mesos_Log.cpp           |   4 +-
 .../jni/org_apache_mesos_state_LogState.cpp     |   4 +-
 src/log/log.cpp                                 |   3 +-
 src/log/log.hpp                                 | 236 ------------------
 src/log/tool/benchmark.cpp                      |   3 +-
 src/log/tool/replica.cpp                        |   3 +-
 src/state/log.cpp                               |   4 +-
 src/state/log.hpp                               |   4 +-
 src/tests/cluster.cpp                           |   4 +-
 src/tests/cluster.hpp                           |   4 +-
 src/tests/log_tests.cpp                         |   3 +-
 src/tests/registrar_tests.cpp                   |   3 +-
 src/tests/state_tests.cpp                       |   3 +-
 15 files changed, 266 insertions(+), 255 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/include/mesos/log/log.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/log/log.hpp b/include/mesos/log/log.hpp
new file mode 100644
index 0000000..4ef0e64
--- /dev/null
+++ b/include/mesos/log/log.hpp
@@ -0,0 +1,237 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef __LOG_HPP__
+#define __LOG_HPP__
+
+#include <stdint.h>
+
+#include <list>
+#include <set>
+#include <string>
+
+#include <mesos/zookeeper/authentication.hpp>
+#include <mesos/zookeeper/group.hpp>
+
+#include <process/future.hpp>
+#include <process/owned.hpp>
+#include <process/process.hpp>
+#include <process/shared.hpp>
+#include <process/timeout.hpp>
+
+#include <stout/duration.hpp>
+#include <stout/none.hpp>
+#include <stout/option.hpp>
+
+namespace mesos {
+namespace internal {
+namespace log {
+
+// Forward declarations.
+class LogProcess;
+class LogReaderProcess;
+class LogWriterProcess;
+
+
+class Log
+{
+public:
+  // Forward declarations.
+  class Reader;
+  class Writer;
+
+  class Position
+  {
+  public:
+    bool operator==(const Position& that) const
+    {
+      return value == that.value;
+    }
+
+    bool operator<(const Position& that) const
+    {
+      return value < that.value;
+    }
+
+    bool operator<=(const Position& that) const
+    {
+      return value <= that.value;
+    }
+
+    bool operator>(const Position& that) const
+    {
+      return value > that.value;
+    }
+
+    bool operator>=(const Position& that) const
+    {
+      return value >= that.value;
+    }
+
+    // Returns an "identity" off this position, useful for serializing
+    // to logs or across communication mediums.
+    std::string identity() const
+    {
+      CHECK(sizeof(value) == 8);
+      char bytes[8];
+      bytes[0] =(0xff & (value >> 56));
+      bytes[1] = (0xff & (value >> 48));
+      bytes[2] = (0xff & (value >> 40));
+      bytes[3] = (0xff & (value >> 32));
+      bytes[4] = (0xff & (value >> 24));
+      bytes[5] = (0xff & (value >> 16));
+      bytes[6] = (0xff & (value >> 8));
+      bytes[7] = (0xff & value);
+      return std::string(bytes, sizeof(bytes));
+    }
+
+  private:
+    friend class Log;
+    friend class Writer;
+    friend class LogReaderProcess;
+    friend class LogWriterProcess;
+
+    /*implicit*/ Position(uint64_t _value) : value(_value) {}
+
+    uint64_t value;
+  };
+
+  class Entry
+  {
+  public:
+    Position position;
+    std::string data;
+
+  private:
+    friend class LogReaderProcess;
+
+    Entry(const Position& _position, const std::string& _data)
+      : position(_position), data(_data) {}
+  };
+
+  class Reader
+  {
+  public:
+    explicit Reader(Log* log);
+    ~Reader();
+
+    // Returns all entries between the specified positions, unless
+    // those positions are invalid, in which case returns an error.
+    process::Future<std::list<Entry> > read(
+        const Position& from,
+        const Position& to);
+
+    // Returns the beginning position of the log from the perspective
+    // of the local replica (which may be out of date if the log has
+    // been opened and truncated while this replica was partitioned).
+    process::Future<Position> beginning();
+
+    // Returns the ending (i.e., last) position of the log from the
+    // perspective of the local replica (which may be out of date if
+    // the log has been opened and appended to while this replica was
+    // partitioned).
+    process::Future<Position> ending();
+
+  private:
+    LogReaderProcess* process;
+  };
+
+  class Writer
+  {
+  public:
+    // Creates a new writer associated with the specified log. Only
+    // one writer (local or remote) can be valid at any point in
+    // time. A writer becomes invalid if either Writer::append or
+    // Writer::truncate return None, in which case, the writer (or
+    // another writer) must be restarted.
+    explicit Writer(Log* log);
+    ~Writer();
+
+    // Attempts to get a promise (from the log's replicas) for
+    // exclusive writes, i.e., no other writer's will be able to
+    // perform append and truncate operations. Returns the ending
+    // position of the log or none if the promise to exclusively write
+    // could not be attained but may be retried.
+    process::Future<Option<Position> > start();
+
+    // Attempts to append the specified data to the log. Returns the
+    // new ending position of the log or 'none' if this writer has
+    // lost it's promise to exclusively write (which can be reacquired
+    // by invoking Writer::start).
+    process::Future<Option<Position> > append(const std::string& data);
+
+    // Attempts to truncate the log up to but not including the
+    // specificed position. Returns the new ending position of the log
+    // or 'none' if this writer has lost it's promise to exclusively
+    // write (which can be reacquired by invoking Writer::start).
+    process::Future<Option<Position> > truncate(const Position& to);
+
+  private:
+    LogWriterProcess* process;
+  };
+
+  // Creates a new replicated log that assumes the specified quorum
+  // size, is backed by a file at the specified path, and coordinates
+  // with other replicas via the set of process PIDs.
+  Log(int quorum,
+      const std::string& path,
+      const std::set<process::UPID>& pids,
+      bool autoInitialize = false);
+
+  // Creates a new replicated log that assumes the specified quorum
+  // size, is backed by a file at the specified path, and coordinates
+  // with other replicas associated with the specified ZooKeeper
+  // servers, timeout, and znode.
+  Log(int quorum,
+      const std::string& path,
+      const std::string& servers,
+      const Duration& timeout,
+      const std::string& znode,
+      const Option<zookeeper::Authentication>& auth = None(),
+      bool autoInitialize = false);
+
+  ~Log();
+
+  // Returns a position based off of the bytes recovered from
+  // Position.identity().
+  Position position(const std::string& identity) const
+  {
+    CHECK(identity.size() == 8);
+    const char* bytes = identity.c_str();
+    uint64_t value =
+      ((uint64_t) (bytes[0] & 0xff) << 56) |
+      ((uint64_t) (bytes[1] & 0xff) << 48) |
+      ((uint64_t) (bytes[2] & 0xff) << 40) |
+      ((uint64_t) (bytes[3] & 0xff) << 32) |
+      ((uint64_t) (bytes[4] & 0xff) << 24) |
+      ((uint64_t) (bytes[5] & 0xff) << 16) |
+      ((uint64_t) (bytes[6] & 0xff) << 8) |
+      ((uint64_t) (bytes[7] & 0xff));
+    return Position(value);
+  }
+
+private:
+  friend class LogReaderProcess;
+  friend class LogWriterProcess;
+
+  LogProcess* process;
+};
+
+} // namespace log {
+} // namespace internal {
+} // namespace mesos {
+
+#endif // __LOG_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 271c7d3..53c6be9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -462,6 +462,11 @@ fetcher_HEADERS =							\
 nodist_fetcher_HEADERS =						\
   ../include/mesos/fetcher/fetcher.pb.h
 
+logdir = $(pkgincludedir)/log
+
+log_HEADERS =								\
+  $(top_srcdir)/include/mesos/log/log.hpp
+
 maintenancedir = $(pkgincludedir)/maintenance
 
 maintenance_HEADERS =							\
@@ -1035,7 +1040,6 @@ liblog_la_SOURCES +=							\
   log/consensus.hpp							\
   log/coordinator.hpp							\
   log/leveldb.hpp							\
-  log/log.hpp								\
   log/network.hpp							\
   log/recover.hpp							\
   log/replica.hpp							\

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/java/jni/org_apache_mesos_Log.cpp
----------------------------------------------------------------------
diff --git a/src/java/jni/org_apache_mesos_Log.cpp b/src/java/jni/org_apache_mesos_Log.cpp
index 140b950..85e31b9 100644
--- a/src/java/jni/org_apache_mesos_Log.cpp
+++ b/src/java/jni/org_apache_mesos_Log.cpp
@@ -17,13 +17,13 @@
 #include <jni.h>
 #include <stdint.h>
 
+#include <mesos/log/log.hpp>
+
 #include <process/future.hpp>
 
 #include <stout/check.hpp>
 #include <stout/duration.hpp>
 
-#include "log/log.hpp"
-
 #include "construct.hpp"
 #include "convert.hpp"
 #include "org_apache_mesos_Log.h"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/java/jni/org_apache_mesos_state_LogState.cpp
----------------------------------------------------------------------
diff --git a/src/java/jni/org_apache_mesos_state_LogState.cpp b/src/java/jni/org_apache_mesos_state_LogState.cpp
index 528fe53..5d9f5c6 100644
--- a/src/java/jni/org_apache_mesos_state_LogState.cpp
+++ b/src/java/jni/org_apache_mesos_state_LogState.cpp
@@ -18,9 +18,9 @@
 
 #include <string>
 
-#include <stout/duration.hpp>
+#include <mesos/log/log.hpp>
 
-#include "log/log.hpp"
+#include <stout/duration.hpp>
 
 #include "state/state.hpp"
 #include "state/log.hpp"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/log/log.cpp
----------------------------------------------------------------------
diff --git a/src/log/log.cpp b/src/log/log.cpp
index a376760..1dc8a73 100644
--- a/src/log/log.cpp
+++ b/src/log/log.cpp
@@ -16,6 +16,8 @@
 
 #include <stdint.h>
 
+#include <mesos/log/log.hpp>
+
 #include <process/defer.hpp>
 #include <process/dispatch.hpp>
 #include <process/future.hpp>
@@ -32,7 +34,6 @@
 #include <stout/set.hpp>
 
 #include "log/coordinator.hpp"
-#include "log/log.hpp"
 #include "log/network.hpp"
 #include "log/recover.hpp"
 #include "log/replica.hpp"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/log/log.hpp
----------------------------------------------------------------------
diff --git a/src/log/log.hpp b/src/log/log.hpp
deleted file mode 100644
index 1177117..0000000
--- a/src/log/log.hpp
+++ /dev/null
@@ -1,236 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef __LOG_HPP__
-#define __LOG_HPP__
-
-#include <stdint.h>
-
-#include <list>
-#include <set>
-#include <string>
-
-#include <mesos/zookeeper/group.hpp>
-
-#include <process/future.hpp>
-#include <process/owned.hpp>
-#include <process/process.hpp>
-#include <process/shared.hpp>
-#include <process/timeout.hpp>
-
-#include <stout/duration.hpp>
-#include <stout/none.hpp>
-#include <stout/option.hpp>
-
-namespace mesos {
-namespace internal {
-namespace log {
-
-// Forward declarations.
-class LogProcess;
-class LogReaderProcess;
-class LogWriterProcess;
-
-
-class Log
-{
-public:
-  // Forward declarations.
-  class Reader;
-  class Writer;
-
-  class Position
-  {
-  public:
-    bool operator==(const Position& that) const
-    {
-      return value == that.value;
-    }
-
-    bool operator<(const Position& that) const
-    {
-      return value < that.value;
-    }
-
-    bool operator<=(const Position& that) const
-    {
-      return value <= that.value;
-    }
-
-    bool operator>(const Position& that) const
-    {
-      return value > that.value;
-    }
-
-    bool operator>=(const Position& that) const
-    {
-      return value >= that.value;
-    }
-
-    // Returns an "identity" off this position, useful for serializing
-    // to logs or across communication mediums.
-    std::string identity() const
-    {
-      CHECK(sizeof(value) == 8);
-      char bytes[8];
-      bytes[0] =(0xff & (value >> 56));
-      bytes[1] = (0xff & (value >> 48));
-      bytes[2] = (0xff & (value >> 40));
-      bytes[3] = (0xff & (value >> 32));
-      bytes[4] = (0xff & (value >> 24));
-      bytes[5] = (0xff & (value >> 16));
-      bytes[6] = (0xff & (value >> 8));
-      bytes[7] = (0xff & value);
-      return std::string(bytes, sizeof(bytes));
-    }
-
-  private:
-    friend class Log;
-    friend class Writer;
-    friend class LogReaderProcess;
-    friend class LogWriterProcess;
-
-    /*implicit*/ Position(uint64_t _value) : value(_value) {}
-
-    uint64_t value;
-  };
-
-  class Entry
-  {
-  public:
-    Position position;
-    std::string data;
-
-  private:
-    friend class LogReaderProcess;
-
-    Entry(const Position& _position, const std::string& _data)
-      : position(_position), data(_data) {}
-  };
-
-  class Reader
-  {
-  public:
-    explicit Reader(Log* log);
-    ~Reader();
-
-    // Returns all entries between the specified positions, unless
-    // those positions are invalid, in which case returns an error.
-    process::Future<std::list<Entry> > read(
-        const Position& from,
-        const Position& to);
-
-    // Returns the beginning position of the log from the perspective
-    // of the local replica (which may be out of date if the log has
-    // been opened and truncated while this replica was partitioned).
-    process::Future<Position> beginning();
-
-    // Returns the ending (i.e., last) position of the log from the
-    // perspective of the local replica (which may be out of date if
-    // the log has been opened and appended to while this replica was
-    // partitioned).
-    process::Future<Position> ending();
-
-  private:
-    LogReaderProcess* process;
-  };
-
-  class Writer
-  {
-  public:
-    // Creates a new writer associated with the specified log. Only
-    // one writer (local or remote) can be valid at any point in
-    // time. A writer becomes invalid if either Writer::append or
-    // Writer::truncate return None, in which case, the writer (or
-    // another writer) must be restarted.
-    explicit Writer(Log* log);
-    ~Writer();
-
-    // Attempts to get a promise (from the log's replicas) for
-    // exclusive writes, i.e., no other writer's will be able to
-    // perform append and truncate operations. Returns the ending
-    // position of the log or none if the promise to exclusively write
-    // could not be attained but may be retried.
-    process::Future<Option<Position> > start();
-
-    // Attempts to append the specified data to the log. Returns the
-    // new ending position of the log or 'none' if this writer has
-    // lost it's promise to exclusively write (which can be reacquired
-    // by invoking Writer::start).
-    process::Future<Option<Position> > append(const std::string& data);
-
-    // Attempts to truncate the log up to but not including the
-    // specificed position. Returns the new ending position of the log
-    // or 'none' if this writer has lost it's promise to exclusively
-    // write (which can be reacquired by invoking Writer::start).
-    process::Future<Option<Position> > truncate(const Position& to);
-
-  private:
-    LogWriterProcess* process;
-  };
-
-  // Creates a new replicated log that assumes the specified quorum
-  // size, is backed by a file at the specified path, and coordinates
-  // with other replicas via the set of process PIDs.
-  Log(int quorum,
-      const std::string& path,
-      const std::set<process::UPID>& pids,
-      bool autoInitialize = false);
-
-  // Creates a new replicated log that assumes the specified quorum
-  // size, is backed by a file at the specified path, and coordinates
-  // with other replicas associated with the specified ZooKeeper
-  // servers, timeout, and znode.
-  Log(int quorum,
-      const std::string& path,
-      const std::string& servers,
-      const Duration& timeout,
-      const std::string& znode,
-      const Option<zookeeper::Authentication>& auth = None(),
-      bool autoInitialize = false);
-
-  ~Log();
-
-  // Returns a position based off of the bytes recovered from
-  // Position.identity().
-  Position position(const std::string& identity) const
-  {
-    CHECK(identity.size() == 8);
-    const char* bytes = identity.c_str();
-    uint64_t value =
-      ((uint64_t) (bytes[0] & 0xff) << 56) |
-      ((uint64_t) (bytes[1] & 0xff) << 48) |
-      ((uint64_t) (bytes[2] & 0xff) << 40) |
-      ((uint64_t) (bytes[3] & 0xff) << 32) |
-      ((uint64_t) (bytes[4] & 0xff) << 24) |
-      ((uint64_t) (bytes[5] & 0xff) << 16) |
-      ((uint64_t) (bytes[6] & 0xff) << 8) |
-      ((uint64_t) (bytes[7] & 0xff));
-    return Position(value);
-  }
-
-private:
-  friend class LogReaderProcess;
-  friend class LogWriterProcess;
-
-  LogProcess* process;
-};
-
-} // namespace log {
-} // namespace internal {
-} // namespace mesos {
-
-#endif // __LOG_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/log/tool/benchmark.cpp
----------------------------------------------------------------------
diff --git a/src/log/tool/benchmark.cpp b/src/log/tool/benchmark.cpp
index 770c6d8..659d863 100644
--- a/src/log/tool/benchmark.cpp
+++ b/src/log/tool/benchmark.cpp
@@ -21,6 +21,8 @@
 #include <fstream>
 #include <sstream>
 
+#include <mesos/log/log.hpp>
+
 #include <process/clock.hpp>
 #include <process/future.hpp>
 #include <process/process.hpp>
@@ -33,7 +35,6 @@
 #include <stout/strings.hpp>
 #include <stout/os/read.hpp>
 
-#include "log/log.hpp"
 #include "log/tool/initialize.hpp"
 #include "log/tool/benchmark.hpp"
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/log/tool/replica.cpp
----------------------------------------------------------------------
diff --git a/src/log/tool/replica.cpp b/src/log/tool/replica.cpp
index 4941582..8d37951 100644
--- a/src/log/tool/replica.cpp
+++ b/src/log/tool/replica.cpp
@@ -16,12 +16,13 @@
 
 #include <iostream>
 
+#include <mesos/log/log.hpp>
+
 #include <process/future.hpp>
 #include <process/process.hpp>
 
 #include <stout/error.hpp>
 
-#include "log/log.hpp"
 #include "log/tool/initialize.hpp"
 #include "log/tool/replica.hpp"
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/state/log.cpp
----------------------------------------------------------------------
diff --git a/src/state/log.cpp b/src/state/log.cpp
index fd9f5ef..d6f203d 100644
--- a/src/state/log.cpp
+++ b/src/state/log.cpp
@@ -22,6 +22,8 @@
 #include <set>
 #include <string>
 
+#include <mesos/log/log.hpp>
+
 #include <process/defer.hpp>
 #include <process/dispatch.hpp>
 #include <process/future.hpp>
@@ -41,8 +43,6 @@
 #include <stout/svn.hpp>
 #include <stout/uuid.hpp>
 
-#include "log/log.hpp"
-
 #include "state/log.hpp"
 
 using namespace mesos::internal::log;

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/state/log.hpp
----------------------------------------------------------------------
diff --git a/src/state/log.hpp b/src/state/log.hpp
index 5dd30ca..3f7929b 100644
--- a/src/state/log.hpp
+++ b/src/state/log.hpp
@@ -20,13 +20,13 @@
 #include <set>
 #include <string>
 
+#include <mesos/log/log.hpp>
+
 #include <process/future.hpp>
 
 #include <stout/option.hpp>
 #include <stout/uuid.hpp>
 
-#include "log/log.hpp"
-
 #include "messages/state.hpp"
 
 #include "state/storage.hpp"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/tests/cluster.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cluster.cpp b/src/tests/cluster.cpp
index b515e4f..2ca1fcb 100644
--- a/src/tests/cluster.cpp
+++ b/src/tests/cluster.cpp
@@ -22,6 +22,8 @@
 
 #include <mesos/authorizer/authorizer.hpp>
 
+#include <mesos/log/log.hpp>
+
 #include <mesos/master/allocator.hpp>
 
 #include <mesos/slave/resource_estimator.hpp>
@@ -56,8 +58,6 @@
 
 #include "files/files.hpp"
 
-#include "log/log.hpp"
-
 #include "master/constants.hpp"
 #include "master/flags.hpp"
 #include "master/master.hpp"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/tests/cluster.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cluster.hpp b/src/tests/cluster.hpp
index 81aa080..c5a1b94 100644
--- a/src/tests/cluster.hpp
+++ b/src/tests/cluster.hpp
@@ -24,6 +24,8 @@
 
 #include <mesos/authorizer/authorizer.hpp>
 
+#include <mesos/log/log.hpp>
+
 #include <mesos/master/allocator.hpp>
 #include <mesos/master/contender.hpp>
 #include <mesos/master/detector.hpp>
@@ -43,8 +45,6 @@
 
 #include "files/files.hpp"
 
-#include "log/log.hpp"
-
 #include "master/constants.hpp"
 #include "master/flags.hpp"
 #include "master/master.hpp"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/tests/log_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/log_tests.cpp b/src/tests/log_tests.cpp
index 85fc9d4..84953c3 100644
--- a/src/tests/log_tests.cpp
+++ b/src/tests/log_tests.cpp
@@ -22,6 +22,8 @@
 
 #include <gmock/gmock.h>
 
+#include <mesos/log/log.hpp>
+
 #include <process/clock.hpp>
 #include <process/future.hpp>
 #include <process/gmock.hpp>
@@ -45,7 +47,6 @@
 #include "log/catchup.hpp"
 #include "log/coordinator.hpp"
 #include "log/leveldb.hpp"
-#include "log/log.hpp"
 #include "log/network.hpp"
 #include "log/storage.hpp"
 #include "log/recover.hpp"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/tests/registrar_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/registrar_tests.cpp b/src/tests/registrar_tests.cpp
index f18e803..ebc923b 100644
--- a/src/tests/registrar_tests.cpp
+++ b/src/tests/registrar_tests.cpp
@@ -24,6 +24,8 @@
 #include <mesos/attributes.hpp>
 #include <mesos/type_utils.hpp>
 
+#include <mesos/log/log.hpp>
+
 #include <mesos/authentication/http/basic_authenticator_factory.hpp>
 
 #include <process/clock.hpp>
@@ -40,7 +42,6 @@
 
 #include "common/protobuf_utils.hpp"
 
-#include "log/log.hpp"
 #include "log/replica.hpp"
 
 #include "log/tool/initialize.hpp"

http://git-wip-us.apache.org/repos/asf/mesos/blob/e7f1e6b5/src/tests/state_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/state_tests.cpp b/src/tests/state_tests.cpp
index 0b5a6ab..8d53568 100644
--- a/src/tests/state_tests.cpp
+++ b/src/tests/state_tests.cpp
@@ -24,6 +24,8 @@
 #include <mesos/mesos.hpp>
 #include <mesos/type_utils.hpp>
 
+#include <mesos/log/log.hpp>
+
 #include <process/future.hpp>
 #include <process/gtest.hpp>
 #include <process/protobuf.hpp>
@@ -36,7 +38,6 @@
 
 #include <stout/tests/utils.hpp>
 
-#include "log/log.hpp"
 #include "log/replica.hpp"
 
 #include "log/tool/initialize.hpp"