You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2015/02/23 07:00:36 UTC

[1/7] mesos git commit: Re-introduce "internal" namespace for src/*.

Repository: mesos
Updated Branches:
  refs/heads/master 7ee3b7b67 -> 9030e2dfe


http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/fault_tolerance_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/fault_tolerance_tests.cpp b/src/tests/fault_tolerance_tests.cpp
index efa5c57..17d2f85 100644
--- a/src/tests/fault_tolerance_tests.cpp
+++ b/src/tests/fault_tolerance_tests.cpp
@@ -52,12 +52,13 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::protobuf;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::protobuf;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Clock;
 using process::Future;
@@ -807,7 +808,7 @@ TEST_F(FaultToleranceTest, SchedulerFailoverRetriedReregistration)
   AWAIT_READY(reregistrationMessage);
 
   // Trigger the re-registration retry.
-  Clock::advance(scheduler::REGISTRATION_BACKOFF_FACTOR);
+  Clock::advance(internal::scheduler::REGISTRATION_BACKOFF_FACTOR);
 
   AWAIT_READY(sched2Registered);
 
@@ -861,7 +862,7 @@ TEST_F(FaultToleranceTest, FrameworkReliableRegistration)
   AWAIT_READY(frameworkRegisteredMessage);
 
   Clock::pause();
-  Clock::advance(scheduler::REGISTRATION_BACKOFF_FACTOR);
+  Clock::advance(internal::scheduler::REGISTRATION_BACKOFF_FACTOR);
 
   AWAIT_READY(registered); // Ensures registered message is received.
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/fetcher_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/fetcher_tests.cpp b/src/tests/fetcher_tests.cpp
index fcbf7ad..6af44d8 100644
--- a/src/tests/fetcher_tests.cpp
+++ b/src/tests/fetcher_tests.cpp
@@ -47,8 +47,9 @@
 #include "tests/utils.hpp"
 
 using namespace mesos;
-using namespace mesos::slave;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
+using namespace mesos::internal::tests;
 
 using namespace process;
 using process::Subprocess;
@@ -338,7 +339,7 @@ TEST_F(FetcherTest, FileURI)
 
   Try<Subprocess> fetcherSubprocess =
     process::subprocess(
-      path::join(mesos::tests::flags.build_dir, "src/mesos-fetcher"),
+      path::join(mesos::internal::tests::flags.build_dir, "src/mesos-fetcher"),
       environment);
 
   ASSERT_SOME(fetcherSubprocess);
@@ -374,7 +375,7 @@ TEST_F(FetcherTest, FilePath)
 
   Try<Subprocess> fetcherSubprocess =
     process::subprocess(
-      path::join(mesos::tests::flags.build_dir, "src/mesos-fetcher"),
+      path::join(mesos::internal::tests::flags.build_dir, "src/mesos-fetcher"),
       environment);
 
   ASSERT_SOME(fetcherSubprocess);
@@ -427,7 +428,7 @@ TEST_F(FetcherTest, OSNetUriTest)
 
   Try<Subprocess> fetcherSubprocess =
     process::subprocess(
-      path::join(mesos::tests::flags.build_dir, "src/mesos-fetcher"),
+      path::join(mesos::internal::tests::flags.build_dir, "src/mesos-fetcher"),
       environment);
 
   ASSERT_SOME(fetcherSubprocess);
@@ -463,7 +464,7 @@ TEST_F(FetcherTest, FileLocalhostURI)
 
   Try<Subprocess> fetcherSubprocess =
     process::subprocess(
-      path::join(mesos::tests::flags.build_dir, "src/mesos-fetcher"),
+      path::join(mesos::internal::tests::flags.build_dir, "src/mesos-fetcher"),
       environment);
 
   ASSERT_SOME(fetcherSubprocess);

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/files_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/files_tests.cpp b/src/tests/files_tests.cpp
index 650f1b9..6317894 100644
--- a/src/tests/files_tests.cpp
+++ b/src/tests/files_tests.cpp
@@ -35,8 +35,8 @@
 
 #include "tests/utils.hpp"
 
-using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using process::Future;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/flags.cpp
----------------------------------------------------------------------
diff --git a/src/tests/flags.cpp b/src/tests/flags.cpp
index 693c2bd..98b780f 100644
--- a/src/tests/flags.cpp
+++ b/src/tests/flags.cpp
@@ -19,10 +19,12 @@
 #include "tests/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 // Storage for the flags.
 Flags flags;
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/flags.hpp
----------------------------------------------------------------------
diff --git a/src/tests/flags.hpp b/src/tests/flags.hpp
index 3155d89..3644956 100644
--- a/src/tests/flags.hpp
+++ b/src/tests/flags.hpp
@@ -33,6 +33,7 @@
 #include "messages/messages.hpp"
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 class Flags : public logging::Flags
@@ -158,6 +159,7 @@ public:
 extern Flags flags;
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __TESTS_FLAGS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/fs_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/fs_tests.cpp b/src/tests/fs_tests.cpp
index 0ea286b..946242d 100644
--- a/src/tests/fs_tests.cpp
+++ b/src/tests/fs_tests.cpp
@@ -30,6 +30,7 @@
 
 
 using namespace mesos;
+using namespace mesos::internal;
 
 using fs::MountTable;
 using fs::FileSystemTable;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/gc_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/gc_tests.cpp b/src/tests/gc_tests.cpp
index c74287a..04a453c 100644
--- a/src/tests/gc_tests.cpp
+++ b/src/tests/gc_tests.cpp
@@ -57,13 +57,14 @@
 #include "tests/utils.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::GarbageCollector;
-using mesos::slave::GarbageCollectorProcess;
-using mesos::slave::Slave;
+using mesos::internal::slave::GarbageCollector;
+using mesos::internal::slave::GarbageCollectorProcess;
+using mesos::internal::slave::Slave;
 
 using process::Clock;
 using process::Future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/group_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/group_tests.cpp b/src/tests/group_tests.cpp
index 5344087..144ba82 100644
--- a/src/tests/group_tests.cpp
+++ b/src/tests/group_tests.cpp
@@ -33,8 +33,8 @@
 #include "zookeeper/authentication.hpp"
 #include "zookeeper/group.hpp"
 
-using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using zookeeper::Group;
 using zookeeper::GroupProcess;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/health_check_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/health_check_tests.cpp b/src/tests/health_check_tests.cpp
index 7fcb231..7278f07 100644
--- a/src/tests/health_check_tests.cpp
+++ b/src/tests/health_check_tests.cpp
@@ -33,15 +33,16 @@
 #include "tests/utils.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Containerizer;
-using mesos::slave::Fetcher;
-using mesos::slave::MesosContainerizer;
-using mesos::slave::MesosContainerizerProcess;
-using mesos::slave::Slave;
+using mesos::internal::slave::Containerizer;
+using mesos::internal::slave::Fetcher;
+using mesos::internal::slave::MesosContainerizer;
+using mesos::internal::slave::MesosContainerizerProcess;
+using mesos::internal::slave::Slave;
 
 using process::Clock;
 using process::Future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/hierarchical_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hierarchical_allocator_tests.cpp b/src/tests/hierarchical_allocator_tests.cpp
index eeecfb6..42b172a 100644
--- a/src/tests/hierarchical_allocator_tests.cpp
+++ b/src/tests/hierarchical_allocator_tests.cpp
@@ -40,12 +40,13 @@
 #include "master/allocator/mesos/hierarchical.hpp"
 
 using namespace mesos;
+using namespace mesos::internal;
 
-using mesos::master::MIN_CPUS;
-using mesos::master::MIN_MEM;
+using mesos::internal::master::MIN_CPUS;
+using mesos::internal::master::MIN_MEM;
 
-using mesos::master::allocator::Allocator;
-using mesos::master::allocator::HierarchicalDRFAllocator;
+using mesos::internal::master::allocator::Allocator;
+using mesos::internal::master::allocator::HierarchicalDRFAllocator;
 
 using process::Clock;
 using process::Future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/hook_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hook_tests.cpp b/src/tests/hook_tests.cpp
index dc6d289..44f73ef 100644
--- a/src/tests/hook_tests.cpp
+++ b/src/tests/hook_tests.cpp
@@ -40,11 +40,12 @@
 using std::string;
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 using namespace mesos::modules;
 
-using mesos::master::Master;
-using mesos::slave::Slave;
+using mesos::internal::master::Master;
+using mesos::internal::slave::Slave;
 
 using process::Future;
 using process::PID;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/isolator.hpp
----------------------------------------------------------------------
diff --git a/src/tests/isolator.hpp b/src/tests/isolator.hpp
index 5ad338b..3c3dde5 100644
--- a/src/tests/isolator.hpp
+++ b/src/tests/isolator.hpp
@@ -24,18 +24,19 @@
 #include <mesos/slave/isolator.hpp>
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
-
-class TestIsolatorProcess : public slave::IsolatorProcess
+class TestIsolatorProcess : public mesos::slave::IsolatorProcess
 {
 public:
-  static Try<slave::Isolator*> create(const Option<CommandInfo>& commandInfo)
+  static Try<mesos::slave::Isolator*> create(
+      const Option<CommandInfo>& commandInfo)
   {
-    process::Owned<slave::IsolatorProcess> process(
+    process::Owned<mesos::slave::IsolatorProcess> process(
         new TestIsolatorProcess(commandInfo));
 
-    return new slave::Isolator(process);
+    return new mesos::slave::Isolator(process);
   }
 
   MOCK_METHOD1(
@@ -57,7 +58,7 @@ public:
 
   MOCK_METHOD1(
       watch,
-      process::Future<slave::Limitation>(const ContainerID&));
+      process::Future<mesos::slave::Limitation>(const ContainerID&));
 
   MOCK_METHOD2(
       update,
@@ -88,10 +89,11 @@ private:
 
   const Option<CommandInfo> commandInfo;
 
-  process::Promise<slave::Limitation> promise;
+  process::Promise<mesos::slave::Limitation> promise;
 };
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __TEST_ISOLATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/isolator_tests.cpp b/src/tests/isolator_tests.cpp
index ab4bacc..ebed707 100644
--- a/src/tests/isolator_tests.cpp
+++ b/src/tests/isolator_tests.cpp
@@ -73,31 +73,31 @@
 
 using namespace mesos;
 
-using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using namespace process;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 #ifdef __linux__
-using mesos::slave::CgroupsCpushareIsolatorProcess;
-using mesos::slave::CgroupsMemIsolatorProcess;
-using mesos::slave::CgroupsPerfEventIsolatorProcess;
-using mesos::slave::Fetcher;
-using mesos::slave::SharedFilesystemIsolatorProcess;
+using mesos::internal::slave::CgroupsCpushareIsolatorProcess;
+using mesos::internal::slave::CgroupsMemIsolatorProcess;
+using mesos::internal::slave::CgroupsPerfEventIsolatorProcess;
+using mesos::internal::slave::Fetcher;
+using mesos::internal::slave::SharedFilesystemIsolatorProcess;
 #endif // __linux__
-using mesos::slave::Isolator;
-using mesos::slave::IsolatorProcess;
-using mesos::slave::Launcher;
-using mesos::slave::MesosContainerizer;
-using mesos::slave::Slave;
+using mesos::internal::slave::Launcher;
+using mesos::internal::slave::MesosContainerizer;
+using mesos::internal::slave::Slave;
 #ifdef __linux__
-using mesos::slave::LinuxLauncher;
+using mesos::internal::slave::LinuxLauncher;
 #endif // __linux__
-using mesos::slave::PosixLauncher;
-using mesos::slave::PosixCpuIsolatorProcess;
-using mesos::slave::PosixMemIsolatorProcess;
+using mesos::internal::slave::PosixLauncher;
+using mesos::internal::slave::PosixCpuIsolatorProcess;
+using mesos::internal::slave::PosixMemIsolatorProcess;
 
+using mesos::slave::Isolator;
+using mesos::slave::IsolatorProcess;
 
 using std::ostringstream;
 using std::set;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/log_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/log_tests.cpp b/src/tests/log_tests.cpp
index 8cbc4df..0088706 100644
--- a/src/tests/log_tests.cpp
+++ b/src/tests/log_tests.cpp
@@ -60,8 +60,9 @@
 #endif
 
 using namespace mesos;
-using namespace mesos::log;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::log;
+using namespace mesos::internal::tests;
 
 using namespace process;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/logging_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/logging_tests.cpp b/src/tests/logging_tests.cpp
index 0f2d30d..842cebc 100644
--- a/src/tests/logging_tests.cpp
+++ b/src/tests/logging_tests.cpp
@@ -26,7 +26,7 @@
 
 #include "logging/logging.hpp"
 
-using namespace mesos;
+using namespace mesos::internal;
 
 using process::http::BadRequest;
 using process::http::OK;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/main.cpp
----------------------------------------------------------------------
diff --git a/src/tests/main.cpp b/src/tests/main.cpp
index 0ab6be5..e3fff5d 100644
--- a/src/tests/main.cpp
+++ b/src/tests/main.cpp
@@ -39,8 +39,8 @@
 #include "tests/flags.hpp"
 #include "tests/module.hpp"
 
-using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using std::cerr;
 using std::endl;
@@ -60,7 +60,7 @@ int main(int argc, char** argv)
 {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
-  using mesos::tests::flags; // Needed to disabmiguate.
+  using mesos::internal::tests::flags; // Needed to disabmiguate.
 
   bool help;
   flags.add(&help,
@@ -119,7 +119,7 @@ int main(int argc, char** argv)
 
   // Instantiate our environment. Note that it will be managed by
   // gtest after we add it via testing::AddGlobalTestEnvironment.
-  environment = new tests::Environment(flags);
+  environment = new Environment(flags);
 
   testing::AddGlobalTestEnvironment(environment);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/master_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_allocator_tests.cpp b/src/tests/master_allocator_tests.cpp
index df9ac24..1d6326c 100644
--- a/src/tests/master_allocator_tests.cpp
+++ b/src/tests/master_allocator_tests.cpp
@@ -44,14 +44,15 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::allocator::Allocator;
-using mesos::master::allocator::HierarchicalDRFAllocator;
+using mesos::internal::master::allocator::Allocator;
+using mesos::internal::master::allocator::HierarchicalDRFAllocator;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Clock;
 using process::Future;
@@ -1126,7 +1127,7 @@ TYPED_TEST(MasterAllocatorTest, Whitelist)
 
   ASSERT_SOME(os::write(path, strings::join("\n", hosts)));
 
-  Clock::advance(mesos::master::WHITELIST_WATCH_INTERVAL);
+  Clock::advance(mesos::internal::master::WHITELIST_WATCH_INTERVAL);
 
   // Make sure the allocator has been given the updated whitelist.
   AWAIT_READY(updateWhitelist2);

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/master_authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_authorization_tests.cpp b/src/tests/master_authorization_tests.cpp
index fadbd38..81d1a6d 100644
--- a/src/tests/master_authorization_tests.cpp
+++ b/src/tests/master_authorization_tests.cpp
@@ -42,13 +42,14 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::master::allocator::MesosAllocatorProcess;
+using mesos::internal::master::allocator::MesosAllocatorProcess;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Clock;
 using process::Future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/master_contender_detector_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_contender_detector_tests.cpp b/src/tests/master_contender_detector_tests.cpp
index 78b1a6a..a34b726 100644
--- a/src/tests/master_contender_detector_tests.cpp
+++ b/src/tests/master_contender_detector_tests.cpp
@@ -55,13 +55,14 @@
 #endif
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using namespace zookeeper;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Clock;
 using process::Future;
@@ -134,7 +135,7 @@ TEST(BasicMasterContenderDetectorTest, Contender)
 
   MasterContender* contender = new StandaloneMasterContender();
 
-  contender->initialize(mesos::protobuf::createMasterInfo(master));
+  contender->initialize(internal::protobuf::createMasterInfo(master));
 
   Future<Future<Nothing> > contended = contender->contend();
   AWAIT_READY(contended);
@@ -201,7 +202,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterContender)
   pid.address.ip = 10000000;
   pid.address.port = 10000;
 
-  MasterInfo master = mesos::protobuf::createMasterInfo(pid);
+  MasterInfo master = internal::protobuf::createMasterInfo(pid);
 
   contender->initialize(master);
   Future<Future<Nothing> > contended = contender->contend();
@@ -260,7 +261,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, ContenderPendingElection)
   pid.address.ip = 10000000;
   pid.address.port = 10000;
 
-  MasterInfo master = mesos::protobuf::createMasterInfo(pid);
+  MasterInfo master = internal::protobuf::createMasterInfo(pid);
 
   contender.initialize(master);
 
@@ -315,7 +316,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterContenders)
   pid1.address.ip = 10000000;
   pid1.address.port = 10000;
 
-  MasterInfo master1 = mesos::protobuf::createMasterInfo(pid1);
+  MasterInfo master1 = internal::protobuf::createMasterInfo(pid1);
 
   contender1->initialize(master1);
 
@@ -334,7 +335,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterContenders)
   pid2.address.ip = 10000001;
   pid2.address.port = 10001;
 
-  MasterInfo master2 = mesos::protobuf::createMasterInfo(pid2);
+  MasterInfo master2 = internal::protobuf::createMasterInfo(pid2);
 
   contender2.initialize(master2);
 
@@ -374,7 +375,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, NonRetryableFrrors)
   pid.address.ip = 10000000;
   pid.address.port = 10000;
 
-  MasterInfo master = mesos::protobuf::createMasterInfo(pid);
+  MasterInfo master = internal::protobuf::createMasterInfo(pid);
 
   // group2's password is wrong and operations on it will fail.
   Owned<zookeeper::Group> group2(new Group(
@@ -439,7 +440,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, ContenderDetectorShutdownNetwork)
   pid.address.ip = 10000000;
   pid.address.port = 10000;
 
-  MasterInfo master = mesos::protobuf::createMasterInfo(pid);
+  MasterInfo master = internal::protobuf::createMasterInfo(pid);
 
   contender.initialize(master);
 
@@ -516,7 +517,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterDetectorTimedoutSession)
   pid.address.ip = 10000000;
   pid.address.port = 10000;
 
-  MasterInfo leader = mesos::protobuf::createMasterInfo(pid);
+  MasterInfo leader = internal::protobuf::createMasterInfo(pid);
 
   leaderContender.initialize(leader);
 
@@ -538,7 +539,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterDetectorTimedoutSession)
   pid2.address.ip = 10000001;
   pid2.address.port = 10001;
 
-  MasterInfo follower = mesos::protobuf::createMasterInfo(pid2);
+  MasterInfo follower = internal::protobuf::createMasterInfo(pid2);
 
   followerContender.initialize(follower);
 
@@ -628,7 +629,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest,
   pid.address.ip = 10000000;
   pid.address.port = 10000;
 
-  MasterInfo leader = mesos::protobuf::createMasterInfo(pid);
+  MasterInfo leader = internal::protobuf::createMasterInfo(pid);
 
   // Create the group instance so we can expire its session.
   Owned<zookeeper::Group> group(
@@ -658,7 +659,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest,
   pid2.address.ip = 10000001;
   pid2.address.port = 10001;
 
-  MasterInfo follower = mesos::protobuf::createMasterInfo(pid2);
+  MasterInfo follower = internal::protobuf::createMasterInfo(pid2);
 
   ZooKeeperMasterDetector followerDetector(url.get());
   ZooKeeperMasterContender followerContender(url.get());
@@ -706,7 +707,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest, MasterDetectorExpireSlaveZKSession)
   pid.address.ip = 10000000;
   pid.address.port = 10000;
 
-  MasterInfo master = mesos::protobuf::createMasterInfo(pid);
+  MasterInfo master = internal::protobuf::createMasterInfo(pid);
 
   ZooKeeperMasterContender masterContender(url.get());
   masterContender.initialize(master);
@@ -768,7 +769,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest,
   pid.address.ip = 10000000;
   pid.address.port = 10000;
 
-  MasterInfo leader = mesos::protobuf::createMasterInfo(pid);
+  MasterInfo leader = internal::protobuf::createMasterInfo(pid);
 
   leaderContender.initialize(leader);
 
@@ -789,7 +790,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest,
   pid2.address.ip = 10000001;
   pid2.address.port = 10001;
 
-  MasterInfo follower = mesos::protobuf::createMasterInfo(pid2);
+  MasterInfo follower = internal::protobuf::createMasterInfo(pid2);
 
   followerContender.initialize(follower);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/master_slave_reconciliation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_slave_reconciliation_tests.cpp b/src/tests/master_slave_reconciliation_tests.cpp
index 5156898..11b043f 100644
--- a/src/tests/master_slave_reconciliation_tests.cpp
+++ b/src/tests/master_slave_reconciliation_tests.cpp
@@ -42,12 +42,13 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::protobuf;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::protobuf;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Clock;
 using process::Future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/master_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 3a9da68..9927fd5 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -59,16 +59,17 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::master::allocator::MesosAllocatorProcess;
+using mesos::internal::master::allocator::MesosAllocatorProcess;
 
-using mesos::slave::GarbageCollectorProcess;
-using mesos::slave::Slave;
-using mesos::slave::Containerizer;
-using mesos::slave::MesosContainerizerProcess;
+using mesos::internal::slave::GarbageCollectorProcess;
+using mesos::internal::slave::Slave;
+using mesos::internal::slave::Containerizer;
+using mesos::internal::slave::MesosContainerizerProcess;
 
 using process::Clock;
 using process::Future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/master_validation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_validation_tests.cpp b/src/tests/master_validation_tests.cpp
index e2b6426..81c635f 100644
--- a/src/tests/master_validation_tests.cpp
+++ b/src/tests/master_validation_tests.cpp
@@ -30,8 +30,8 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
-using namespace mesos::master::validation;
+using namespace mesos::internal::tests;
+using namespace mesos::internal::master::validation;
 
 using google::protobuf::RepeatedPtrField;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/mesos.cpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.cpp b/src/tests/mesos.cpp
index d76ed8c..df051d9 100644
--- a/src/tests/mesos.cpp
+++ b/src/tests/mesos.cpp
@@ -58,6 +58,7 @@ using namespace routing;
 #endif
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 #ifdef MESOS_HAS_JAVA
@@ -603,4 +604,5 @@ void ContainerizerTest<slave::MesosContainerizer>::TearDown()
 #endif // __linux__
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/mesos.hpp
----------------------------------------------------------------------
diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp
index fceef6c..e17afe7 100644
--- a/src/tests/mesos.hpp
+++ b/src/tests/mesos.hpp
@@ -69,6 +69,7 @@ using ::testing::DoDefault;
 using ::testing::Return;
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 // Forward declarations.
@@ -1078,6 +1079,7 @@ void ExpectNoFutureProtobufs(T t, From from, To to)
 }
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __TESTS_MESOS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/metrics_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/metrics_tests.cpp b/src/tests/metrics_tests.cpp
index 3b2dc24..2caec5f 100644
--- a/src/tests/metrics_tests.cpp
+++ b/src/tests/metrics_tests.cpp
@@ -29,11 +29,12 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
+using namespace mesos::internal;
 
-using mesos::master::Master;
-using mesos::slave::Slave;
+using mesos::internal::master::Master;
+using mesos::internal::slave::Slave;
 
-class MetricsTest : public mesos::tests::MesosTest {};
+class MetricsTest : public mesos::internal::tests::MesosTest {};
 
 TEST_F(MetricsTest, Master)
 {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/module.cpp
----------------------------------------------------------------------
diff --git a/src/tests/module.cpp b/src/tests/module.cpp
index a8c0f9a..bfd5aae 100644
--- a/src/tests/module.cpp
+++ b/src/tests/module.cpp
@@ -31,7 +31,8 @@
 using std::string;
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 using namespace mesos::modules;
 
 static hashmap<ModuleID, string> moduleNames;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/module.hpp
----------------------------------------------------------------------
diff --git a/src/tests/module.hpp b/src/tests/module.hpp
index af71b58..65e567f 100644
--- a/src/tests/module.hpp
+++ b/src/tests/module.hpp
@@ -32,6 +32,7 @@
 #include "tests/mesos.hpp"
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 // The ModuleID is used by typed tests to specify the specific module
@@ -76,6 +77,7 @@ public:
 };
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __TESTS_MODULE_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/module_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/module_tests.cpp b/src/tests/module_tests.cpp
index a16ba99..643e712 100644
--- a/src/tests/module_tests.cpp
+++ b/src/tests/module_tests.cpp
@@ -36,9 +36,9 @@
 using std::string;
 
 using namespace mesos;
-using namespace mesos::modules;
-using namespace mesos::slave;
-using namespace mesos::tests;
+using namespace mesos::internal::modules;
+using namespace mesos::internal::slave;
+using namespace mesos::internal::tests;
 
 const char* DEFAULT_MODULE_LIBRARY_NAME = "examplemodule";
 const char* DEFAULT_MODULE_NAME = "org_apache_mesos_TestModule";

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/monitor_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/monitor_tests.cpp b/src/tests/monitor_tests.cpp
index b640d89..a1aca5f 100644
--- a/src/tests/monitor_tests.cpp
+++ b/src/tests/monitor_tests.cpp
@@ -39,7 +39,8 @@
 #include "tests/containerizer.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using process::Clock;
 using process::Future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/ns_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/ns_tests.cpp b/src/tests/ns_tests.cpp
index b11a216..046ea26 100644
--- a/src/tests/ns_tests.cpp
+++ b/src/tests/ns_tests.cpp
@@ -41,7 +41,7 @@
 #include "tests/flags.hpp"
 
 
-using namespace mesos;
+using namespace mesos::internal;
 
 using namespace process;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/partition_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/partition_tests.cpp b/src/tests/partition_tests.cpp
index eb16a58..edf46ac 100644
--- a/src/tests/partition_tests.cpp
+++ b/src/tests/partition_tests.cpp
@@ -38,13 +38,14 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::master::allocator::MesosAllocatorProcess;
+using mesos::internal::master::allocator::MesosAllocatorProcess;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Clock;
 using process::Future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/paths_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/paths_tests.cpp b/src/tests/paths_tests.cpp
index 07e8af5..9b71796 100644
--- a/src/tests/paths_tests.cpp
+++ b/src/tests/paths_tests.cpp
@@ -32,6 +32,7 @@
 #include "slave/state.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 namespace paths {
 
@@ -216,4 +217,5 @@ TEST_F(PathsTest, PersistentVolume)
 
 } // namespace paths {
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/port_mapping_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/port_mapping_tests.cpp b/src/tests/port_mapping_tests.cpp
index 308f629..f15c071 100644
--- a/src/tests/port_mapping_tests.cpp
+++ b/src/tests/port_mapping_tests.cpp
@@ -61,8 +61,10 @@
 #include "tests/utils.hpp"
 
 using namespace mesos;
-using namespace mesos::slave;
-using namespace mesos::tests;
+
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
+using namespace mesos::internal::tests;
 
 using namespace process;
 
@@ -70,14 +72,15 @@ using namespace routing;
 using namespace routing::filter;
 using namespace routing::queueing;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
+
+using mesos::internal::slave::Launcher;
+using mesos::internal::slave::LinuxLauncher;
+using mesos::internal::slave::MesosContainerizer;
+using mesos::internal::slave::MesosContainerizerLaunch;
+using mesos::internal::slave::PortMappingIsolatorProcess;
 
 using mesos::slave::Isolator;
-using mesos::slave::Launcher;
-using mesos::slave::LinuxLauncher;
-using mesos::slave::MesosContainerizer;
-using mesos::slave::MesosContainerizerLaunch;
-using mesos::slave::PortMappingIsolatorProcess;
 
 using std::list;
 using std::ostringstream;
@@ -131,7 +134,7 @@ static void cleanup(const string& eth0, const string& lo)
 
     // NOTE: Here, we ignore the unmount errors because previous tests
     // may have created the file and died before mounting.
-    mesos::fs::unmount(target, MNT_DETACH);
+    mesos::internal::fs::unmount(target, MNT_DETACH);
 
     // Use best effort to remove the bind mount file, but it is okay
     // the file can't be removed at this point.

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/protobuf_io_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/protobuf_io_tests.cpp b/src/tests/protobuf_io_tests.cpp
index 92a090a..b2383b0 100644
--- a/src/tests/protobuf_io_tests.cpp
+++ b/src/tests/protobuf_io_tests.cpp
@@ -33,7 +33,8 @@
 #include "tests/utils.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using std::string;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/rate_limiting_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/rate_limiting_tests.cpp b/src/tests/rate_limiting_tests.cpp
index 784ac76..8630441 100644
--- a/src/tests/rate_limiting_tests.cpp
+++ b/src/tests/rate_limiting_tests.cpp
@@ -33,11 +33,12 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::master::allocator::MesosAllocatorProcess;
+using mesos::internal::master::allocator::MesosAllocatorProcess;
 
 using process::metrics::internal::MetricsProcess;
 
@@ -52,6 +53,7 @@ using testing::Eq;
 using testing::Return;
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 // Query Mesos metrics snapshot endpoint and return a JSON::Object
@@ -1115,4 +1117,5 @@ TEST_F(RateLimitingTest, CapacityReached)
 }
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/reconciliation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reconciliation_tests.cpp b/src/tests/reconciliation_tests.cpp
index 4c97341..c21f4cb 100644
--- a/src/tests/reconciliation_tests.cpp
+++ b/src/tests/reconciliation_tests.cpp
@@ -44,11 +44,12 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Clock;
 using process::Future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/registrar_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/registrar_tests.cpp b/src/tests/registrar_tests.cpp
index fd31293..37d9dba 100644
--- a/src/tests/registrar_tests.cpp
+++ b/src/tests/registrar_tests.cpp
@@ -54,17 +54,18 @@
 #include "tests/utils.hpp"
 
 using namespace mesos;
+using namespace mesos::internal;
 
 using namespace process;
 
-using mesos::log::Log;
-using mesos::log::Replica;
+using log::Log;
+using log::Replica;
 
-using mesos::state::Entry;
-using mesos::state::LogStorage;
-using mesos::state::Storage;
+using state::Entry;
+using state::LogStorage;
+using state::Storage;
 
-using mesos::state::protobuf::State;
+using state::protobuf::State;
 
 using std::map;
 using std::set;
@@ -76,11 +77,12 @@ using testing::DoAll;
 using testing::Eq;
 using testing::Return;
 
-using mesos::tests::TemporaryDirectoryTest;
+using mesos::internal::tests::TemporaryDirectoryTest;
 
 using ::testing::WithParamInterface;
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 // TODO(xujyan): This class copies code from LogStateTest. It would
@@ -528,4 +530,5 @@ TEST_P(Registrar_BENCHMARK_Test, performance)
 }
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/registrar_zookeeper_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/registrar_zookeeper_tests.cpp b/src/tests/registrar_zookeeper_tests.cpp
index 7c9aa81..687fe58 100644
--- a/src/tests/registrar_zookeeper_tests.cpp
+++ b/src/tests/registrar_zookeeper_tests.cpp
@@ -35,11 +35,12 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Future;
 using process::PID;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/repair_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/repair_tests.cpp b/src/tests/repair_tests.cpp
index 1aad5c1..62ff724 100644
--- a/src/tests/repair_tests.cpp
+++ b/src/tests/repair_tests.cpp
@@ -31,9 +31,10 @@
 
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
 using process::Future;
 using process::PID;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/resource_offers_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resource_offers_tests.cpp b/src/tests/resource_offers_tests.cpp
index 1ba73ba..5e1b0db 100644
--- a/src/tests/resource_offers_tests.cpp
+++ b/src/tests/resource_offers_tests.cpp
@@ -35,11 +35,12 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Future;
 using process::PID;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/resources_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resources_tests.cpp b/src/tests/resources_tests.cpp
index 3f98782..4744e87 100644
--- a/src/tests/resources_tests.cpp
+++ b/src/tests/resources_tests.cpp
@@ -29,8 +29,9 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::master;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::master;
+using namespace mesos::internal::tests;
 
 using std::ostringstream;
 using std::pair;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/scheduler_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/scheduler_tests.cpp b/src/tests/scheduler_tests.cpp
index fb81e03..59cb412 100644
--- a/src/tests/scheduler_tests.cpp
+++ b/src/tests/scheduler_tests.cpp
@@ -48,12 +48,13 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Containerizer;
-using mesos::slave::Slave;
+using mesos::internal::slave::Containerizer;
+using mesos::internal::slave::Slave;
 
 using mesos::scheduler::Call;
 using mesos::scheduler::Event;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/script.cpp
----------------------------------------------------------------------
diff --git a/src/tests/script.cpp b/src/tests/script.cpp
index ddbec76..515e314 100644
--- a/src/tests/script.cpp
+++ b/src/tests/script.cpp
@@ -43,6 +43,7 @@
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 void execute(const string& script)
@@ -162,4 +163,5 @@ void execute(const string& script)
 }
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/script.hpp
----------------------------------------------------------------------
diff --git a/src/tests/script.hpp b/src/tests/script.hpp
index d25b1e2..f0c71e1 100644
--- a/src/tests/script.hpp
+++ b/src/tests/script.hpp
@@ -22,12 +22,14 @@
 #include <gtest/gtest.h>
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 // Helper used by TEST_SCRIPT to execute the script.
 void execute(const std::string& script);
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 
@@ -37,7 +39,7 @@ void execute(const std::string& script);
 // script returns 0.
 #define TEST_SCRIPT(test_case_name, test_name, script)      \
   TEST(test_case_name, test_name) {                         \
-    mesos::tests::execute(script);                \
+    mesos::internal::tests::execute(script);                \
   }
 
 #endif // __TESTS_SCRIPT_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/shutdown_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/shutdown_tests.cpp b/src/tests/shutdown_tests.cpp
index 9017517..bb48ee0 100644
--- a/src/tests/shutdown_tests.cpp
+++ b/src/tests/shutdown_tests.cpp
@@ -41,11 +41,12 @@
 using std::string;
 
 using namespace mesos;
-using namespace mesos::slave;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
-using mesos::slave::Slave;
+using mesos::internal::master::Master;
+using mesos::internal::slave::Slave;
 
 using process::Future;
 using process::PID;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index 24c28af..7fbc434 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -59,17 +59,18 @@
 #include "tests/utils.hpp"
 
 using namespace mesos;
-using namespace mesos::slave;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
+using namespace mesos::internal::tests;
 
 using namespace process;
 
 using google::protobuf::RepeatedPtrField;
 
-using mesos::master::Master;
-using mesos::slave::Containerizer;
-using mesos::slave::Fetcher;
-using mesos::slave::GarbageCollectorProcess;
+using mesos::internal::master::Master;
+using mesos::internal::slave::Containerizer;
+using mesos::internal::slave::Fetcher;
+using mesos::internal::slave::GarbageCollectorProcess;
 
 using std::map;
 using std::string;
@@ -283,7 +284,7 @@ TYPED_TEST(SlaveRecoveryTest, RecoverSlaveState)
                 .runs[containerId.get()]
                 .tasks.contains(task.task_id()));
 
-  const Task& t = mesos::protobuf::createTask(
+  const Task& t = mesos::internal::protobuf::createTask(
       task, TASK_STAGING, frameworkId);
 
   ASSERT_SOME_EQ(

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/slave_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index 33a8d8f..2e0346f 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -59,18 +59,19 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using namespace process;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Containerizer;
-using mesos::slave::Fetcher;
-using mesos::slave::GarbageCollectorProcess;
-using mesos::slave::MesosContainerizer;
-using mesos::slave::MesosContainerizerProcess;
-using mesos::slave::Slave;
+using mesos::internal::slave::Containerizer;
+using mesos::internal::slave::Fetcher;
+using mesos::internal::slave::GarbageCollectorProcess;
+using mesos::internal::slave::MesosContainerizer;
+using mesos::internal::slave::MesosContainerizerProcess;
+using mesos::internal::slave::Slave;
 
 using std::map;
 using std::string;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/sorter_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/sorter_tests.cpp b/src/tests/sorter_tests.cpp
index 7ba32b7..5cae191 100644
--- a/src/tests/sorter_tests.cpp
+++ b/src/tests/sorter_tests.cpp
@@ -32,7 +32,7 @@
 
 using namespace mesos;
 
-using mesos::master::allocator::DRFSorter;
+using mesos::internal::master::allocator::DRFSorter;
 
 using std::list;
 using std::string;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/state_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/state_tests.cpp b/src/tests/state_tests.cpp
index b308123..398ecaa 100644
--- a/src/tests/state_tests.cpp
+++ b/src/tests/state_tests.cpp
@@ -60,28 +60,27 @@
 #endif
 
 using namespace mesos;
-using namespace mesos::log;
+using namespace mesos::internal;
+using namespace mesos::internal::log;
 
 using namespace process;
 
-using mesos::state::InMemoryStorage;
-using mesos::state::LevelDBStorage;
-using mesos::state::LogStorage;
-using mesos::state::Operation;
-using mesos::state::Storage;
+using state::LevelDBStorage;
+using state::Operation;
+using state::Storage;
 #ifdef MESOS_HAS_JAVA
-using mesos::state::ZooKeeperStorage;
+using state::ZooKeeperStorage;
 #endif
 
-using mesos::state::protobuf::State;
-using mesos::state::protobuf::Variable;
+using state::protobuf::State;
+using state::protobuf::Variable;
 
 using std::list;
 using std::set;
 using std::string;
 using std::vector;
 
-using mesos::tests::TemporaryDirectoryTest;
+using mesos::internal::tests::TemporaryDirectoryTest;
 
 typedef mesos::Registry::Slaves Slaves;
 typedef mesos::Registry::Slave Slave;
@@ -336,7 +335,7 @@ public:
 protected:
   virtual void SetUp()
   {
-    storage = new InMemoryStorage();
+    storage = new state::InMemoryStorage();
     state = new State(storage);
   }
 
@@ -346,7 +345,7 @@ protected:
     delete storage;
   }
 
-  Storage* storage;
+  state::Storage* storage;
   State* state;
 };
 
@@ -405,7 +404,7 @@ protected:
   virtual void SetUp()
   {
     os::rmdir(path);
-    storage = new LevelDBStorage(path);
+    storage = new state::LevelDBStorage(path);
     state = new State(storage);
   }
 
@@ -416,7 +415,7 @@ protected:
     os::rmdir(path);
   }
 
-  Storage* storage;
+  state::Storage* storage;
   State* state;
 
 private:
@@ -500,7 +499,7 @@ protected:
     pids.insert(replica2->pid());
 
     log = new Log(2, path1, pids);
-    storage = new LogStorage(log, 1024);
+    storage = new state::LogStorage(log, 1024);
     state = new State(storage);
   }
 
@@ -515,7 +514,7 @@ protected:
     TemporaryDirectoryTest::TearDown();
   }
 
-  Storage* storage;
+  state::Storage* storage;
   State* state;
 
   Replica* replica2;
@@ -698,7 +697,7 @@ protected:
   virtual void SetUp()
   {
     ZooKeeperTest::SetUp();
-    storage = new ZooKeeperStorage(
+    storage = new state::ZooKeeperStorage(
         server->connectString(),
         NO_TIMEOUT,
         "/state/");
@@ -712,7 +711,7 @@ protected:
     ZooKeeperTest::TearDown();
   }
 
-  Storage* storage;
+  state::Storage* storage;
   State* state;
 };
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/status_update_manager_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/status_update_manager_tests.cpp b/src/tests/status_update_manager_tests.cpp
index 2158cfe..6ff7320 100644
--- a/src/tests/status_update_manager_tests.cpp
+++ b/src/tests/status_update_manager_tests.cpp
@@ -48,11 +48,12 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Clock;
 using process::Future;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/utils.cpp
----------------------------------------------------------------------
diff --git a/src/tests/utils.cpp b/src/tests/utils.cpp
index 2427469..f4f90b9 100644
--- a/src/tests/utils.cpp
+++ b/src/tests/utils.cpp
@@ -34,6 +34,7 @@
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 void TemporaryDirectoryTest::SetUp()
@@ -70,4 +71,5 @@ void TemporaryDirectoryTest::TearDown()
 }
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/utils.hpp
----------------------------------------------------------------------
diff --git a/src/tests/utils.hpp b/src/tests/utils.hpp
index 3aea47c..5c86fd4 100644
--- a/src/tests/utils.hpp
+++ b/src/tests/utils.hpp
@@ -26,6 +26,7 @@
 #include <stout/option.hpp>
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 // Test fixture for creating a temporary directory for each test.
@@ -42,6 +43,7 @@ private:
 };
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __TESTS_UTILS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/values_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/values_tests.cpp b/src/tests/values_tests.cpp
index dd59db8..35d3b3e 100644
--- a/src/tests/values_tests.cpp
+++ b/src/tests/values_tests.cpp
@@ -29,7 +29,8 @@
 #include "master/master.hpp"
 
 using namespace mesos;
-using namespace mesos::values;
+using namespace mesos::internal;
+using namespace mesos::internal::values;
 
 using std::string;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/zookeeper.cpp
----------------------------------------------------------------------
diff --git a/src/tests/zookeeper.cpp b/src/tests/zookeeper.cpp
index 4f96dfa..08cab86 100644
--- a/src/tests/zookeeper.cpp
+++ b/src/tests/zookeeper.cpp
@@ -47,6 +47,7 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 const Duration ZooKeeperTest::NO_TIMEOUT = Seconds(10);
@@ -182,4 +183,5 @@ ZooKeeperTest::TestWatcher::awaitEvent(
 }
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/zookeeper.hpp
----------------------------------------------------------------------
diff --git a/src/tests/zookeeper.hpp b/src/tests/zookeeper.hpp
index 615e23a..d8f1cb3 100644
--- a/src/tests/zookeeper.hpp
+++ b/src/tests/zookeeper.hpp
@@ -31,6 +31,7 @@
 #include "tests/zookeeper_test_server.hpp"
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 // Helper for invoking ZooKeeper::get(path, ...) in order to check the
@@ -61,7 +62,7 @@ inline ::testing::AssertionResult AssertZKGet(
 }
 
 #define ASSERT_ZK_GET(expected, zk, path)                               \
-  ASSERT_PRED_FORMAT3(mesos::tests::AssertZKGet, expected, zk, path)
+  ASSERT_PRED_FORMAT3(mesos::internal::tests::AssertZKGet, expected, zk, path)
 
 
 // A fixture for tests that need to interact with a ZooKeeper server
@@ -129,6 +130,7 @@ protected:
 };
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __ZOOKEEPER_TEST_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/zookeeper_test_server.cpp
----------------------------------------------------------------------
diff --git a/src/tests/zookeeper_test_server.cpp b/src/tests/zookeeper_test_server.cpp
index 984b6a6..d92ab8a 100644
--- a/src/tests/zookeeper_test_server.cpp
+++ b/src/tests/zookeeper_test_server.cpp
@@ -36,6 +36,7 @@ using org::apache::zookeeper::server::NIOServerCnxnFactory;
 using org::apache::zookeeper::server::ZooKeeperServer;
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 ZooKeeperTestServer::ZooKeeperTestServer()
@@ -162,4 +163,5 @@ int ZooKeeperTestServer::startNetwork()
 }
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/zookeeper_test_server.hpp
----------------------------------------------------------------------
diff --git a/src/tests/zookeeper_test_server.hpp b/src/tests/zookeeper_test_server.hpp
index cfc9706..e415ce6 100644
--- a/src/tests/zookeeper_test_server.hpp
+++ b/src/tests/zookeeper_test_server.hpp
@@ -30,6 +30,7 @@
 #include "zookeeper/zookeeper.hpp"
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 // An in-process ZooKeeper server that can be manipulated to control
@@ -80,6 +81,7 @@ private:
 };
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __ZOOKEEPER_TEST_SERVER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/zookeeper_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/zookeeper_tests.cpp b/src/tests/zookeeper_tests.cpp
index 40081ef..183008e 100644
--- a/src/tests/zookeeper_tests.cpp
+++ b/src/tests/zookeeper_tests.cpp
@@ -36,8 +36,8 @@
 
 #include "tests/zookeeper.hpp"
 
-using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 using namespace process;
 using namespace zookeeper;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/usage/main.cpp
----------------------------------------------------------------------
diff --git a/src/usage/main.cpp b/src/usage/main.cpp
index e987f0c..97f55e9 100644
--- a/src/usage/main.cpp
+++ b/src/usage/main.cpp
@@ -100,7 +100,7 @@ int main(int argc, char** argv)
     return -1;
   }
 
-  Try<ResourceStatistics> statistics = mesos::usage(flags.pid.get());
+  Try<ResourceStatistics> statistics = mesos::internal::usage(flags.pid.get());
 
   if (statistics.isError()) {
     cerr << "Failed to get usage: " << statistics.error() << endl;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/usage/usage.cpp
----------------------------------------------------------------------
diff --git a/src/usage/usage.cpp b/src/usage/usage.cpp
index 4ddf075..bb6c0ea 100644
--- a/src/usage/usage.cpp
+++ b/src/usage/usage.cpp
@@ -28,6 +28,7 @@
 #include "usage/usage.hpp"
 
 namespace mesos {
+namespace internal {
 
 Try<ResourceStatistics> usage(pid_t pid, bool mem, bool cpus)
 {
@@ -79,4 +80,5 @@ Try<ResourceStatistics> usage(pid_t pid, bool mem, bool cpus)
   return statistics;
 }
 
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/usage/usage.hpp
----------------------------------------------------------------------
diff --git a/src/usage/usage.hpp b/src/usage/usage.hpp
index 77e9d16..e0ad2e2 100644
--- a/src/usage/usage.hpp
+++ b/src/usage/usage.hpp
@@ -24,12 +24,14 @@
 #include "mesos/mesos.hpp"
 
 namespace mesos {
+namespace internal {
 
 // Collects resource usage of a process tree rooted at 'pid'. Only
 // collects the 'mem_*' values if 'mem' is true and the 'cpus_*'
 // values if 'cpus' is true.
 Try<ResourceStatistics> usage(pid_t pid, bool mem = true, bool cpus = true);
 
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __USAGE_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/watcher/whitelist_watcher.cpp
----------------------------------------------------------------------
diff --git a/src/watcher/whitelist_watcher.cpp b/src/watcher/whitelist_watcher.cpp
index e00b5c8..dd20581 100644
--- a/src/watcher/whitelist_watcher.cpp
+++ b/src/watcher/whitelist_watcher.cpp
@@ -33,6 +33,7 @@
 #include "watcher/whitelist_watcher.hpp"
 
 namespace mesos {
+namespace internal {
 
 using std::string;
 using std::vector;
@@ -122,4 +123,5 @@ void WhitelistWatcher::watch()
   delay(watchInterval, self(), &WhitelistWatcher::watch);
 }
 
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/watcher/whitelist_watcher.hpp
----------------------------------------------------------------------
diff --git a/src/watcher/whitelist_watcher.hpp b/src/watcher/whitelist_watcher.hpp
index 654a27d..1379bec 100644
--- a/src/watcher/whitelist_watcher.hpp
+++ b/src/watcher/whitelist_watcher.hpp
@@ -30,6 +30,7 @@
 #include <stout/path.hpp>
 
 namespace mesos {
+namespace internal {
 
 // A whitelist may be (1) absent, (2) empty, (3) non-empty. The
 // watcher notifies the subscriber if the state of the whitelist
@@ -70,6 +71,7 @@ private:
   Option<hashset<std::string>> lastWhitelist;
 };
 
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __WATCHER_WHITELIST_WATCHER_HPP__


[6/7] mesos git commit: Fixed bug in tests from 'internal' revert.

Posted by be...@apache.org.
Fixed bug in tests from 'internal' revert.

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


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

Branch: refs/heads/master
Commit: 9030e2dfed39b74c4ea70a8b1f63e7838b2857cb
Parents: 5ad9128
Author: Benjamin Hindman <be...@gmail.com>
Authored: Sun Feb 22 15:55:29 2015 -0800
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Sun Feb 22 22:00:08 2015 -0800

----------------------------------------------------------------------
 src/tests/rate_limiting_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/9030e2df/src/tests/rate_limiting_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/rate_limiting_tests.cpp b/src/tests/rate_limiting_tests.cpp
index 3e16944..e4fa8f0 100644
--- a/src/tests/rate_limiting_tests.cpp
+++ b/src/tests/rate_limiting_tests.cpp
@@ -1053,7 +1053,7 @@ TEST_F(RateLimitingTest, CapacityReached)
   Future<Nothing> error;
   EXPECT_CALL(sched, error(
       driver,
-      "Message mesos.RegisterFrameworkMessage dropped: capacity(2) "
+      "Message mesos.internal.RegisterFrameworkMessage dropped: capacity(2) "
       "exceeded"))
     .WillOnce(FutureSatisfy(&error));
 


[4/7] mesos git commit: Removed all 'namespace slave {' and 'namespace master {' from tests.

Posted by be...@apache.org.
Removed all 'namespace slave {' and 'namespace master {' from tests.

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


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

Branch: refs/heads/master
Commit: c07ac6204348d460735efc648cf8782f2d102db1
Parents: e935707
Author: Benjamin Hindman <be...@gmail.com>
Authored: Sun Feb 22 14:42:59 2015 -0800
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Sun Feb 22 22:00:08 2015 -0800

----------------------------------------------------------------------
 src/tests/containerizer_tests.cpp  | 6 +++---
 src/tests/rate_limiting_tests.cpp  | 8 +++-----
 src/tests/registrar_tests.cpp      | 6 ++++--
 src/tests/slave_recovery_tests.cpp | 6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/c07ac620/src/tests/containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer_tests.cpp b/src/tests/containerizer_tests.cpp
index e6e8c8c..d96a3a8 100644
--- a/src/tests/containerizer_tests.cpp
+++ b/src/tests/containerizer_tests.cpp
@@ -43,7 +43,7 @@
 #include "tests/mesos.hpp"
 #include "tests/utils.hpp"
 
-using namespace mesos::internal::tests;
+using namespace mesos::internal::slave;
 
 using namespace mesos::slave;
 
@@ -58,7 +58,7 @@ using testing::Return;
 
 namespace mesos {
 namespace internal {
-namespace slave {
+namespace tests {
 
 
 class MesosContainerizerIsolatorPreparationTest :
@@ -410,6 +410,6 @@ TEST_F(MesosContainerizerDestroyTest, DestroyWhileFetching)
   AWAIT_READY(wait);
 }
 
-} // namespace slave {
+} // namespace tests {
 } // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/c07ac620/src/tests/rate_limiting_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/rate_limiting_tests.cpp b/src/tests/rate_limiting_tests.cpp
index 342d77b..3e16944 100644
--- a/src/tests/rate_limiting_tests.cpp
+++ b/src/tests/rate_limiting_tests.cpp
@@ -32,9 +32,7 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos::internal::tests;
-
-using mesos::internal::master::Master;
+using namespace mesos::internal::master;
 
 using mesos::internal::master::allocator::MesosAllocatorProcess;
 
@@ -52,7 +50,7 @@ using testing::Return;
 
 namespace mesos {
 namespace internal {
-namespace master {
+namespace tests {
 
 // Query Mesos metrics snapshot endpoint and return a JSON::Object
 // result.
@@ -1114,6 +1112,6 @@ TEST_F(RateLimitingTest, CapacityReached)
   Shutdown();
 }
 
-} // namespace master {
+} // namespace tests {
 } // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/c07ac620/src/tests/registrar_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/registrar_tests.cpp b/src/tests/registrar_tests.cpp
index e9fb928..ebcce73 100644
--- a/src/tests/registrar_tests.cpp
+++ b/src/tests/registrar_tests.cpp
@@ -53,6 +53,8 @@
 
 #include "tests/utils.hpp"
 
+using namespace mesos::internal::master;
+
 using namespace process;
 
 using mesos::internal::log::Log;
@@ -74,7 +76,7 @@ using ::testing::WithParamInterface;
 
 namespace mesos {
 namespace internal {
-namespace master {
+namespace tests {
 
 using state::Entry;
 using state::LogStorage;
@@ -526,6 +528,6 @@ TEST_P(Registrar_BENCHMARK_Test, performance)
   LOG(INFO) << "Removed " << slaveCount << " slaves in " << watch.elapsed();
 }
 
-} // namespace master {
+} // namespace tests {
 } // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/c07ac620/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index dc712fc..53adae0 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -58,7 +58,7 @@
 #include "tests/mesos.hpp"
 #include "tests/utils.hpp"
 
-using namespace mesos::internal::tests;
+using namespace mesos::internal::slave;
 
 using namespace process;
 
@@ -79,7 +79,7 @@ using testing::SaveArg;
 
 namespace mesos {
 namespace internal {
-namespace slave {
+namespace tests {
 
 
 class SlaveStateTest : public TemporaryDirectoryTest {};
@@ -3783,6 +3783,6 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PidNamespaceBackward)
 
 #endif // __linux__
 
-} // namespace slave {
+} // namespace tests {
 } // namespace internal {
 } // namespace mesos {


[7/7] mesos git commit: Enclosed tests in "mesos::internal::tests" namespace.

Posted by be...@apache.org.
Enclosed tests in "mesos::internal::tests" namespace.

Enclosed tests in "mesos::internal::tests" namespace or
"mesos::internal::slave" namespace as needed.

The idea was to avoid doing a "using namespace
mesos::internal::slave;" or similar things.

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


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

Branch: refs/heads/master
Commit: e9357070be70b22034e6593fff67d0fbcb5c35db
Parents: 40b5964
Author: Kapil Arya <ka...@mesosphere.io>
Authored: Sun Feb 22 14:01:14 2015 -0800
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Sun Feb 22 22:00:08 2015 -0800

----------------------------------------------------------------------
 src/tests/attributes_tests.cpp                  | 11 ++++++---
 src/tests/authentication_tests.cpp              | 14 +++++++----
 src/tests/authorization_tests.cpp               | 13 ++++++----
 src/tests/cgroups_isolator_tests.cpp            | 13 ++++++----
 src/tests/cgroups_tests.cpp                     | 11 +++++++--
 src/tests/composing_containerizer_tests.cpp     | 12 +++++++---
 src/tests/containerizer_tests.cpp               | 15 ++++++++----
 src/tests/credentials_tests.cpp                 | 15 ++++++++----
 src/tests/disk_quota_tests.cpp                  | 12 ++++++----
 src/tests/docker_containerizer_tests.cpp        | 12 ++++++----
 src/tests/docker_tests.cpp                      | 12 ++++++----
 src/tests/exception_tests.cpp                   | 12 ++++++----
 src/tests/external_containerizer_test.cpp       | 12 ++++++----
 src/tests/fault_tolerance_tests.cpp             | 11 ++++++---
 src/tests/fetcher_tests.cpp                     | 16 ++++++++-----
 src/tests/files_tests.cpp                       | 11 ++++++---
 src/tests/fs_tests.cpp                          | 10 +++++---
 src/tests/gc_tests.cpp                          | 12 ++++++----
 src/tests/group_tests.cpp                       | 11 ++++++---
 src/tests/health_check_tests.cpp                | 12 ++++++----
 src/tests/hierarchical_allocator_tests.cpp      | 11 ++++++---
 src/tests/hook_tests.cpp                        | 11 ++++++---
 src/tests/isolator.hpp                          |  2 +-
 src/tests/isolator_tests.cpp                    | 13 ++++++----
 src/tests/log_tests.cpp                         | 11 ++++++---
 src/tests/logging_tests.cpp                     | 10 ++++++--
 src/tests/master_allocator_tests.cpp            | 12 ++++++----
 src/tests/master_authorization_tests.cpp        | 12 ++++++----
 src/tests/master_contender_detector_tests.cpp   | 12 ++++++----
 src/tests/master_slave_reconciliation_tests.cpp | 11 ++++++---
 src/tests/master_tests.cpp                      | 12 ++++++----
 src/tests/master_validation_tests.cpp           | 10 ++++++--
 src/tests/metrics_tests.cpp                     | 11 ++++++---
 src/tests/module.cpp                            | 15 ++++++++----
 src/tests/module_tests.cpp                      | 14 ++++++++---
 src/tests/monitor_tests.cpp                     | 12 ++++++----
 src/tests/ns_tests.cpp                          | 11 ++++++---
 src/tests/partition_tests.cpp                   | 12 ++++++----
 src/tests/perf_tests.cpp                        |  8 +++++++
 src/tests/persistent_volume_tests.cpp           | 15 ++++++++----
 src/tests/port_mapping_tests.cpp                | 14 ++++++-----
 src/tests/protobuf_io_tests.cpp                 | 12 ++++++----
 src/tests/rate_limiting_tests.cpp               |  2 --
 src/tests/reconciliation_tests.cpp              | 12 ++++++----
 src/tests/registrar_tests.cpp                   | 19 +++++++--------
 src/tests/registrar_zookeeper_tests.cpp         | 12 ++++++----
 src/tests/repair_tests.cpp                      | 15 +++++++-----
 src/tests/resource_offers_tests.cpp             | 12 ++++++----
 src/tests/resources_tests.cpp                   | 11 ++++++---
 src/tests/routing_tests.cpp                     |  8 +++++++
 src/tests/scheduler_tests.cpp                   | 12 ++++++----
 src/tests/shutdown_tests.cpp                    | 15 ++++++++----
 src/tests/slave_recovery_tests.cpp              | 14 ++++++-----
 src/tests/slave_tests.cpp                       | 12 ++++++----
 src/tests/sorter_tests.cpp                      | 10 ++++++--
 src/tests/state_tests.cpp                       | 25 ++++++++++++--------
 src/tests/status_update_manager_tests.cpp       | 13 ++++++----
 src/tests/values_tests.cpp                      | 10 ++++++--
 src/tests/zookeeper_tests.cpp                   | 10 ++++++--
 59 files changed, 486 insertions(+), 224 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/attributes_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/attributes_tests.cpp b/src/tests/attributes_tests.cpp
index 240a8ca..2e10eaf 100644
--- a/src/tests/attributes_tests.cpp
+++ b/src/tests/attributes_tests.cpp
@@ -23,11 +23,12 @@
 
 #include "common/attributes.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-
 using std::string;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 TEST(AttributesTest, Parsing)
 {
@@ -65,3 +66,7 @@ TEST(AttributesTest, Equality)
   EXPECT_NE(a, Attributes::parse("cpus:45.55;ports:45.55;rack:45.55"));
   EXPECT_NE(Attributes::parse(""), a);
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/authentication_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/authentication_tests.cpp b/src/tests/authentication_tests.cpp
index 5220f00..5126ed4 100644
--- a/src/tests/authentication_tests.cpp
+++ b/src/tests/authentication_tests.cpp
@@ -33,19 +33,19 @@
 #include "tests/mesos.hpp"
 #include "tests/utils.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::slave;
-using namespace mesos::internal::tests;
-
 using namespace process;
 
 using mesos::internal::master::Master;
+using mesos::internal::slave::Slave;
 
 using testing::_;
 using testing::Eq;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class AuthenticationTest : public MesosTest {};
 
@@ -834,3 +834,7 @@ TEST_F(AuthenticationTest, RejectedSchedulerFailover)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/authorization_tests.cpp b/src/tests/authorization_tests.cpp
index a8fa4cc..99bb06c 100644
--- a/src/tests/authorization_tests.cpp
+++ b/src/tests/authorization_tests.cpp
@@ -24,12 +24,13 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using namespace process;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
+
 class AuthorizationTest : public MesosTest {};
 
 
@@ -349,3 +350,7 @@ TEST_F(AuthorizationTest, PrincipalNotOfferedAnyRoleRestrictive)
   request3.mutable_roles()->add_values("ads");
   AWAIT_EXPECT_EQ(false, authorizer.get()->authorize(request3));
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/cgroups_isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cgroups_isolator_tests.cpp b/src/tests/cgroups_isolator_tests.cpp
index 2d9738f..a4ccc8e 100644
--- a/src/tests/cgroups_isolator_tests.cpp
+++ b/src/tests/cgroups_isolator_tests.cpp
@@ -29,13 +29,18 @@
 
 #include "tests/script.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::slave;
-
 using std::map;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
+
 // Run the balloon framework under a mesos containerizer.
 TEST_SCRIPT(ContainerizerTest,
             ROOT_CGROUPS_BalloonFramework,
             "balloon_framework_test.sh")
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/cgroups_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cgroups_tests.cpp b/src/tests/cgroups_tests.cpp
index 1eea57f..75c61aa 100644
--- a/src/tests/cgroups_tests.cpp
+++ b/src/tests/cgroups_tests.cpp
@@ -53,12 +53,15 @@
 
 #include "tests/mesos.hpp" // For TEST_CGROUPS_(HIERARCHY|ROOT).
 
-using namespace mesos::internal::tests;
-
 using namespace process;
 
 using std::set;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
+
 class CgroupsTest : public ::testing::Test
 {
 public:
@@ -1029,3 +1032,7 @@ TEST_F(CgroupsAnyHierarchyWithPerfEventTest, ROOT_CGROUPS_Perf)
   Future<Nothing> destroy = cgroups::destroy(hierarchy, TEST_CGROUPS_ROOT);
   AWAIT_READY(destroy);
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/composing_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/composing_containerizer_tests.cpp b/src/tests/composing_containerizer_tests.cpp
index 5ab5a36..d66f519 100644
--- a/src/tests/composing_containerizer_tests.cpp
+++ b/src/tests/composing_containerizer_tests.cpp
@@ -33,10 +33,7 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
 using namespace mesos::internal::slave;
-using namespace mesos::internal::tests;
 
 using namespace process;
 
@@ -45,6 +42,11 @@ using std::vector;
 using testing::_;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
+
 class ComposingContainerizerTest : public MesosTest {};
 
 class MockContainerizer : public slave::Containerizer
@@ -163,3 +165,7 @@ TEST_F(ComposingContainerizerTest, DestroyWhileLaunching)
   launchPromise.set(false);
   AWAIT_FAILED(launch);
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer_tests.cpp b/src/tests/containerizer_tests.cpp
index 0c87753..e6e8c8c 100644
--- a/src/tests/containerizer_tests.cpp
+++ b/src/tests/containerizer_tests.cpp
@@ -43,9 +43,7 @@
 #include "tests/mesos.hpp"
 #include "tests/utils.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::slave;
+using namespace mesos::internal::tests;
 
 using namespace mesos::slave;
 
@@ -58,6 +56,11 @@ using testing::DoAll;
 using testing::Invoke;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace slave {
+
+
 class MesosContainerizerIsolatorPreparationTest :
   public tests::TemporaryDirectoryTest
 {
@@ -322,7 +325,7 @@ class MockMesosContainerizerProcess : public MesosContainerizerProcess
 {
 public:
   MockMesosContainerizerProcess(
-      const Flags& flags,
+      const slave::Flags& flags,
       bool local,
       Fetcher* fetcher,
       const process::Owned<Launcher>& launcher,
@@ -406,3 +409,7 @@ TEST_F(MesosContainerizerDestroyTest, DestroyWhileFetching)
   // The container should still exit even if fetch didn't complete.
   AWAIT_READY(wait);
 }
+
+} // namespace slave {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/credentials_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/credentials_tests.cpp b/src/tests/credentials_tests.cpp
index c0a8ad0..ed67273 100644
--- a/src/tests/credentials_tests.cpp
+++ b/src/tests/credentials_tests.cpp
@@ -28,15 +28,12 @@
 #include "tests/mesos.hpp"
 #include "tests/utils.hpp"
 
+using namespace process;
+
 using std::map;
 using std::string;
 using std::vector;
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::slave;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 using mesos::internal::slave::Slave;
 
@@ -44,6 +41,10 @@ using process::PID;
 
 using testing::_;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 class CredentialsTest : public MesosTest {};
 
 
@@ -111,3 +112,7 @@ TEST_F(CredentialsTest, authenticatedSlaveText)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/disk_quota_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/disk_quota_tests.cpp b/src/tests/disk_quota_tests.cpp
index 3239ed2..56d82ee 100644
--- a/src/tests/disk_quota_tests.cpp
+++ b/src/tests/disk_quota_tests.cpp
@@ -48,10 +48,6 @@
 
 using namespace process;
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using std::string;
 using std::vector;
 
@@ -65,6 +61,10 @@ using mesos::internal::slave::Fetcher;
 using mesos::internal::slave::MesosContainerizer;
 using mesos::internal::slave::Slave;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class DiskUsageCollectorTest : public TemporaryDirectoryTest {};
 
@@ -394,3 +394,7 @@ TEST_F(DiskQuotaTest, ResourceStatistics)
 
   delete containerizer.get();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/docker_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/docker_containerizer_tests.cpp b/src/tests/docker_containerizer_tests.cpp
index 2105ae2..06cd3d8 100644
--- a/src/tests/docker_containerizer_tests.cpp
+++ b/src/tests/docker_containerizer_tests.cpp
@@ -40,12 +40,8 @@
 #include "slave/slave.hpp"
 #include "slave/state.hpp"
 
-
-using namespace mesos;
-using namespace mesos::internal;
 using namespace mesos::internal::slave::paths;
 using namespace mesos::internal::slave::state;
-using namespace mesos::internal::tests;
 
 using namespace process;
 
@@ -72,6 +68,10 @@ using testing::Eq;
 using testing::Invoke;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class MockDocker : public Docker
 {
@@ -2597,3 +2597,7 @@ TEST_F(DockerContainerizerTest, ROOT_DOCKER_DestroyWhilePulling)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/docker_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/docker_tests.cpp b/src/tests/docker_tests.cpp
index ef05828..5520c58 100644
--- a/src/tests/docker_tests.cpp
+++ b/src/tests/docker_tests.cpp
@@ -34,15 +34,15 @@
 #include "tests/environment.hpp"
 #include "tests/flags.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using namespace process;
 
 using std::list;
 using std::string;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 // This test tests the functionality of the docker's interfaces.
 TEST(DockerTest, ROOT_DOCKER_interface)
@@ -316,3 +316,7 @@ TEST(DockerTest, ROOT_DOCKER_CancelPull)
 
   AWAIT_DISCARDED(future);
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/exception_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/exception_tests.cpp b/src/tests/exception_tests.cpp
index 13e6d2d..9af1674 100644
--- a/src/tests/exception_tests.cpp
+++ b/src/tests/exception_tests.cpp
@@ -34,10 +34,6 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::slave::Slave;
@@ -54,6 +50,10 @@ using testing::AtMost;
 using testing::Eq;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class ExceptionTest : public MesosTest {};
 
@@ -200,3 +200,7 @@ TEST_F(ExceptionTest, DisallowSchedulerCallbacksOnAbort)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/external_containerizer_test.cpp
----------------------------------------------------------------------
diff --git a/src/tests/external_containerizer_test.cpp b/src/tests/external_containerizer_test.cpp
index 45cdeb5..ca6fe50 100644
--- a/src/tests/external_containerizer_test.cpp
+++ b/src/tests/external_containerizer_test.cpp
@@ -42,10 +42,6 @@
 #include "tests/mesos.hpp"
 #include "tests/flags.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using namespace process;
 
 using mesos::internal::master::Master;
@@ -61,6 +57,10 @@ using testing::Return;
 using testing::SaveArg;
 using testing::Invoke;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 // The external containerizer tests currently rely on a Python script
 // which needs the Mesos Python egg being built.
 // TODO(tillt): Consider providing tests that do not rely on Python.
@@ -263,3 +263,7 @@ TEST_F(ExternalContainerizerTest, DISABLED_Launch)
 }
 
 #endif // MESOS_HAS_PYTHON
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/fault_tolerance_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/fault_tolerance_tests.cpp b/src/tests/fault_tolerance_tests.cpp
index 17d2f85..9ac75b1 100644
--- a/src/tests/fault_tolerance_tests.cpp
+++ b/src/tests/fault_tolerance_tests.cpp
@@ -51,10 +51,7 @@
 #include "tests/containerizer.hpp"
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
 using namespace mesos::internal::protobuf;
-using namespace mesos::internal::tests;
 
 using mesos::internal::master::Master;
 
@@ -81,6 +78,10 @@ using testing::Not;
 using testing::Return;
 using testing::SaveArg;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class FaultToleranceTest : public MesosTest {};
 
@@ -1883,3 +1884,7 @@ TEST_F(FaultToleranceTest, SplitBrainMasters)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/fetcher_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/fetcher_tests.cpp b/src/tests/fetcher_tests.cpp
index 6af44d8..2438620 100644
--- a/src/tests/fetcher_tests.cpp
+++ b/src/tests/fetcher_tests.cpp
@@ -46,22 +46,22 @@
 #include "tests/mesos.hpp"
 #include "tests/utils.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::slave;
-using namespace mesos::internal::tests;
-
 using namespace process;
+
 using process::Subprocess;
 using process::Future;
 
-using slave::Fetcher;
+using mesos::internal::slave::Fetcher;
 
 using std::string;
 using std::map;
 
 using mesos::fetcher::FetcherInfo;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 class FetcherEnvironmentTest : public ::testing::Test {};
 
 
@@ -635,3 +635,7 @@ TEST_F(FetcherTest, ExtractNotExecutable)
 
   ASSERT_SOME(os::rm(path.get()));
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/files_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/files_tests.cpp b/src/tests/files_tests.cpp
index 6317894..53771cd 100644
--- a/src/tests/files_tests.cpp
+++ b/src/tests/files_tests.cpp
@@ -35,9 +35,6 @@
 
 #include "tests/utils.hpp"
 
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using process::Future;
 
 using process::http::BadRequest;
@@ -47,6 +44,10 @@ using process::http::Response;
 
 using std::string;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class FilesTest : public TemporaryDirectoryTest {};
 
@@ -297,3 +298,7 @@ TEST_F(FilesTest, DownloadTest)
   AWAIT_EXPECT_RESPONSE_HEADER_EQ("image/gif", "Content-Type", response);
   AWAIT_EXPECT_RESPONSE_BODY_EQ(data, response);
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/fs_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/fs_tests.cpp b/src/tests/fs_tests.cpp
index 946242d..39d212f 100644
--- a/src/tests/fs_tests.cpp
+++ b/src/tests/fs_tests.cpp
@@ -28,9 +28,9 @@
 
 #include "linux/fs.hpp"
 
-
-using namespace mesos;
-using namespace mesos::internal;
+namespace mesos {
+namespace internal {
+namespace tests {
 
 using fs::MountTable;
 using fs::FileSystemTable;
@@ -93,3 +93,7 @@ TEST(FsTest, FileSystemTableRead)
 
   EXPECT_SOME(root);
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/gc_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/gc_tests.cpp b/src/tests/gc_tests.cpp
index 04a453c..deaa6b1 100644
--- a/src/tests/gc_tests.cpp
+++ b/src/tests/gc_tests.cpp
@@ -56,10 +56,6 @@
 #include "tests/mesos.hpp"
 #include "tests/utils.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::slave::GarbageCollector;
@@ -80,6 +76,10 @@ using testing::AtMost;
 using testing::Return;
 using testing::SaveArg;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 class GarbageCollectorTest : public TemporaryDirectoryTest {};
 
 TEST_F(GarbageCollectorTest, Schedule)
@@ -818,3 +818,7 @@ TEST_F(GarbageCollectorIntegrationTest, Unschedule)
 
   Shutdown(); // Must shutdown before 'isolator' gets deallocated.
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/group_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/group_tests.cpp b/src/tests/group_tests.cpp
index 144ba82..13e89c3 100644
--- a/src/tests/group_tests.cpp
+++ b/src/tests/group_tests.cpp
@@ -33,9 +33,6 @@
 #include "zookeeper/authentication.hpp"
 #include "zookeeper/group.hpp"
 
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using zookeeper::Group;
 using zookeeper::GroupProcess;
 
@@ -45,6 +42,10 @@ using std::string;
 
 using testing::_;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 class GroupTest : public ZooKeeperTest {};
 
 
@@ -433,3 +434,7 @@ TEST_F(GroupTest, LabelledGroup)
   ASSERT_TRUE(membership.get().cancelled().isReady());
   ASSERT_TRUE(membership.get().cancelled().get());
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/health_check_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/health_check_tests.cpp b/src/tests/health_check_tests.cpp
index 7278f07..157a56a 100644
--- a/src/tests/health_check_tests.cpp
+++ b/src/tests/health_check_tests.cpp
@@ -32,10 +32,6 @@
 #include "tests/mesos.hpp"
 #include "tests/utils.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::slave::Containerizer;
@@ -58,6 +54,10 @@ using std::queue;
 using std::string;
 using std::map;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class HealthCheckTest : public MesosTest
 {
@@ -615,3 +615,7 @@ TEST_F(HealthCheckTest, DISABLED_GracePeriod)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/hierarchical_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hierarchical_allocator_tests.cpp b/src/tests/hierarchical_allocator_tests.cpp
index 42b172a..93753d1 100644
--- a/src/tests/hierarchical_allocator_tests.cpp
+++ b/src/tests/hierarchical_allocator_tests.cpp
@@ -39,9 +39,6 @@
 #include "master/allocator/allocator.hpp"
 #include "master/allocator/mesos/hierarchical.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-
 using mesos::internal::master::MIN_CPUS;
 using mesos::internal::master::MIN_MEM;
 
@@ -56,6 +53,10 @@ using std::queue;
 using std::string;
 using std::vector;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 struct Allocation
 {
@@ -783,3 +784,7 @@ TEST_F(HierarchicalAllocatorTest, Whitelist)
   EXPECT_TRUE(allocation.get().resources.contains(slave.id()));
   EXPECT_EQ(slave.resources(), sum(allocation.get().resources.values()));
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/hook_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/hook_tests.cpp b/src/tests/hook_tests.cpp
index 44f73ef..f4b4f51 100644
--- a/src/tests/hook_tests.cpp
+++ b/src/tests/hook_tests.cpp
@@ -39,9 +39,6 @@
 
 using std::string;
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
 using namespace mesos::modules;
 
 using mesos::internal::master::Master;
@@ -56,6 +53,10 @@ using std::vector;
 using testing::_;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 const char* HOOK_MODULE_LIBRARY_NAME = "testhook";
 const char* HOOK_MODULE_NAME = "org_apache_mesos_TestHook";
 
@@ -270,3 +271,7 @@ TEST_F(HookTest, DISABLED_VerifySlaveLaunchExecutorHook)
   // Verify that the file is not present.
   EXPECT_FALSE(os::isfile(path.get()));
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/isolator.hpp
----------------------------------------------------------------------
diff --git a/src/tests/isolator.hpp b/src/tests/isolator.hpp
index 3c3dde5..7d1a36e 100644
--- a/src/tests/isolator.hpp
+++ b/src/tests/isolator.hpp
@@ -41,7 +41,7 @@ public:
 
   MOCK_METHOD1(
       recover,
-      process::Future<Nothing>(const std::list<slave::ExecutorRunState>&));
+      process::Future<Nothing>(const std::list<mesos::slave::ExecutorRunState>&));
 
   virtual process::Future<Option<CommandInfo> > prepare(
       const ContainerID& containerId,

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/isolator_tests.cpp b/src/tests/isolator_tests.cpp
index ebed707..f732396 100644
--- a/src/tests/isolator_tests.cpp
+++ b/src/tests/isolator_tests.cpp
@@ -71,11 +71,6 @@
 #include "tests/module.hpp"
 #include "tests/utils.hpp"
 
-using namespace mesos;
-
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using namespace process;
 
 using mesos::internal::master::Master;
@@ -109,6 +104,10 @@ using testing::DoAll;
 using testing::Return;
 using testing::SaveArg;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 static int childSetup(int pipes[2])
 {
@@ -1143,3 +1142,7 @@ TYPED_TEST(UserCgroupIsolatorTest, ROOT_CGROUPS_UserCgroup)
   delete isolator.get();
 }
 #endif // __linux__
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/log_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/log_tests.cpp b/src/tests/log_tests.cpp
index 0088706..f2dd47c 100644
--- a/src/tests/log_tests.cpp
+++ b/src/tests/log_tests.cpp
@@ -59,10 +59,7 @@
 #include "tests/zookeeper.hpp"
 #endif
 
-using namespace mesos;
-using namespace mesos::internal;
 using namespace mesos::internal::log;
-using namespace mesos::internal::tests;
 
 using namespace process;
 
@@ -74,6 +71,10 @@ using testing::_;
 using testing::Eq;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 TEST(NetworkTest, Watch)
 {
@@ -2057,3 +2058,7 @@ TEST_F(CoordinatorTest, LearnedOnOneReplica_NotLearnedOnAnother) {}
 
 TEST_F(CoordinatorTest,
        LearnedOnOneReplica_NotLearnedOnAnother_AnotherFailsAndRecovers) {}
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/logging_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/logging_tests.cpp b/src/tests/logging_tests.cpp
index 842cebc..8901edd 100644
--- a/src/tests/logging_tests.cpp
+++ b/src/tests/logging_tests.cpp
@@ -26,12 +26,14 @@
 
 #include "logging/logging.hpp"
 
-using namespace mesos::internal;
-
 using process::http::BadRequest;
 using process::http::OK;
 using process::http::Response;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 TEST(LoggingTest, Toggle)
 {
@@ -78,3 +80,7 @@ TEST(LoggingTest, Toggle)
       "Invalid level '-1'.\n",
       response);
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/master_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_allocator_tests.cpp b/src/tests/master_allocator_tests.cpp
index 1d6326c..a432d02 100644
--- a/src/tests/master_allocator_tests.cpp
+++ b/src/tests/master_allocator_tests.cpp
@@ -43,10 +43,6 @@
 #include "tests/containerizer.hpp"
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::allocator::Allocator;
 using mesos::internal::master::allocator::HierarchicalDRFAllocator;
 
@@ -69,6 +65,10 @@ using testing::DoDefault;
 using testing::Eq;
 using testing::SaveArg;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 template <typename T>
 class MasterAllocatorTest : public MesosTest
@@ -1438,3 +1438,7 @@ TYPED_TEST(MasterAllocatorTest, SlaveReregistersFirst)
 
   this->Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/master_authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_authorization_tests.cpp b/src/tests/master_authorization_tests.cpp
index 81d1a6d..55dae40 100644
--- a/src/tests/master_authorization_tests.cpp
+++ b/src/tests/master_authorization_tests.cpp
@@ -41,10 +41,6 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::master::allocator::MesosAllocatorProcess;
@@ -64,6 +60,10 @@ using testing::AtMost;
 using testing::DoAll;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class MasterAuthorizationTest : public MesosTest {};
 
@@ -1030,3 +1030,7 @@ TEST_F(MasterAuthorizationTest, FrameworkRemovedBeforeReregistration)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/master_contender_detector_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_contender_detector_tests.cpp b/src/tests/master_contender_detector_tests.cpp
index a34b726..f8c7f2c 100644
--- a/src/tests/master_contender_detector_tests.cpp
+++ b/src/tests/master_contender_detector_tests.cpp
@@ -54,10 +54,6 @@
 #include "tests/zookeeper.hpp"
 #endif
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using namespace zookeeper;
 
 using mesos::internal::master::Master;
@@ -78,6 +74,10 @@ using testing::_;
 using testing::AtMost;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class MasterContenderDetectorTest : public MesosTest {};
 
@@ -835,3 +835,7 @@ TEST_F(ZooKeeperMasterContenderDetectorTest,
 }
 
 #endif // MESOS_HAS_JAVA
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/master_slave_reconciliation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_slave_reconciliation_tests.cpp b/src/tests/master_slave_reconciliation_tests.cpp
index 11b043f..230f529 100644
--- a/src/tests/master_slave_reconciliation_tests.cpp
+++ b/src/tests/master_slave_reconciliation_tests.cpp
@@ -41,10 +41,7 @@
 #include "tests/containerizer.hpp"
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
 using namespace mesos::internal::protobuf;
-using namespace mesos::internal::tests;
 
 using mesos::internal::master::Master;
 
@@ -62,6 +59,10 @@ using testing::AtMost;
 using testing::Return;
 using testing::SaveArg;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class MasterSlaveReconciliationTest : public MesosTest {};
 
@@ -531,3 +532,7 @@ TEST_F(MasterSlaveReconciliationTest, SlaveReregisterTerminalTask)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/master_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 9927fd5..24cff38 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -58,10 +58,6 @@
 #include "tests/containerizer.hpp"
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::master::allocator::MesosAllocatorProcess;
@@ -88,6 +84,10 @@ using testing::Not;
 using testing::Return;
 using testing::SaveArg;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 // Those of the overall Mesos master/slave/scheduler/driver tests
 // that seem vaguely more master than slave-related are in this file.
 // The others are in "slave_tests.cpp".
@@ -3048,3 +3048,7 @@ TEST_F(MasterTest, TaskDiscoveryInfo)
 
   Shutdown(); // Must shutdown before 'containerizer' gets deallocated.
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/master_validation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_validation_tests.cpp b/src/tests/master_validation_tests.cpp
index 81c635f..38ddb1d 100644
--- a/src/tests/master_validation_tests.cpp
+++ b/src/tests/master_validation_tests.cpp
@@ -29,12 +29,14 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal::tests;
 using namespace mesos::internal::master::validation;
 
 using google::protobuf::RepeatedPtrField;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class ResourceValidationTest : public ::testing::Test
 {
@@ -197,3 +199,7 @@ TEST_F(DestroyOperationValidationTest, UnknownPersistentVolume)
   EXPECT_NONE(operation::validate(destroy, volume));
   EXPECT_SOME(operation::validate(destroy, Resources()));
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/metrics_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/metrics_tests.cpp b/src/tests/metrics_tests.cpp
index 2caec5f..6896727 100644
--- a/src/tests/metrics_tests.cpp
+++ b/src/tests/metrics_tests.cpp
@@ -28,12 +28,13 @@
 #include "master/master.hpp"
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-
 using mesos::internal::master::Master;
 using mesos::internal::slave::Slave;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 class MetricsTest : public mesos::internal::tests::MesosTest {};
 
 TEST_F(MetricsTest, Master)
@@ -212,3 +213,7 @@ TEST_F(MetricsTest, Slave)
   EXPECT_EQ(1u, stats.values.count("slave/disk_used"));
   EXPECT_EQ(1u, stats.values.count("slave/disk_percent"));
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/module.cpp
----------------------------------------------------------------------
diff --git a/src/tests/module.cpp b/src/tests/module.cpp
index bfd5aae..b81144f 100644
--- a/src/tests/module.cpp
+++ b/src/tests/module.cpp
@@ -30,11 +30,12 @@
 
 using std::string;
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
 using namespace mesos::modules;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 static hashmap<ModuleID, string> moduleNames;
 
 
@@ -130,7 +131,7 @@ static void addAnonymousModules(Modules* modules)
 }
 
 
-Try<Nothing> tests::initModules(const Option<Modules>& modules)
+Try<Nothing> initModules(const Option<Modules>& modules)
 {
   // First get the user provided modules.
   Modules mergedModules;
@@ -155,10 +156,14 @@ Try<Nothing> tests::initModules(const Option<Modules>& modules)
 
 
 // Mapping from module ID to the actual module name.
-Try<string> tests::getModuleName(ModuleID id)
+Try<string> getModuleName(ModuleID id)
 {
   if (!moduleNames.contains(id)) {
     return Error("Module '" + stringify(id) + "' not found");
   }
   return moduleNames[id];
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/module_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/module_tests.cpp b/src/tests/module_tests.cpp
index 643e712..60497aa 100644
--- a/src/tests/module_tests.cpp
+++ b/src/tests/module_tests.cpp
@@ -35,10 +35,14 @@
 
 using std::string;
 
-using namespace mesos;
-using namespace mesos::internal::modules;
 using namespace mesos::internal::slave;
-using namespace mesos::internal::tests;
+using namespace mesos::modules;
+
+using mesos::slave::Isolator;
+
+namespace mesos {
+namespace internal {
+namespace tests {
 
 const char* DEFAULT_MODULE_LIBRARY_NAME = "examplemodule";
 const char* DEFAULT_MODULE_NAME = "org_apache_mesos_TestModule";
@@ -484,3 +488,7 @@ TEST_F(ModuleTest, OlderModuleLibrary)
   moduleBase->mesosVersion = "0.1.0";
   EXPECT_ERROR(ModuleManager::load(defaultModules));
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/monitor_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/monitor_tests.cpp b/src/tests/monitor_tests.cpp
index a1aca5f..899af44 100644
--- a/src/tests/monitor_tests.cpp
+++ b/src/tests/monitor_tests.cpp
@@ -38,10 +38,6 @@
 
 #include "tests/containerizer.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using process::Clock;
 using process::Future;
 
@@ -57,6 +53,10 @@ using testing::_;
 using testing::DoAll;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 TEST(MonitorTest, Collection)
 {
@@ -297,3 +297,7 @@ TEST(MonitorTest, Statistics)
       response);
   AWAIT_EXPECT_RESPONSE_BODY_EQ("[]", response);
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/ns_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/ns_tests.cpp b/src/tests/ns_tests.cpp
index 046ea26..866f0e7 100644
--- a/src/tests/ns_tests.cpp
+++ b/src/tests/ns_tests.cpp
@@ -40,9 +40,6 @@
 
 #include "tests/flags.hpp"
 
-
-using namespace mesos::internal;
-
 using namespace process;
 
 using std::list;
@@ -50,6 +47,10 @@ using std::set;
 using std::string;
 using std::vector;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 // Helper for cloneChild() which expects an int(void*).
 static int cloneChildHelper(void* _func)
@@ -286,3 +287,7 @@ TEST(NsTest, ROOT_destroy)
     }
   }
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/partition_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/partition_tests.cpp b/src/tests/partition_tests.cpp
index edf46ac..bb96aed 100644
--- a/src/tests/partition_tests.cpp
+++ b/src/tests/partition_tests.cpp
@@ -37,10 +37,6 @@
 #include "tests/flags.hpp"
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::master::allocator::MesosAllocatorProcess;
@@ -59,6 +55,10 @@ using testing::AtMost;
 using testing::Eq;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class PartitionTest : public MesosTest {};
 
@@ -468,3 +468,7 @@ TEST_F(PartitionTest, OneWayPartitionMasterToSlave)
   // Slave should re-register.
   AWAIT_READY(slaveReregisteredMessage);
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/perf_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/perf_tests.cpp b/src/tests/perf_tests.cpp
index 55a2dae..16f3226 100644
--- a/src/tests/perf_tests.cpp
+++ b/src/tests/perf_tests.cpp
@@ -33,6 +33,10 @@ using std::string;
 
 using namespace process;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 class PerfTest : public ::testing::Test {};
 
 
@@ -145,3 +149,7 @@ TEST_F(PerfTest, ROOT_SampleInit)
   ASSERT_TRUE(statistics.get().has_task_clock());
   EXPECT_LT(0.0, statistics.get().task_clock());
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/persistent_volume_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/persistent_volume_tests.cpp b/src/tests/persistent_volume_tests.cpp
index b4f2298..7c3f9cb 100644
--- a/src/tests/persistent_volume_tests.cpp
+++ b/src/tests/persistent_volume_tests.cpp
@@ -45,18 +45,19 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::tests;
-
 using namespace process;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using std::string;
 using std::vector;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class PersistentVolumeTest : public MesosTest
 {
@@ -331,3 +332,7 @@ TEST_F(PersistentVolumeTest, PreparePersistentVolume)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/port_mapping_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/port_mapping_tests.cpp b/src/tests/port_mapping_tests.cpp
index f15c071..a03de23 100644
--- a/src/tests/port_mapping_tests.cpp
+++ b/src/tests/port_mapping_tests.cpp
@@ -60,12 +60,6 @@
 #include "tests/mesos.hpp"
 #include "tests/utils.hpp"
 
-using namespace mesos;
-
-using namespace mesos::internal;
-using namespace mesos::internal::slave;
-using namespace mesos::internal::tests;
-
 using namespace process;
 
 using namespace routing;
@@ -92,6 +86,10 @@ using testing::_;
 using testing::Eq;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 // An old glibc might not have this symbol.
 #ifndef MNT_DETACH
@@ -2052,3 +2050,7 @@ TEST_F(PortMappingMesosTest, ROOT_CleanUpOrphanTest)
   Shutdown();
   delete containerizer2.get();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/protobuf_io_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/protobuf_io_tests.cpp b/src/tests/protobuf_io_tests.cpp
index b2383b0..f5e041c 100644
--- a/src/tests/protobuf_io_tests.cpp
+++ b/src/tests/protobuf_io_tests.cpp
@@ -32,14 +32,14 @@
 
 #include "tests/utils.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using std::string;
 
 using google::protobuf::RepeatedPtrField;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class ProtobufIOTest : public TemporaryDirectoryTest {};
 
@@ -162,3 +162,7 @@ TEST_F(ProtobufIOTest, RepeatedPtrField)
     EXPECT_EQ(expected.Get(i), actual.Get(i));
   }
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/rate_limiting_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/rate_limiting_tests.cpp b/src/tests/rate_limiting_tests.cpp
index 8630441..342d77b 100644
--- a/src/tests/rate_limiting_tests.cpp
+++ b/src/tests/rate_limiting_tests.cpp
@@ -32,8 +32,6 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
 using namespace mesos::internal::tests;
 
 using mesos::internal::master::Master;

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/reconciliation_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/reconciliation_tests.cpp b/src/tests/reconciliation_tests.cpp
index c21f4cb..b79f85e 100644
--- a/src/tests/reconciliation_tests.cpp
+++ b/src/tests/reconciliation_tests.cpp
@@ -43,10 +43,6 @@
 #include "tests/containerizer.hpp"
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::slave::Slave;
@@ -65,6 +61,10 @@ using testing::DoAll;
 using testing::Return;
 using testing::SaveArg;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 class ReconciliationTest : public MesosTest {};
 
 
@@ -889,3 +889,7 @@ TEST_F(ReconciliationTest, ReconcileStatusUpdateTaskState)
 
   Shutdown(); // Must shutdown before the detector gets de-allocated.
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/registrar_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/registrar_tests.cpp b/src/tests/registrar_tests.cpp
index 37d9dba..e9fb928 100644
--- a/src/tests/registrar_tests.cpp
+++ b/src/tests/registrar_tests.cpp
@@ -53,19 +53,10 @@
 
 #include "tests/utils.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-
 using namespace process;
 
-using log::Log;
-using log::Replica;
-
-using state::Entry;
-using state::LogStorage;
-using state::Storage;
-
-using state::protobuf::State;
+using mesos::internal::log::Log;
+using mesos::internal::log::Replica;
 
 using std::map;
 using std::set;
@@ -85,6 +76,12 @@ namespace mesos {
 namespace internal {
 namespace master {
 
+using state::Entry;
+using state::LogStorage;
+using state::Storage;
+
+using state::protobuf::State;
+
 // TODO(xujyan): This class copies code from LogStateTest. It would
 // be nice to find a common location for log related base tests when
 // there are more uses of it.

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/registrar_zookeeper_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/registrar_zookeeper_tests.cpp b/src/tests/registrar_zookeeper_tests.cpp
index 687fe58..42bc2a2 100644
--- a/src/tests/registrar_zookeeper_tests.cpp
+++ b/src/tests/registrar_zookeeper_tests.cpp
@@ -34,10 +34,6 @@
 #include "tests/containerizer.hpp"
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::slave::Slave;
@@ -53,6 +49,10 @@ using testing::AtMost;
 using testing::DoAll;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class RegistrarZooKeeperTest : public MesosZooKeeperTest {};
 
@@ -123,3 +123,7 @@ TEST_F(RegistrarZooKeeperTest, TaskRunning)
 
   Shutdown(); // Must shutdown before 'containerizer' gets deallocated.
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/repair_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/repair_tests.cpp b/src/tests/repair_tests.cpp
index 62ff724..4d513ed 100644
--- a/src/tests/repair_tests.cpp
+++ b/src/tests/repair_tests.cpp
@@ -29,11 +29,6 @@
 
 #include "tests/mesos.hpp"
 
-
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using process::Future;
@@ -48,6 +43,10 @@ using std::vector;
 
 using testing::_;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class HealthTest : public MesosTest {};
 
@@ -71,7 +70,7 @@ string stringify(const JsonResponse& response)
 
   object.values["isHealthy"] = response.isHealthy;
 
-  return stringify(object);
+  return ::stringify(object);
 }
 
 
@@ -199,3 +198,7 @@ TEST_F(HealthTest, ObserveEndpoint)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/resource_offers_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resource_offers_tests.cpp b/src/tests/resource_offers_tests.cpp
index 5e1b0db..d1eb2fc 100644
--- a/src/tests/resource_offers_tests.cpp
+++ b/src/tests/resource_offers_tests.cpp
@@ -34,10 +34,6 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::slave::Slave;
@@ -51,6 +47,10 @@ using testing::_;
 using testing::AtMost;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 // TODO(jieyu): All of the task validation tests have the same flow:
 // launch a task, expect an update of a particular format (invalid w/
@@ -927,3 +927,7 @@ TEST_F(ResourceOffersTest, Request)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/resources_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/resources_tests.cpp b/src/tests/resources_tests.cpp
index 4744e87..4298d10 100644
--- a/src/tests/resources_tests.cpp
+++ b/src/tests/resources_tests.cpp
@@ -28,15 +28,16 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
 using namespace mesos::internal::master;
-using namespace mesos::internal::tests;
 
 using std::ostringstream;
 using std::pair;
 using std::string;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 TEST(ResourcesTest, Parsing)
 {
@@ -977,3 +978,7 @@ TEST(ResourcesOperationTest, CreatePersistentVolume)
 
   EXPECT_ERROR(total.apply(create2));
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/routing_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/routing_tests.cpp b/src/tests/routing_tests.cpp
index 962cff2..6809659 100644
--- a/src/tests/routing_tests.cpp
+++ b/src/tests/routing_tests.cpp
@@ -60,6 +60,10 @@ using std::set;
 using std::string;
 using std::vector;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 static const string TEST_VETH_LINK = "veth-test";
 static const string TEST_PEER_LINK = "veth-peer";
@@ -1085,3 +1089,7 @@ TEST_F(RoutingVethTest, ROOT_HandleGeneration)
   // will find the handle matches the first filter.
   EXPECT_SOME_TRUE(ip::remove(TEST_VETH_LINK, ingress::HANDLE, classifier2));
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/scheduler_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/scheduler_tests.cpp b/src/tests/scheduler_tests.cpp
index 59cb412..4a89a7a 100644
--- a/src/tests/scheduler_tests.cpp
+++ b/src/tests/scheduler_tests.cpp
@@ -47,10 +47,6 @@
 #include "tests/containerizer.hpp"
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::slave::Containerizer;
@@ -79,6 +75,10 @@ using testing::AtMost;
 using testing::DoAll;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 class SchedulerTest : public MesosTest
 {
@@ -514,3 +514,7 @@ TEST_F(MesosSchedulerDriverTest, ExplicitAcknowledgementsUnsetSlaveID)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/shutdown_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/shutdown_tests.cpp b/src/tests/shutdown_tests.cpp
index bb48ee0..b3e999e 100644
--- a/src/tests/shutdown_tests.cpp
+++ b/src/tests/shutdown_tests.cpp
@@ -40,11 +40,6 @@
 
 using std::string;
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::slave;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 using mesos::internal::slave::Slave;
 
@@ -61,8 +56,14 @@ using testing::Eq;
 using testing::SaveArg;
 using testing::Return;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
+
 class ShutdownTest : public MesosTest {};
 
+
 // Testing /master/shutdown so this endopoint  shuts down
 // designated framework or return adequate error.
 
@@ -310,3 +311,7 @@ TEST_F(ShutdownTest, ShutdownEndpointNoHeader)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/slave_recovery_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_recovery_tests.cpp b/src/tests/slave_recovery_tests.cpp
index 7fbc434..dc712fc 100644
--- a/src/tests/slave_recovery_tests.cpp
+++ b/src/tests/slave_recovery_tests.cpp
@@ -58,9 +58,6 @@
 #include "tests/mesos.hpp"
 #include "tests/utils.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::slave;
 using namespace mesos::internal::tests;
 
 using namespace process;
@@ -68,9 +65,6 @@ using namespace process;
 using google::protobuf::RepeatedPtrField;
 
 using mesos::internal::master::Master;
-using mesos::internal::slave::Containerizer;
-using mesos::internal::slave::Fetcher;
-using mesos::internal::slave::GarbageCollectorProcess;
 
 using std::map;
 using std::string;
@@ -83,6 +77,10 @@ using testing::Eq;
 using testing::Return;
 using testing::SaveArg;
 
+namespace mesos {
+namespace internal {
+namespace slave {
+
 
 class SlaveStateTest : public TemporaryDirectoryTest {};
 
@@ -3784,3 +3782,7 @@ TEST_F(MesosContainerizerSlaveRecoveryTest, CGROUPS_ROOT_PidNamespaceBackward)
 }
 
 #endif // __linux__
+
+} // namespace slave {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/slave_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index 2e0346f..60c9f35 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -58,10 +58,6 @@
 #include "tests/flags.hpp"
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using namespace process;
 
 using mesos::internal::master::Master;
@@ -87,6 +83,10 @@ using testing::Return;
 using testing::SaveArg;
 using testing::Sequence;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 // Those of the overall Mesos master/slave/scheduler/driver tests
 // that seem vaguely more slave than master-related are in this file.
 // The others are in "master_tests.cpp".
@@ -1800,3 +1800,7 @@ TEST_F(SlaveTest, TaskLabels)
 
   Shutdown(); // Must shutdown before 'containerizer' gets deallocated.
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/sorter_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/sorter_tests.cpp b/src/tests/sorter_tests.cpp
index 5cae191..4244235 100644
--- a/src/tests/sorter_tests.cpp
+++ b/src/tests/sorter_tests.cpp
@@ -30,13 +30,15 @@
 
 #include "master/allocator/sorter/drf/sorter.hpp"
 
-using namespace mesos;
-
 using mesos::internal::master::allocator::DRFSorter;
 
 using std::list;
 using std::string;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 TEST(SorterTest, DRFSorter)
 {
@@ -228,3 +230,7 @@ TEST(SorterTest, Update)
 
   EXPECT_EQ(newAllocation.get(), sorter.allocation("a"));
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/state_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/state_tests.cpp b/src/tests/state_tests.cpp
index 398ecaa..b8cddc5 100644
--- a/src/tests/state_tests.cpp
+++ b/src/tests/state_tests.cpp
@@ -59,12 +59,19 @@
 #include "tests/zookeeper.hpp"
 #endif
 
-using namespace mesos;
-using namespace mesos::internal;
 using namespace mesos::internal::log;
 
 using namespace process;
 
+using std::list;
+using std::set;
+using std::string;
+using std::vector;
+
+namespace mesos {
+namespace internal {
+namespace tests {
+
 using state::LevelDBStorage;
 using state::Operation;
 using state::Storage;
@@ -75,15 +82,9 @@ using state::ZooKeeperStorage;
 using state::protobuf::State;
 using state::protobuf::Variable;
 
-using std::list;
-using std::set;
-using std::string;
-using std::vector;
-
-using mesos::internal::tests::TemporaryDirectoryTest;
+typedef mesos::internal::Registry::Slaves Slaves;
+typedef mesos::internal::Registry::Slave Slave;
 
-typedef mesos::Registry::Slaves Slaves;
-typedef mesos::Registry::Slave Slave;
 
 void FetchAndStoreAndFetch(State* state)
 {
@@ -757,3 +758,7 @@ TEST_F(ZooKeeperStateTest, Names)
   Names(state);
 }
 #endif // MESOS_HAS_JAVA
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/status_update_manager_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/status_update_manager_tests.cpp b/src/tests/status_update_manager_tests.cpp
index 6ff7320..216a22e 100644
--- a/src/tests/status_update_manager_tests.cpp
+++ b/src/tests/status_update_manager_tests.cpp
@@ -47,10 +47,6 @@
 
 #include "tests/mesos.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
-
 using mesos::internal::master::Master;
 
 using mesos::internal::slave::Slave;
@@ -68,6 +64,11 @@ using testing::AtMost;
 using testing::Return;
 using testing::SaveArg;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
+
 // TODO(benh): Move this into utils, make more generic, and use in
 // other tests.
 vector<TaskInfo> createTasks(const Offer& offer)
@@ -857,3 +858,7 @@ TEST_F(StatusUpdateManagerTest, LatestTaskState)
 
   Shutdown();
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/values_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/values_tests.cpp b/src/tests/values_tests.cpp
index 35d3b3e..fc35d97 100644
--- a/src/tests/values_tests.cpp
+++ b/src/tests/values_tests.cpp
@@ -28,12 +28,14 @@
 
 #include "master/master.hpp"
 
-using namespace mesos;
-using namespace mesos::internal;
 using namespace mesos::internal::values;
 
 using std::string;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 TEST(ValuesTest, ValidInput)
 {
@@ -99,3 +101,7 @@ TEST(ValuesTest, SetSubtraction)
 
   EXPECT_EQ(set3, parse("{sda4}").get().set());
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/e9357070/src/tests/zookeeper_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/zookeeper_tests.cpp b/src/tests/zookeeper_tests.cpp
index 183008e..7d1c066 100644
--- a/src/tests/zookeeper_tests.cpp
+++ b/src/tests/zookeeper_tests.cpp
@@ -36,11 +36,13 @@
 
 #include "tests/zookeeper.hpp"
 
-using namespace mesos::internal;
-using namespace mesos::internal::tests;
 using namespace process;
 using namespace zookeeper;
 
+namespace mesos {
+namespace internal {
+namespace tests {
+
 
 TEST_F(ZooKeeperTest, Auth)
 {
@@ -373,3 +375,7 @@ TEST_F(ZooKeeperTest, LeaderContender)
   candidated = contender->contend();
   AWAIT_READY(candidated);
 }
+
+} // namespace tests {
+} // namespace internal {
+} // namespace mesos {


[2/7] mesos git commit: Re-introduce "internal" namespace for src/*.

Posted by be...@apache.org.
http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/metrics.hpp
----------------------------------------------------------------------
diff --git a/src/master/metrics.hpp b/src/master/metrics.hpp
index 326eb36..52a8328 100644
--- a/src/master/metrics.hpp
+++ b/src/master/metrics.hpp
@@ -31,6 +31,7 @@
 #include "mesos/mesos.hpp"
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 class Master;
@@ -177,6 +178,7 @@ struct Metrics
 };
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_METRICS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/registrar.cpp
----------------------------------------------------------------------
diff --git a/src/master/registrar.cpp b/src/master/registrar.cpp
index 2bfc053..3fde8fa 100644
--- a/src/master/registrar.cpp
+++ b/src/master/registrar.cpp
@@ -46,8 +46,8 @@
 
 #include "state/protobuf.hpp"
 
-using mesos::state::protobuf::State;
-using mesos::state::protobuf::Variable;
+using mesos::internal::state::protobuf::State;
+using mesos::internal::state::protobuf::Variable;
 
 using process::dispatch;
 using process::spawn;
@@ -73,6 +73,7 @@ using std::deque;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 using process::http::Response;
@@ -541,4 +542,5 @@ Future<bool> Registrar::apply(Owned<Operation> operation)
 }
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/registrar.hpp
----------------------------------------------------------------------
diff --git a/src/master/registrar.hpp b/src/master/registrar.hpp
index 701b107..6bc78c4 100644
--- a/src/master/registrar.hpp
+++ b/src/master/registrar.hpp
@@ -32,6 +32,7 @@
 #include "state/protobuf.hpp"
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 // Forward declaration.
@@ -122,6 +123,7 @@ private:
 };
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_REGISTRAR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/registry.proto
----------------------------------------------------------------------
diff --git a/src/master/registry.proto b/src/master/registry.proto
index 29a3097..a1995e5 100644
--- a/src/master/registry.proto
+++ b/src/master/registry.proto
@@ -18,7 +18,7 @@
 
 import "mesos/mesos.proto";
 
-package mesos;
+package mesos.internal;
 
 message Registry {
   message Master {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/repairer.cpp
----------------------------------------------------------------------
diff --git a/src/master/repairer.cpp b/src/master/repairer.cpp
index 201ac25..454e137 100644
--- a/src/master/repairer.cpp
+++ b/src/master/repairer.cpp
@@ -21,6 +21,7 @@
 #include "master/repairer.hpp"
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 using std::string;
@@ -41,4 +42,5 @@ Repairer::~Repairer()
 
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/repairer.hpp
----------------------------------------------------------------------
diff --git a/src/master/repairer.hpp b/src/master/repairer.hpp
index 236b8de..d5c6b84 100644
--- a/src/master/repairer.hpp
+++ b/src/master/repairer.hpp
@@ -22,6 +22,7 @@
 #include <mesos/mesos.hpp>
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 // An abstraction for recieve notification of unhealty nodes
@@ -37,6 +38,7 @@ public:
 };
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MESOS_MASTER_REPAIRER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/validation.cpp
----------------------------------------------------------------------
diff --git a/src/master/validation.cpp b/src/master/validation.cpp
index cd1052a..e093651 100644
--- a/src/master/validation.cpp
+++ b/src/master/validation.cpp
@@ -40,6 +40,7 @@ using std::vector;
 using google::protobuf::RepeatedPtrField;
 
 namespace mesos {
+namespace internal {
 namespace master {
 namespace validation {
 
@@ -582,4 +583,5 @@ Option<Error> validate(
 
 } // namespace validation {
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/validation.hpp
----------------------------------------------------------------------
diff --git a/src/master/validation.hpp b/src/master/validation.hpp
index c312cdc..2d7416c 100644
--- a/src/master/validation.hpp
+++ b/src/master/validation.hpp
@@ -25,6 +25,7 @@
 #include <stout/option.hpp>
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 class Master;
@@ -97,4 +98,5 @@ Option<Error> validate(
 
 } // namespace validation {
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/messages/log.proto
----------------------------------------------------------------------
diff --git a/src/messages/log.proto b/src/messages/log.proto
index 12b3572..d73b33f 100644
--- a/src/messages/log.proto
+++ b/src/messages/log.proto
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package mesos.log;
+package mesos.internal.log;
 
 
 // Represents a "promise" that a replica has made. A promise is

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/messages/messages.hpp
----------------------------------------------------------------------
diff --git a/src/messages/messages.hpp b/src/messages/messages.hpp
index 25769b7..4333b90 100644
--- a/src/messages/messages.hpp
+++ b/src/messages/messages.hpp
@@ -66,6 +66,7 @@ Try<std::string> serialize(const T& t)
 // operators generated by the protobuf compiler.
 
 namespace mesos {
+namespace internal {
 
 bool operator == (const Task& left, const Task& right);
 
@@ -101,6 +102,7 @@ inline std::ostream& operator << (
 }
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MESSAGES_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/messages/messages.proto
----------------------------------------------------------------------
diff --git a/src/messages/messages.proto b/src/messages/messages.proto
index 58484ae..97c45c0 100644
--- a/src/messages/messages.proto
+++ b/src/messages/messages.proto
@@ -18,7 +18,7 @@
 
 import "mesos/mesos.proto";
 
-package mesos;
+package mesos.internal;
 
 // TODO(benh): Provide comments for each of these messages. Also,
 // consider splitting these messages into different "packages" which

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/messages/state.proto
----------------------------------------------------------------------
diff --git a/src/messages/state.proto b/src/messages/state.proto
index 7fc4883..15071c2 100644
--- a/src/messages/state.proto
+++ b/src/messages/state.proto
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package mesos.state;
+package mesos.internal.state;
 
 // Describes a state entry, a versioned (via a UUID) key/value pair.
 message Entry {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/module/manager.cpp
----------------------------------------------------------------------
diff --git a/src/module/manager.cpp b/src/module/manager.cpp
index 7a5a81e..82a38f0 100644
--- a/src/module/manager.cpp
+++ b/src/module/manager.cpp
@@ -43,6 +43,7 @@ using std::vector;
 using process::Owned;
 
 using namespace mesos;
+using namespace mesos::internal;
 using namespace mesos::modules;
 
 pthread_mutex_t ModuleManager::mutex = PTHREAD_MUTEX_INITIALIZER;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/module/manager.hpp
----------------------------------------------------------------------
diff --git a/src/module/manager.hpp b/src/module/manager.hpp
index e8333d9..9e50b40 100644
--- a/src/module/manager.hpp
+++ b/src/module/manager.hpp
@@ -65,13 +65,13 @@ public:
   //
   // NOTE: If loading fails at a particular library we don't unload
   // all of the already loaded libraries.
-  static Try<Nothing> load(const Modules& modules);
+  static Try<Nothing> load(const mesos::Modules& modules);
 
   // create() should be called only after load().
   template <typename T>
   static Try<T*> create(const std::string& moduleName)
   {
-    mesos::Lock lock(&mutex);
+    mesos::internal::Lock lock(&mutex);
     if (!moduleBases.contains(moduleName)) {
       return Error(
           "Module '" + moduleName + "' unknown");
@@ -102,7 +102,7 @@ public:
   template <typename T>
   static bool contains(const std::string& moduleName)
   {
-    mesos::Lock lock(&mutex);
+    mesos::internal::Lock lock(&mutex);
     return (moduleBases.contains(moduleName) &&
             moduleBases[moduleName]->kind == stringify(kind<T>()));
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/sched/constants.cpp
----------------------------------------------------------------------
diff --git a/src/sched/constants.cpp b/src/sched/constants.cpp
index bc85d69..517ca5c 100644
--- a/src/sched/constants.cpp
+++ b/src/sched/constants.cpp
@@ -19,6 +19,7 @@
 #include "sched/constants.hpp"
 
 namespace mesos {
+namespace internal {
 namespace scheduler {
 
 // NOTE: The default backoff factor for the scheduler (2s) is
@@ -33,4 +34,5 @@ const Duration REGISTRATION_RETRY_INTERVAL_MAX = Minutes(1);
 const std::string DEFAULT_AUTHENTICATEE = "crammd5";
 
 } // namespace scheduler {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/sched/constants.hpp
----------------------------------------------------------------------
diff --git a/src/sched/constants.hpp b/src/sched/constants.hpp
index d36d087..ac497b2 100644
--- a/src/sched/constants.hpp
+++ b/src/sched/constants.hpp
@@ -22,6 +22,7 @@
 #include <stout/duration.hpp>
 
 namespace mesos {
+namespace internal {
 namespace scheduler {
 
 // Default backoff interval used by the scheduler driver to wait
@@ -36,6 +37,7 @@ extern const Duration REGISTRATION_RETRY_INTERVAL_MAX;
 extern const std::string DEFAULT_AUTHENTICATEE;
 
 } // namespace scheduler {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SCHED_CONSTANTS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/sched/flags.hpp
----------------------------------------------------------------------
diff --git a/src/sched/flags.hpp b/src/sched/flags.hpp
index bfe01a3..4e0d56f 100644
--- a/src/sched/flags.hpp
+++ b/src/sched/flags.hpp
@@ -30,6 +30,7 @@
 #include "sched/constants.hpp"
 
 namespace mesos {
+namespace internal {
 namespace scheduler {
 
 class Flags : public logging::Flags
@@ -108,6 +109,7 @@ public:
 };
 
 } // namespace scheduler {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SCHED_FLAGS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/sched/sched.cpp
----------------------------------------------------------------------
diff --git a/src/sched/sched.cpp b/src/sched/sched.cpp
index 280eaeb..61e5d15 100644
--- a/src/sched/sched.cpp
+++ b/src/sched/sched.cpp
@@ -88,7 +88,8 @@
 #include "sched/flags.hpp"
 
 using namespace mesos;
-using namespace mesos::master;
+using namespace mesos::internal;
+using namespace mesos::internal::master;
 using namespace mesos::scheduler;
 
 using namespace process;
@@ -102,6 +103,7 @@ using process::wait; // Necessary on some OS's to disambiguate.
 using utils::copy;
 
 namespace mesos {
+namespace internal {
 
 // The scheduler process (below) is responsible for interacting with
 // the master and responding to Mesos API calls from scheduler
@@ -119,7 +121,7 @@ public:
                    bool _implicitAcknowledgements,
                    const string& schedulerId,
                    MasterDetector* _detector,
-                   const scheduler::Flags& _flags,
+                   const internal::scheduler::Flags& _flags,
                    pthread_mutex_t* _mutex,
                    pthread_cond_t* _cond)
       // We use a UUID here to ensure that the master can reliably
@@ -1266,7 +1268,7 @@ private:
 
   MasterDetector* detector;
 
-  const scheduler::Flags flags;
+  const internal::scheduler::Flags flags;
 
   hashmap<OfferID, hashmap<SlaveID, UPID> > savedOffers;
   hashmap<SlaveID, UPID> savedSlavePids;
@@ -1292,6 +1294,7 @@ private:
   bool reauthenticate;
 };
 
+} // namespace internal {
 } // namespace mesos {
 
 
@@ -1523,7 +1526,7 @@ Status MesosSchedulerDriver::start()
   }
 
   // Load scheduler flags.
-  scheduler::Flags flags;
+  internal::scheduler::Flags flags;
   Try<Nothing> load = flags.load("MESOS_");
 
   if (load.isError()) {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/scheduler/scheduler.cpp
----------------------------------------------------------------------
diff --git a/src/scheduler/scheduler.cpp b/src/scheduler/scheduler.cpp
index 23658c8..66325c5 100644
--- a/src/scheduler/scheduler.cpp
+++ b/src/scheduler/scheduler.cpp
@@ -71,7 +71,8 @@
 #include "messages/messages.hpp"
 
 using namespace mesos;
-using namespace mesos::master;
+using namespace mesos::internal;
+using namespace mesos::internal::master;
 
 using namespace process;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/constants.cpp
----------------------------------------------------------------------
diff --git a/src/slave/constants.cpp b/src/slave/constants.cpp
index 7868bef..2a99b11 100644
--- a/src/slave/constants.cpp
+++ b/src/slave/constants.cpp
@@ -23,6 +23,7 @@
 #include "slave/constants.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 const Duration EXECUTOR_REGISTRATION_TIMEOUT = Minutes(1);
@@ -57,4 +58,5 @@ Duration MASTER_PING_TIMEOUT()
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/constants.hpp
----------------------------------------------------------------------
diff --git a/src/slave/constants.hpp b/src/slave/constants.hpp
index 12d6e92..fd1c1ab 100644
--- a/src/slave/constants.hpp
+++ b/src/slave/constants.hpp
@@ -25,6 +25,7 @@
 #include <stout/duration.hpp>
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // TODO(bmahler): It appears there may be a bug with gcc-4.1.2 in which these
@@ -104,6 +105,7 @@ extern const std::string DEFAULT_AUTHENTICATEE;
 Duration MASTER_PING_TIMEOUT();
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SLAVE_CONSTANTS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/composing.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/composing.cpp b/src/slave/containerizer/composing.cpp
index 6e3007e..a6ae817 100644
--- a/src/slave/containerizer/composing.cpp
+++ b/src/slave/containerizer/composing.cpp
@@ -39,6 +39,7 @@ using std::vector;
 using namespace process;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 
@@ -549,4 +550,5 @@ Future<hashset<ContainerID> > ComposingContainerizerProcess::containers()
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/composing.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/composing.hpp b/src/slave/containerizer/composing.hpp
index 6518f2a..f1e60b0 100644
--- a/src/slave/containerizer/composing.hpp
+++ b/src/slave/containerizer/composing.hpp
@@ -36,6 +36,7 @@
 
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Forward declaration.
@@ -93,6 +94,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __COMPOSING_CONTAINERIZER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/containerizer.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/containerizer.cpp b/src/slave/containerizer/containerizer.cpp
index c453c33..3f2ef8b 100644
--- a/src/slave/containerizer/containerizer.cpp
+++ b/src/slave/containerizer/containerizer.cpp
@@ -50,6 +50,7 @@ using std::vector;
 using namespace process;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // TODO(idownes): Move this to the Containerizer interface to complete
@@ -293,4 +294,5 @@ map<string, string> executorEnvironment(
 
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/containerizer.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/containerizer.hpp b/src/slave/containerizer/containerizer.hpp
index fd08b29..129e60f 100644
--- a/src/slave/containerizer/containerizer.hpp
+++ b/src/slave/containerizer/containerizer.hpp
@@ -38,6 +38,7 @@
 #include "slave/containerizer/fetcher.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Forward declaration.
@@ -138,6 +139,7 @@ std::map<std::string, std::string> executorEnvironment(
     const Duration& recoveryTimeout);
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __CONTAINERIZER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/docker.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index 813ddf8..5f4b4ce 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -62,6 +62,7 @@ using std::vector;
 using namespace process;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 using state::SlaveState;
@@ -1085,7 +1086,7 @@ Future<ResourceStatistics> DockerContainerizerProcess::__usage(
   // Note that here getting the root pid is enough because
   // the root process acts as an 'init' process in the docker
   // container, so no other child processes will escape it.
-  Try<ResourceStatistics> statistics = mesos::usage(pid, true, true);
+  Try<ResourceStatistics> statistics = mesos::internal::usage(pid, true, true);
   if (statistics.isError()) {
     return Failure(statistics.error());
   }
@@ -1343,4 +1344,5 @@ void DockerContainerizerProcess::remove(const string& container)
 
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/docker.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.hpp b/src/slave/containerizer/docker.hpp
index 70114dc..b7bf54a 100644
--- a/src/slave/containerizer/docker.hpp
+++ b/src/slave/containerizer/docker.hpp
@@ -28,6 +28,7 @@
 #include "slave/containerizer/containerizer.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Prefix used to name Docker containers in order to distinguish those
@@ -438,6 +439,7 @@ private:
 
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __DOCKER_CONTAINERIZER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/external_containerizer.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/external_containerizer.cpp b/src/slave/containerizer/external_containerizer.cpp
index 79b5fc6..42c67f5 100644
--- a/src/slave/containerizer/external_containerizer.cpp
+++ b/src/slave/containerizer/external_containerizer.cpp
@@ -65,6 +65,7 @@ using tuples::tuple;
 using namespace process;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 using state::ExecutorState;
@@ -1209,4 +1210,5 @@ Try<Subprocess> ExternalContainerizerProcess::invoke(
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/external_containerizer.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/external_containerizer.hpp b/src/slave/containerizer/external_containerizer.hpp
index 5035454..7049137 100644
--- a/src/slave/containerizer/external_containerizer.hpp
+++ b/src/slave/containerizer/external_containerizer.hpp
@@ -37,6 +37,7 @@
 #include "slave/containerizer/launcher.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // The scheme an external containerizer programs have to adhere to is;
@@ -294,6 +295,7 @@ private:
 
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __EXTERNAL_CONTAINERIZER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/fetcher.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/fetcher.cpp b/src/slave/containerizer/fetcher.cpp
index 6e6bce0..d290f95 100644
--- a/src/slave/containerizer/fetcher.cpp
+++ b/src/slave/containerizer/fetcher.cpp
@@ -34,6 +34,7 @@ using process::Future;
 using mesos::fetcher::FetcherInfo;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 
@@ -327,4 +328,5 @@ void FetcherProcess::kill(const ContainerID& containerId)
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/fetcher.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/fetcher.hpp b/src/slave/containerizer/fetcher.hpp
index bfd98db..1db0eaf 100644
--- a/src/slave/containerizer/fetcher.hpp
+++ b/src/slave/containerizer/fetcher.hpp
@@ -33,6 +33,7 @@
 #include "slave/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Forward declaration.
@@ -151,6 +152,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SLAVE_FETCHER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/cgroups/constants.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/cgroups/constants.hpp b/src/slave/containerizer/isolators/cgroups/constants.hpp
index 472edb2..e6df4a2 100644
--- a/src/slave/containerizer/isolators/cgroups/constants.hpp
+++ b/src/slave/containerizer/isolators/cgroups/constants.hpp
@@ -23,6 +23,7 @@
 #include <stout/duration.hpp>
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // CPU subsystem constants.
@@ -36,6 +37,7 @@ const Duration MIN_CPU_CFS_QUOTA = Milliseconds(1);
 const Bytes MIN_MEMORY = Megabytes(32);
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __CGROUPS_ISOLATOR_CONSTANTS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/cgroups/cpushare.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/cgroups/cpushare.cpp b/src/slave/containerizer/isolators/cgroups/cpushare.cpp
index e724b12..b6df239 100644
--- a/src/slave/containerizer/isolators/cgroups/cpushare.cpp
+++ b/src/slave/containerizer/isolators/cgroups/cpushare.cpp
@@ -52,8 +52,14 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
+using mesos::slave::ExecutorRunState;
+using mesos::slave::Isolator;
+using mesos::slave::IsolatorProcess;
+using mesos::slave::Limitation;
+
 
 template<class T>
 static Future<Option<T> > none() { return None(); }
@@ -525,4 +531,5 @@ Future<list<Nothing> > CgroupsCpushareIsolatorProcess::_cleanup(
 
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/cgroups/cpushare.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/cgroups/cpushare.hpp b/src/slave/containerizer/isolators/cgroups/cpushare.hpp
index f4ae149..f72ebb1 100644
--- a/src/slave/containerizer/isolators/cgroups/cpushare.hpp
+++ b/src/slave/containerizer/isolators/cgroups/cpushare.hpp
@@ -30,21 +30,22 @@
 #include "slave/containerizer/isolators/cgroups/constants.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Use the Linux cpu cgroup controller for cpu isolation which uses the
 // Completely Fair Scheduler (CFS).
 // - cpushare implements proportionally weighted scheduling.
 // - cfs implements hard quota based scheduling.
-class CgroupsCpushareIsolatorProcess : public IsolatorProcess
+class CgroupsCpushareIsolatorProcess : public mesos::slave::IsolatorProcess
 {
 public:
-  static Try<Isolator*> create(const Flags& flags);
+  static Try<mesos::slave::Isolator*> create(const Flags& flags);
 
   virtual ~CgroupsCpushareIsolatorProcess();
 
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& states);
+      const std::list<mesos::slave::ExecutorRunState>& states);
 
   virtual process::Future<Option<CommandInfo> > prepare(
       const ContainerID& containerId,
@@ -56,7 +57,7 @@ public:
       const ContainerID& containerId,
       pid_t pid);
 
-  virtual process::Future<Limitation> watch(
+  virtual process::Future<mesos::slave::Limitation> watch(
       const ContainerID& containerId);
 
   virtual process::Future<Nothing> update(
@@ -88,7 +89,7 @@ private:
     const std::string cgroup;
     Option<pid_t> pid;
 
-    process::Promise<Limitation> limitation;
+    process::Promise<mesos::slave::Limitation> limitation;
   };
 
   const Flags flags;
@@ -107,6 +108,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __CPUSHARE_ISOLATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/cgroups/mem.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/cgroups/mem.cpp b/src/slave/containerizer/isolators/cgroups/mem.cpp
index c022127..6299ca4 100644
--- a/src/slave/containerizer/isolators/cgroups/mem.cpp
+++ b/src/slave/containerizer/isolators/cgroups/mem.cpp
@@ -52,8 +52,14 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
+using mesos::slave::ExecutorRunState;
+using mesos::slave::Isolator;
+using mesos::slave::IsolatorProcess;
+using mesos::slave::Limitation;
+
 
 template<class T>
 static Future<Option<T> > none() { return None(); }
@@ -575,4 +581,5 @@ void CgroupsMemIsolatorProcess::oom(const ContainerID& containerId)
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/cgroups/mem.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/cgroups/mem.hpp b/src/slave/containerizer/isolators/cgroups/mem.hpp
index 92f197b..a00f723 100644
--- a/src/slave/containerizer/isolators/cgroups/mem.hpp
+++ b/src/slave/containerizer/isolators/cgroups/mem.hpp
@@ -28,17 +28,18 @@
 #include "slave/containerizer/isolators/cgroups/constants.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
-class CgroupsMemIsolatorProcess : public IsolatorProcess
+class CgroupsMemIsolatorProcess : public mesos::slave::IsolatorProcess
 {
 public:
-  static Try<Isolator*> create(const Flags& flags);
+  static Try<mesos::slave::Isolator*> create(const Flags& flags);
 
   virtual ~CgroupsMemIsolatorProcess();
 
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& states);
+      const std::list<mesos::slave::ExecutorRunState>& states);
 
   virtual process::Future<Option<CommandInfo> > prepare(
       const ContainerID& containerId,
@@ -50,7 +51,7 @@ public:
       const ContainerID& containerId,
       pid_t pid);
 
-  virtual process::Future<Limitation> watch(
+  virtual process::Future<mesos::slave::Limitation> watch(
       const ContainerID& containerId);
 
   virtual process::Future<Nothing> update(
@@ -82,7 +83,7 @@ private:
     const std::string cgroup;
     Option<pid_t> pid;
 
-    process::Promise<Limitation> limitation;
+    process::Promise<mesos::slave::Limitation> limitation;
 
     // Used to cancel the OOM listening.
     process::Future<Nothing> oomNotifier;
@@ -113,6 +114,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MEM_ISOLATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/cgroups/perf_event.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/cgroups/perf_event.cpp b/src/slave/containerizer/isolators/cgroups/perf_event.cpp
index 331a10b..c6e3055 100644
--- a/src/slave/containerizer/isolators/cgroups/perf_event.cpp
+++ b/src/slave/containerizer/isolators/cgroups/perf_event.cpp
@@ -58,8 +58,14 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
+using mesos::slave::ExecutorRunState;
+using mesos::slave::Isolator;
+using mesos::slave::IsolatorProcess;
+using mesos::slave::Limitation;
+
 Try<Isolator*> CgroupsPerfEventIsolatorProcess::create(const Flags& flags)
 {
   LOG(INFO) << "Creating PerfEvent isolator";
@@ -437,4 +443,5 @@ void CgroupsPerfEventIsolatorProcess::_sample(
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/cgroups/perf_event.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/cgroups/perf_event.hpp b/src/slave/containerizer/isolators/cgroups/perf_event.hpp
index 4ad6cb9..9f35ed0 100644
--- a/src/slave/containerizer/isolators/cgroups/perf_event.hpp
+++ b/src/slave/containerizer/isolators/cgroups/perf_event.hpp
@@ -32,17 +32,18 @@
 #include "slave/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
-class CgroupsPerfEventIsolatorProcess : public IsolatorProcess
+class CgroupsPerfEventIsolatorProcess : public mesos::slave::IsolatorProcess
 {
 public:
-  static Try<Isolator*> create(const Flags& flags);
+  static Try<mesos::slave::Isolator*> create(const Flags& flags);
 
   virtual ~CgroupsPerfEventIsolatorProcess();
 
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& states);
+      const std::list<mesos::slave::ExecutorRunState>& states);
 
   virtual process::Future<Option<CommandInfo> > prepare(
       const ContainerID& containerId,
@@ -54,7 +55,7 @@ public:
       const ContainerID& containerId,
       pid_t pid);
 
-  virtual process::Future<Limitation> watch(
+  virtual process::Future<mesos::slave::Limitation> watch(
       const ContainerID& containerId);
 
   virtual process::Future<Nothing> update(
@@ -114,6 +115,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __PERF_EVENT_ISOLATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/filesystem/shared.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/filesystem/shared.cpp b/src/slave/containerizer/isolators/filesystem/shared.cpp
index cfd1e96..f6a8fa1 100644
--- a/src/slave/containerizer/isolators/filesystem/shared.cpp
+++ b/src/slave/containerizer/isolators/filesystem/shared.cpp
@@ -27,8 +27,14 @@ using std::set;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
+using mesos::slave::ExecutorRunState;
+using mesos::slave::Isolator;
+using mesos::slave::IsolatorProcess;
+using mesos::slave::Limitation;
+
 SharedFilesystemIsolatorProcess::SharedFilesystemIsolatorProcess(
     const Flags& _flags)
   : flags(_flags) {}
@@ -259,4 +265,5 @@ Future<Nothing> SharedFilesystemIsolatorProcess::cleanup(
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/filesystem/shared.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/filesystem/shared.hpp b/src/slave/containerizer/isolators/filesystem/shared.hpp
index 779caca..99c8952 100644
--- a/src/slave/containerizer/isolators/filesystem/shared.hpp
+++ b/src/slave/containerizer/isolators/filesystem/shared.hpp
@@ -24,6 +24,7 @@
 #include "slave/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // This isolator is to be used when all containers share the host's
@@ -31,15 +32,15 @@ namespace slave {
 // into each container's mount namespace. In particular, this can be
 // used to give each container a "private" system directory, such as
 // /tmp and /var/tmp.
-class SharedFilesystemIsolatorProcess : public IsolatorProcess
+class SharedFilesystemIsolatorProcess : public mesos::slave::IsolatorProcess
 {
 public:
-  static Try<Isolator*> create(const Flags& flags);
+  static Try<mesos::slave::Isolator*> create(const Flags& flags);
 
   virtual ~SharedFilesystemIsolatorProcess();
 
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& states);
+      const std::list<mesos::slave::ExecutorRunState>& states);
 
   virtual process::Future<Option<CommandInfo> > prepare(
       const ContainerID& containerId,
@@ -51,7 +52,7 @@ public:
       const ContainerID& containerId,
       pid_t pid);
 
-  virtual process::Future<Limitation> watch(
+  virtual process::Future<mesos::slave::Limitation> watch(
       const ContainerID& containerId);
 
   virtual process::Future<Nothing> update(
@@ -71,6 +72,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SHARED_FILESYSTEM_ISOLATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/namespaces/pid.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/namespaces/pid.cpp b/src/slave/containerizer/isolators/namespaces/pid.cpp
index ae52404..7e72b34 100644
--- a/src/slave/containerizer/isolators/namespaces/pid.cpp
+++ b/src/slave/containerizer/isolators/namespaces/pid.cpp
@@ -39,8 +39,14 @@ using std::set;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
+using mesos::slave::ExecutorRunState;
+using mesos::slave::Isolator;
+using mesos::slave::IsolatorProcess;
+using mesos::slave::Limitation;
+
 // The root directory where we bind mount all the namespace handles.
 const string BIND_MOUNT_ROOT = "/var/run/mesos/pidns";
 
@@ -254,4 +260,5 @@ Future<Nothing> NamespacesPidIsolatorProcess::cleanup(
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/namespaces/pid.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/namespaces/pid.hpp b/src/slave/containerizer/isolators/namespaces/pid.hpp
index 88227a3..e6eb2d9 100644
--- a/src/slave/containerizer/isolators/namespaces/pid.hpp
+++ b/src/slave/containerizer/isolators/namespaces/pid.hpp
@@ -30,16 +30,17 @@
 #include <stout/result.hpp>
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // This isolator itself does not specify the necessary clone() flags
 // (see the LinuxLauncher for that) but it is used to keep track of a
 // container's pid namespace through a bind mount and exposed by
 // getNamespace().
-class NamespacesPidIsolatorProcess : public IsolatorProcess
+class NamespacesPidIsolatorProcess : public mesos::slave::IsolatorProcess
 {
 public:
-  static Try<Isolator*> create(const Flags& flags);
+  static Try<mesos::slave::Isolator*> create(const Flags& flags);
 
   // Return the pid namespace of the container. Returns None if the
   // container was not created in a separate pid namespace, i.e.,
@@ -56,7 +57,7 @@ public:
   virtual ~NamespacesPidIsolatorProcess() {}
 
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& states);
+      const std::list<mesos::slave::ExecutorRunState>& states);
 
   virtual process::Future<Option<CommandInfo> > prepare(
       const ContainerID& containerId,
@@ -68,7 +69,7 @@ public:
       const ContainerID& containerId,
       pid_t pid);
 
-  virtual process::Future<Limitation> watch(
+  virtual process::Future<mesos::slave::Limitation> watch(
       const ContainerID& containerId);
 
   virtual process::Future<Nothing> update(
@@ -83,6 +84,7 @@ public:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __NAMESPACES_PID_ISOLATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/network/helper.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/network/helper.cpp b/src/slave/containerizer/isolators/network/helper.cpp
index 291cbdd..e5fb99e 100644
--- a/src/slave/containerizer/isolators/network/helper.cpp
+++ b/src/slave/containerizer/isolators/network/helper.cpp
@@ -21,7 +21,7 @@
 
 #include "slave/containerizer/isolators/network/port_mapping.hpp"
 
-using namespace mesos::slave;
+using namespace mesos::internal::slave;
 
 
 int main(int argc, char** argv)

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/network/port_mapping.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/network/port_mapping.cpp b/src/slave/containerizer/isolators/network/port_mapping.cpp
index b860b17..6210478 100644
--- a/src/slave/containerizer/isolators/network/port_mapping.cpp
+++ b/src/slave/containerizer/isolators/network/port_mapping.cpp
@@ -72,7 +72,7 @@
 
 #include "slave/containerizer/isolators/network/port_mapping.hpp"
 
-using namespace mesos;
+using namespace mesos::internal;
 
 using namespace process;
 
@@ -95,8 +95,14 @@ using std::vector;
 using filter::ip::PortRange;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
+using mesos::slave::ExecutorRunState;
+using mesos::slave::Isolator;
+using mesos::slave::IsolatorProcess;
+using mesos::slave::Limitation;
+
 const std::string VETH_PREFIX = "mesos";
 
 
@@ -2955,4 +2961,5 @@ vector<PortRange> getPortRanges(const IntervalSet<uint16_t>& ports)
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/network/port_mapping.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/network/port_mapping.hpp b/src/slave/containerizer/isolators/network/port_mapping.hpp
index d0d5619..654f55e 100644
--- a/src/slave/containerizer/isolators/network/port_mapping.hpp
+++ b/src/slave/containerizer/isolators/network/port_mapping.hpp
@@ -48,6 +48,7 @@
 #include "slave/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // The prefix this isolator uses for the virtual ethernet devices.
@@ -121,15 +122,15 @@ std::vector<routing::filter::ip::PortRange> getPortRanges(
 // isolator is useful when the operator wants to reuse the host IP for
 // all containers running on the host (e.g., there are insufficient
 // IPs).
-class PortMappingIsolatorProcess : public IsolatorProcess
+class PortMappingIsolatorProcess : public mesos::slave::IsolatorProcess
 {
 public:
-  static Try<Isolator*> create(const Flags& flags);
+  static Try<mesos::slave::Isolator*> create(const Flags& flags);
 
   virtual ~PortMappingIsolatorProcess() {}
 
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& states);
+      const std::list<mesos::slave::ExecutorRunState>& states);
 
   virtual process::Future<Option<CommandInfo> > prepare(
       const ContainerID& containerId,
@@ -141,7 +142,7 @@ public:
       const ContainerID& containerId,
       pid_t pid);
 
-  virtual process::Future<Limitation> watch(
+  virtual process::Future<mesos::slave::Limitation> watch(
       const ContainerID& containerId);
 
   virtual process::Future<Nothing> update(
@@ -360,6 +361,7 @@ protected:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __PORT_MAPPING_ISOLATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/posix.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/posix.hpp b/src/slave/containerizer/isolators/posix.hpp
index f871606..1e6a396 100644
--- a/src/slave/containerizer/isolators/posix.hpp
+++ b/src/slave/containerizer/isolators/posix.hpp
@@ -32,18 +32,19 @@
 #include "usage/usage.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // A basic IsolatorProcess that keeps track of the pid but doesn't do any
 // resource isolation. Subclasses must implement usage() for their appropriate
 // resource(s).
-class PosixIsolatorProcess : public IsolatorProcess
+class PosixIsolatorProcess : public mesos::slave::IsolatorProcess
 {
 public:
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& state)
+      const std::list<mesos::slave::ExecutorRunState>& state)
   {
-    foreach (const ExecutorRunState& run, state) {
+    foreach (const mesos::slave::ExecutorRunState& run, state) {
       // This should (almost) never occur: see comment in
       // PosixLauncher::recover().
       if (pids.contains(run.id)) {
@@ -52,8 +53,8 @@ public:
 
       pids.put(run.id, run.pid);
 
-      process::Owned<process::Promise<Limitation> > promise(
-          new process::Promise<Limitation>());
+      process::Owned<process::Promise<mesos::slave::Limitation> > promise(
+          new process::Promise<mesos::slave::Limitation>());
       promises.put(run.id, promise);
     }
 
@@ -71,8 +72,8 @@ public:
                               " has already been prepared");
     }
 
-    process::Owned<process::Promise<Limitation> > promise(
-        new process::Promise<Limitation>());
+    process::Owned<process::Promise<mesos::slave::Limitation> > promise(
+        new process::Promise<mesos::slave::Limitation>());
     promises.put(containerId, promise);
 
     return None();
@@ -91,7 +92,7 @@ public:
     return Nothing();
   }
 
-  virtual process::Future<Limitation> watch(
+  virtual process::Future<mesos::slave::Limitation> watch(
       const ContainerID& containerId)
   {
     if (!promises.contains(containerId)) {
@@ -130,19 +131,21 @@ public:
 
 protected:
   hashmap<ContainerID, pid_t> pids;
-  hashmap<ContainerID,
-          process::Owned<process::Promise<Limitation> > > promises;
+  hashmap<
+      ContainerID,
+      process::Owned<process::Promise<mesos::slave::Limitation>>> promises;
 };
 
 
 class PosixCpuIsolatorProcess : public PosixIsolatorProcess
 {
 public:
-  static Try<Isolator*> create(const Flags& flags)
+  static Try<mesos::slave::Isolator*> create(const Flags& flags)
   {
-    process::Owned<IsolatorProcess> process(new PosixCpuIsolatorProcess());
+    process::Owned<mesos::slave::IsolatorProcess> process(
+        new PosixCpuIsolatorProcess());
 
-    return new Isolator(process);
+    return new mesos::slave::Isolator(process);
   }
 
   virtual process::Future<ResourceStatistics> usage(
@@ -156,7 +159,7 @@ public:
 
     // Use 'mesos-usage' but only request 'cpus_' values.
     Try<ResourceStatistics> usage =
-      mesos::usage(pids.get(containerId).get(), false, true);
+      mesos::internal::usage(pids.get(containerId).get(), false, true);
     if (usage.isError()) {
       return process::Failure(usage.error());
     }
@@ -171,11 +174,12 @@ private:
 class PosixMemIsolatorProcess : public PosixIsolatorProcess
 {
 public:
-  static Try<Isolator*> create(const Flags& flags)
+  static Try<mesos::slave::Isolator*> create(const Flags& flags)
   {
-    process::Owned<IsolatorProcess> process(new PosixMemIsolatorProcess());
+    process::Owned<mesos::slave::IsolatorProcess> process(
+        new PosixMemIsolatorProcess());
 
-    return new Isolator(process);
+    return new mesos::slave::Isolator(process);
   }
 
   virtual process::Future<ResourceStatistics> usage(
@@ -189,7 +193,7 @@ public:
 
     // Use 'mesos-usage' but only request 'mem_' values.
     Try<ResourceStatistics> usage =
-      mesos::usage(pids.get(containerId).get(), true, false);
+      mesos::internal::usage(pids.get(containerId).get(), true, false);
     if (usage.isError()) {
       return process::Failure(usage.error());
     }
@@ -202,6 +206,7 @@ private:
 
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __POSIX_ISOLATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/posix/disk.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/posix/disk.cpp b/src/slave/containerizer/isolators/posix/disk.cpp
index ee53063..6e41e2a 100644
--- a/src/slave/containerizer/isolators/posix/disk.cpp
+++ b/src/slave/containerizer/isolators/posix/disk.cpp
@@ -51,8 +51,14 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
+using mesos::slave::ExecutorRunState;
+using mesos::slave::Isolator;
+using mesos::slave::IsolatorProcess;
+using mesos::slave::Limitation;
+
 Try<Isolator*> PosixDiskIsolatorProcess::create(const Flags& flags)
 {
   // TODO(jieyu): Check the availability of command 'du'.
@@ -489,4 +495,5 @@ Future<Bytes> DiskUsageCollector::usage(const string& path)
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/isolators/posix/disk.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/isolators/posix/disk.hpp b/src/slave/containerizer/isolators/posix/disk.hpp
index f5b294e..0ccb173 100644
--- a/src/slave/containerizer/isolators/posix/disk.hpp
+++ b/src/slave/containerizer/isolators/posix/disk.hpp
@@ -30,8 +30,10 @@
 #include <stout/hashmap.hpp>
 
 #include "slave/flags.hpp"
+#include "slave/state.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Forward declarations.
@@ -68,15 +70,15 @@ private:
 // TODO(jieyu): Consider handling each container independently, or
 // triggering an initial collection when the container starts, to
 // ensure that we have usage statistics without a large delay.
-class PosixDiskIsolatorProcess : public IsolatorProcess
+class PosixDiskIsolatorProcess : public mesos::slave::IsolatorProcess
 {
 public:
-  static Try<Isolator*> create(const Flags& flags);
+  static Try<mesos::slave::Isolator*> create(const Flags& flags);
 
   virtual ~PosixDiskIsolatorProcess();
 
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& states);
+      const std::list<mesos::slave::ExecutorRunState>& states);
 
   virtual process::Future<Option<CommandInfo>> prepare(
       const ContainerID& containerId,
@@ -88,7 +90,7 @@ public:
       const ContainerID& containerId,
       pid_t pid);
 
-  virtual process::Future<Limitation> watch(
+  virtual process::Future<mesos::slave::Limitation> watch(
       const ContainerID& containerId);
 
   virtual process::Future<Nothing> update(
@@ -120,7 +122,7 @@ private:
     // to collect disk usage for disk resources without DiskInfo.
     const std::string directory;
 
-    process::Promise<Limitation> limitation;
+    process::Promise<mesos::slave::Limitation> limitation;
 
     // The keys of the hashmaps contain the executor working directory
     // above, and optionally paths of volumes used by the container.
@@ -141,6 +143,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __POSIX_DISK_ISOLATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/launcher.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/launcher.cpp b/src/slave/containerizer/launcher.cpp
index f413a51..44fcb43 100644
--- a/src/slave/containerizer/launcher.cpp
+++ b/src/slave/containerizer/launcher.cpp
@@ -37,8 +37,11 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
+using mesos::slave::ExecutorRunState;
+
 
 Try<Launcher*> PosixLauncher::create(const Flags& flags)
 {
@@ -171,4 +174,5 @@ Future<Nothing> _destroy(const Future<Option<int> >& future)
 
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/launcher.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/launcher.hpp b/src/slave/containerizer/launcher.hpp
index f292e2d..3205b5c 100644
--- a/src/slave/containerizer/launcher.hpp
+++ b/src/slave/containerizer/launcher.hpp
@@ -36,6 +36,7 @@
 #include "slave/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 class Launcher
@@ -45,7 +46,7 @@ public:
 
   // Recover the necessary state for each container listed in state.
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& states) = 0;
+      const std::list<mesos::slave::ExecutorRunState>& states) = 0;
 
   // Fork a new process in the containerized context. The child will
   // exec the binary at the given path with the given argv, flags and
@@ -82,7 +83,7 @@ public:
   virtual ~PosixLauncher() {}
 
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& states);
+      const std::list<mesos::slave::ExecutorRunState>& states);
 
   virtual Try<pid_t> fork(
       const ContainerID& containerId,
@@ -106,6 +107,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LAUNCHER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/linux_launcher.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/linux_launcher.cpp b/src/slave/containerizer/linux_launcher.cpp
index 3fdfb57..d357955 100644
--- a/src/slave/containerizer/linux_launcher.cpp
+++ b/src/slave/containerizer/linux_launcher.cpp
@@ -48,8 +48,11 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
+using mesos::slave::ExecutorRunState;
+
 LinuxLauncher::LinuxLauncher(
     const Flags& _flags,
     int _namespaces,
@@ -400,4 +403,5 @@ string LinuxLauncher::cgroup(const ContainerID& containerId)
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/linux_launcher.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/linux_launcher.hpp b/src/slave/containerizer/linux_launcher.hpp
index 3730422..52540f3 100644
--- a/src/slave/containerizer/linux_launcher.hpp
+++ b/src/slave/containerizer/linux_launcher.hpp
@@ -22,6 +22,7 @@
 #include "slave/containerizer/launcher.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Launcher for Linux systems with cgroups. Uses a freezer cgroup to
@@ -34,7 +35,7 @@ public:
   virtual ~LinuxLauncher() {}
 
   virtual process::Future<Nothing> recover(
-      const std::list<ExecutorRunState>& states);
+      const std::list<mesos::slave::ExecutorRunState>& states);
 
   virtual Try<pid_t> fork(
       const ContainerID& containerId,
@@ -69,6 +70,7 @@ private:
 
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LINUX_LAUNCHER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/mesos/containerizer.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/containerizer.cpp b/src/slave/containerizer/mesos/containerizer.cpp
index d5b90d1..a587ed3 100644
--- a/src/slave/containerizer/mesos/containerizer.cpp
+++ b/src/slave/containerizer/mesos/containerizer.cpp
@@ -64,10 +64,16 @@ using std::vector;
 using namespace process;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 using mesos::modules::ModuleManager;
 
+using mesos::slave::ExecutorRunState;
+using mesos::slave::Isolator;
+using mesos::slave::IsolatorProcess;
+using mesos::slave::Limitation;
+
 using state::SlaveState;
 using state::FrameworkState;
 using state::ExecutorState;
@@ -1132,4 +1138,5 @@ Future<hashset<ContainerID>> MesosContainerizerProcess::containers()
 
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/mesos/containerizer.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/containerizer.hpp b/src/slave/containerizer/mesos/containerizer.hpp
index 074a2d8..d4fc8c8 100644
--- a/src/slave/containerizer/mesos/containerizer.hpp
+++ b/src/slave/containerizer/mesos/containerizer.hpp
@@ -33,6 +33,7 @@
 #include "slave/containerizer/launcher.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Forward declaration.
@@ -51,7 +52,7 @@ public:
       bool local,
       Fetcher* fetcher,
       const process::Owned<Launcher>& launcher,
-      const std::vector<process::Owned<Isolator>>& isolators);
+      const std::vector<process::Owned<mesos::slave::Isolator>>& isolators);
 
   // Used for testing.
   MesosContainerizer(const process::Owned<MesosContainerizerProcess>& _process);
@@ -108,7 +109,7 @@ public:
       bool _local,
       Fetcher* _fetcher,
       const process::Owned<Launcher>& _launcher,
-      const std::vector<process::Owned<Isolator>>& _isolators)
+      const std::vector<process::Owned<mesos::slave::Isolator>>& _isolators)
     : flags(_flags),
       local(_local),
       fetcher(_fetcher),
@@ -159,10 +160,10 @@ public:
 
 private:
   process::Future<Nothing> _recover(
-      const std::list<ExecutorRunState>& recoverable);
+      const std::list<mesos::slave::ExecutorRunState>& recoverable);
 
   process::Future<Nothing> __recover(
-      const std::list<ExecutorRunState>& recovered);
+      const std::list<mesos::slave::ExecutorRunState>& recovered);
 
   process::Future<std::list<Option<CommandInfo>>> prepare(
       const ContainerID& containerId,
@@ -214,7 +215,7 @@ private:
   // processes. This will trigger container destruction.
   void limited(
       const ContainerID& containerId,
-      const process::Future<Limitation>& future);
+      const process::Future<mesos::slave::Limitation>& future);
 
   // Call back for when the executor exits. This will trigger container
   // destroy.
@@ -224,7 +225,7 @@ private:
   const bool local;
   Fetcher* fetcher;
   const process::Owned<Launcher> launcher;
-  const std::vector<process::Owned<Isolator>> isolators;
+  const std::vector<process::Owned<mesos::slave::Isolator>> isolators;
 
   enum State
   {
@@ -252,7 +253,7 @@ private:
 
     // We keep track of any limitations received from each isolator so we can
     // determine the cause of an executor termination.
-    std::vector<Limitation> limitations;
+    std::vector<mesos::slave::Limitation> limitations;
 
     // We keep track of the resources for each container so we can set the
     // ResourceStatistics limits in usage().
@@ -272,6 +273,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MESOS_CONTAINERIZER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/mesos/launch.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/launch.cpp b/src/slave/containerizer/mesos/launch.cpp
index a0ff1b7..2f2d60e 100644
--- a/src/slave/containerizer/mesos/launch.cpp
+++ b/src/slave/containerizer/mesos/launch.cpp
@@ -39,6 +39,7 @@ using std::map;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 const string MesosContainerizerLaunch::NAME = "launch";
@@ -247,4 +248,5 @@ int MesosContainerizerLaunch::execute()
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/mesos/launch.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/launch.hpp b/src/slave/containerizer/mesos/launch.hpp
index 0176556..7c8b535 100644
--- a/src/slave/containerizer/mesos/launch.hpp
+++ b/src/slave/containerizer/mesos/launch.hpp
@@ -24,6 +24,7 @@
 #include <stout/subcommand.hpp>
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 class MesosContainerizerLaunch : public Subcommand
@@ -53,6 +54,7 @@ protected:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MESOS_CONTAINERIZER_LAUNCH_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/containerizer/mesos/main.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/main.cpp b/src/slave/containerizer/mesos/main.cpp
index 136390d..0e17931 100644
--- a/src/slave/containerizer/mesos/main.cpp
+++ b/src/slave/containerizer/mesos/main.cpp
@@ -21,7 +21,7 @@
 
 #include "slave/containerizer/mesos/launch.hpp"
 
-using namespace mesos::slave;
+using namespace mesos::internal::slave;
 
 
 int main(int argc, char** argv)

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/flags.hpp
----------------------------------------------------------------------
diff --git a/src/slave/flags.hpp b/src/slave/flags.hpp
index ddb3259..0af7fe2 100644
--- a/src/slave/flags.hpp
+++ b/src/slave/flags.hpp
@@ -40,6 +40,7 @@
 #include "slave/constants.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 class Flags : public logging::Flags
@@ -515,6 +516,7 @@ public:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SLAVE_FLAGS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/gc.cpp
----------------------------------------------------------------------
diff --git a/src/slave/gc.cpp b/src/slave/gc.cpp
index 6060c18..6042277 100644
--- a/src/slave/gc.cpp
+++ b/src/slave/gc.cpp
@@ -37,6 +37,7 @@ using std::map;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 
@@ -206,4 +207,5 @@ void GarbageCollector::prune(const Duration& d)
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/gc.hpp
----------------------------------------------------------------------
diff --git a/src/slave/gc.hpp b/src/slave/gc.hpp
index d9f9d7b..780f9c9 100644
--- a/src/slave/gc.hpp
+++ b/src/slave/gc.hpp
@@ -35,6 +35,7 @@
 #include <stout/try.hpp>
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Forward declarations.
@@ -130,6 +131,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SLAVE_GC_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/http.cpp
----------------------------------------------------------------------
diff --git a/src/slave/http.cpp b/src/slave/http.cpp
index ef6e648..d03d361 100644
--- a/src/slave/http.cpp
+++ b/src/slave/http.cpp
@@ -65,11 +65,12 @@ using std::vector;
 
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 
 // Pull in defnitions from common.
-using mesos::model;
+using mesos::internal::model;
 
 // Pull in the process definitions.
 using process::http::Response;
@@ -400,4 +401,5 @@ Future<Response> Slave::Http::state(const Request& request)
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/main.cpp
----------------------------------------------------------------------
diff --git a/src/slave/main.cpp b/src/slave/main.cpp
index d1126b7..c62d3ab 100644
--- a/src/slave/main.cpp
+++ b/src/slave/main.cpp
@@ -45,8 +45,8 @@
 #include "slave/slave.hpp"
 #include "slave/status_update_manager.hpp"
 
-using namespace mesos;
-using namespace mesos::slave;
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
 
 using mesos::modules::Anonymous;
 using mesos::modules::ModuleManager;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/metrics.cpp
----------------------------------------------------------------------
diff --git a/src/slave/metrics.cpp b/src/slave/metrics.cpp
index ee610b8..c32b4d8 100644
--- a/src/slave/metrics.cpp
+++ b/src/slave/metrics.cpp
@@ -27,6 +27,7 @@
 
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 Metrics::Metrics(const Slave& slave)
@@ -178,4 +179,5 @@ Metrics::~Metrics()
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/metrics.hpp
----------------------------------------------------------------------
diff --git a/src/slave/metrics.hpp b/src/slave/metrics.hpp
index e2ce845..0390461 100644
--- a/src/slave/metrics.hpp
+++ b/src/slave/metrics.hpp
@@ -26,6 +26,7 @@
 
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 class Slave;
@@ -69,6 +70,7 @@ struct Metrics
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SLAVE_METRICS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/monitor.cpp
----------------------------------------------------------------------
diff --git a/src/slave/monitor.cpp b/src/slave/monitor.cpp
index c2c286c..398af01 100644
--- a/src/slave/monitor.cpp
+++ b/src/slave/monitor.cpp
@@ -47,6 +47,7 @@ using std::map;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 using process::wait; // Necessary on some OS's to disambiguate.
@@ -307,4 +308,5 @@ Future<Nothing> ResourceMonitor::stop(
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/monitor.hpp
----------------------------------------------------------------------
diff --git a/src/slave/monitor.hpp b/src/slave/monitor.hpp
index 94f9ea6..69c60a1 100644
--- a/src/slave/monitor.hpp
+++ b/src/slave/monitor.hpp
@@ -40,6 +40,7 @@
 #include <stout/try.hpp>
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Forward declarations.
@@ -180,6 +181,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SLAVE_MONITOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/paths.cpp
----------------------------------------------------------------------
diff --git a/src/slave/paths.cpp b/src/slave/paths.cpp
index cf08c44..01ea856 100644
--- a/src/slave/paths.cpp
+++ b/src/slave/paths.cpp
@@ -38,6 +38,7 @@ using std::list;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 namespace paths {
 
@@ -428,4 +429,5 @@ string createSlaveDirectory(
 
 } // namespace paths {
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/paths.hpp
----------------------------------------------------------------------
diff --git a/src/slave/paths.hpp b/src/slave/paths.hpp
index eba398c..1618439 100644
--- a/src/slave/paths.hpp
+++ b/src/slave/paths.hpp
@@ -25,6 +25,7 @@
 #include <mesos/mesos.hpp>
 
 namespace mesos {
+namespace internal {
 namespace slave {
 namespace paths {
 
@@ -262,6 +263,7 @@ std::string createSlaveDirectory(
 
 } // namespace paths {
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SLAVE_PATHS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 0374ca0..d449108 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -100,6 +100,7 @@ using process::Time;
 using process::UPID;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 using namespace state;
@@ -4674,4 +4675,5 @@ std::ostream& operator << (std::ostream& stream, Executor::State state)
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/slave.hpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.hpp b/src/slave/slave.hpp
index 91dae10..f3eab7e 100644
--- a/src/slave/slave.hpp
+++ b/src/slave/slave.hpp
@@ -66,6 +66,7 @@
 #include "messages/messages.hpp"
 
 namespace mesos {
+namespace internal {
 
 class MasterDetector; // Forward declaration.
 
@@ -629,6 +630,7 @@ std::ostream& operator << (std::ostream& stream, Framework::State state);
 std::ostream& operator << (std::ostream& stream, Executor::State state);
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SLAVE_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/state.cpp
----------------------------------------------------------------------
diff --git a/src/slave/state.cpp b/src/slave/state.cpp
index 24ab12c..0329ba5 100644
--- a/src/slave/state.cpp
+++ b/src/slave/state.cpp
@@ -21,6 +21,7 @@
 #include "slave/state.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 namespace state {
 
@@ -739,4 +740,5 @@ Try<ResourcesState> ResourcesState::recover(
 
 } // namespace state {
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/state.hpp
----------------------------------------------------------------------
diff --git a/src/slave/state.hpp b/src/slave/state.hpp
index e7276a5..0201e72 100644
--- a/src/slave/state.hpp
+++ b/src/slave/state.hpp
@@ -40,6 +40,7 @@
 #include "messages/messages.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 namespace state {
 
@@ -100,7 +101,7 @@ inline Try<Nothing> checkpoint(
   return checkpoint(path, messages);
 }
 
-} // namespace internal {
+}  // namespace internal {
 
 
 // Thin wrapper to checkpoint data to disk and perform the necessary
@@ -298,6 +299,7 @@ struct TaskState
 
 } // namespace state {
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __SLAVE_STATE_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/status_update_manager.cpp
----------------------------------------------------------------------
diff --git a/src/slave/status_update_manager.cpp b/src/slave/status_update_manager.cpp
index 5b0192b..fab8c22 100644
--- a/src/slave/status_update_manager.cpp
+++ b/src/slave/status_update_manager.cpp
@@ -50,6 +50,7 @@ using process::Timeout;
 using process::UPID;
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 using state::SlaveState;
@@ -633,4 +634,5 @@ void StatusUpdateManager::cleanup(const FrameworkID& frameworkId)
 }
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/slave/status_update_manager.hpp
----------------------------------------------------------------------
diff --git a/src/slave/status_update_manager.hpp b/src/slave/status_update_manager.hpp
index 44b60b5..b4d91b2 100644
--- a/src/slave/status_update_manager.hpp
+++ b/src/slave/status_update_manager.hpp
@@ -50,6 +50,7 @@
 #include "slave/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace slave {
 
 // Forward declarations.
@@ -408,6 +409,7 @@ private:
 };
 
 } // namespace slave {
+} // namespace internal {
 } // namespace mesos {
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/in_memory.cpp
----------------------------------------------------------------------
diff --git a/src/state/in_memory.cpp b/src/state/in_memory.cpp
index 6f33616..ce04e47 100644
--- a/src/state/in_memory.cpp
+++ b/src/state/in_memory.cpp
@@ -21,6 +21,7 @@ using namespace process;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace state {
 
 
@@ -111,4 +112,5 @@ Future<std::set<string> > InMemoryStorage::names()
 }
 
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/in_memory.hpp
----------------------------------------------------------------------
diff --git a/src/state/in_memory.hpp b/src/state/in_memory.hpp
index fea2e10..2040618 100644
--- a/src/state/in_memory.hpp
+++ b/src/state/in_memory.hpp
@@ -14,6 +14,7 @@
 #include "state/storage.hpp"
 
 namespace mesos {
+namespace internal {
 namespace state {
 
 // Forward declaration.
@@ -37,6 +38,7 @@ private:
 };
 
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __STATE_IN_MEMORY_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/leveldb.cpp
----------------------------------------------------------------------
diff --git a/src/state/leveldb.cpp b/src/state/leveldb.cpp
index 263a6b9..4303df3 100644
--- a/src/state/leveldb.cpp
+++ b/src/state/leveldb.cpp
@@ -32,6 +32,7 @@ using namespace process;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace state {
 
 
@@ -293,4 +294,5 @@ Future<std::set<string> > LevelDBStorage::names()
 }
 
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/leveldb.hpp
----------------------------------------------------------------------
diff --git a/src/state/leveldb.hpp b/src/state/leveldb.hpp
index 379316c..53447c6 100644
--- a/src/state/leveldb.hpp
+++ b/src/state/leveldb.hpp
@@ -15,6 +15,7 @@
 #include "state/storage.hpp"
 
 namespace mesos {
+namespace internal {
 namespace state {
 
 // More forward declarations.
@@ -38,6 +39,7 @@ private:
 };
 
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __STATE_LEVELDB_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/log.cpp
----------------------------------------------------------------------
diff --git a/src/state/log.cpp b/src/state/log.cpp
index 6069d12..326f3a7 100644
--- a/src/state/log.cpp
+++ b/src/state/log.cpp
@@ -29,7 +29,7 @@
 
 #include "state/log.hpp"
 
-using namespace mesos::log;
+using namespace mesos::internal::log;
 using namespace process;
 
 // Note that we don't add 'using std::set' here because we need
@@ -38,6 +38,7 @@ using std::list;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace state {
 
 // A storage implementation for State that uses the replicated
@@ -671,4 +672,5 @@ Future<std::set<string> > LogStorage::names()
 }
 
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/log.hpp
----------------------------------------------------------------------
diff --git a/src/state/log.hpp b/src/state/log.hpp
index 1558dad..a0ca4f8 100644
--- a/src/state/log.hpp
+++ b/src/state/log.hpp
@@ -16,6 +16,7 @@
 #include "state/storage.hpp"
 
 namespace mesos {
+namespace internal {
 namespace state {
 
 // Forward declarations.
@@ -40,6 +41,7 @@ private:
 };
 
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __STATE_LOG_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/protobuf.hpp
----------------------------------------------------------------------
diff --git a/src/state/protobuf.hpp b/src/state/protobuf.hpp
index 6f67c6a..12f9bfb 100644
--- a/src/state/protobuf.hpp
+++ b/src/state/protobuf.hpp
@@ -36,6 +36,7 @@
 #include "state/storage.hpp"
 
 namespace mesos {
+namespace internal {
 namespace state {
 namespace protobuf {
 
@@ -163,6 +164,7 @@ process::Future<bool> State::expunge(const Variable<T>& variable)
 
 } // namespace protobuf {
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __STATE_PROTOBUF_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/state.hpp
----------------------------------------------------------------------
diff --git a/src/state/state.hpp b/src/state/state.hpp
index 878265d..2c0bb20 100644
--- a/src/state/state.hpp
+++ b/src/state/state.hpp
@@ -37,6 +37,7 @@
 #include "state/storage.hpp"
 
 namespace mesos {
+namespace internal {
 namespace state {
 
 // An abstraction of "state" (possibly between multiple distributed
@@ -194,6 +195,7 @@ inline process::Future<std::set<std::string> > State::names()
 }
 
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __STATE_STATE_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/storage.hpp
----------------------------------------------------------------------
diff --git a/src/state/storage.hpp b/src/state/storage.hpp
index f5cd607..a36a93e 100644
--- a/src/state/storage.hpp
+++ b/src/state/storage.hpp
@@ -30,6 +30,7 @@
 #include "messages/state.hpp"
 
 namespace mesos {
+namespace internal {
 namespace state {
 
 class Storage
@@ -53,6 +54,7 @@ public:
 };
 
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __STATE_STORAGE_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/zookeeper.cpp
----------------------------------------------------------------------
diff --git a/src/state/zookeeper.cpp b/src/state/zookeeper.cpp
index e570a9b..d355bd7 100644
--- a/src/state/zookeeper.cpp
+++ b/src/state/zookeeper.cpp
@@ -43,6 +43,7 @@ using std::vector;
 using zookeeper::Authentication;
 
 namespace mesos {
+namespace internal {
 namespace state {
 
 
@@ -649,4 +650,5 @@ Future<std::set<string> > ZooKeeperStorage::names()
 }
 
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/state/zookeeper.hpp
----------------------------------------------------------------------
diff --git a/src/state/zookeeper.hpp b/src/state/zookeeper.hpp
index 9352a21..1a8483d 100644
--- a/src/state/zookeeper.hpp
+++ b/src/state/zookeeper.hpp
@@ -17,6 +17,7 @@
 #include "zookeeper/authentication.hpp"
 
 namespace mesos {
+namespace internal {
 namespace state {
 
 // Forward declarations.
@@ -46,6 +47,7 @@ private:
 
 
 } // namespace state {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __STATE_ZOOKEEPER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/attributes_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/attributes_tests.cpp b/src/tests/attributes_tests.cpp
index 138d543..240a8ca 100644
--- a/src/tests/attributes_tests.cpp
+++ b/src/tests/attributes_tests.cpp
@@ -24,6 +24,7 @@
 #include "common/attributes.hpp"
 
 using namespace mesos;
+using namespace mesos::internal;
 
 using std::string;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/authentication_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/authentication_tests.cpp b/src/tests/authentication_tests.cpp
index 59d2954..5220f00 100644
--- a/src/tests/authentication_tests.cpp
+++ b/src/tests/authentication_tests.cpp
@@ -34,12 +34,13 @@
 #include "tests/utils.hpp"
 
 using namespace mesos;
-using namespace mesos::slave;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
+using namespace mesos::internal::tests;
 
 using namespace process;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
 using testing::_;
 using testing::Eq;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/authorization_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/authorization_tests.cpp b/src/tests/authorization_tests.cpp
index edae66d..a8fa4cc 100644
--- a/src/tests/authorization_tests.cpp
+++ b/src/tests/authorization_tests.cpp
@@ -25,7 +25,8 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using namespace process;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/cgroups_isolator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cgroups_isolator_tests.cpp b/src/tests/cgroups_isolator_tests.cpp
index 9fbde33..2d9738f 100644
--- a/src/tests/cgroups_isolator_tests.cpp
+++ b/src/tests/cgroups_isolator_tests.cpp
@@ -30,7 +30,8 @@
 #include "tests/script.hpp"
 
 using namespace mesos;
-using namespace mesos::slave;
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
 
 using std::map;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/cgroups_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cgroups_tests.cpp b/src/tests/cgroups_tests.cpp
index 9d50a47..1eea57f 100644
--- a/src/tests/cgroups_tests.cpp
+++ b/src/tests/cgroups_tests.cpp
@@ -53,7 +53,7 @@
 
 #include "tests/mesos.hpp" // For TEST_CGROUPS_(HIERARCHY|ROOT).
 
-using namespace mesos::tests;
+using namespace mesos::internal::tests;
 
 using namespace process;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/cluster.hpp
----------------------------------------------------------------------
diff --git a/src/tests/cluster.hpp b/src/tests/cluster.hpp
index ccd68db..da242d9 100644
--- a/src/tests/cluster.hpp
+++ b/src/tests/cluster.hpp
@@ -78,6 +78,7 @@
 #include "zookeeper/url.hpp"
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 class Cluster
@@ -588,6 +589,7 @@ inline Try<Nothing> Cluster::Slaves::stop(
 }
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __TESTS_CLUSTER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/common/http_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/common/http_tests.cpp b/src/tests/common/http_tests.cpp
index b030a78..f087b23 100644
--- a/src/tests/common/http_tests.cpp
+++ b/src/tests/common/http_tests.cpp
@@ -34,6 +34,7 @@
 using std::vector;
 
 using namespace mesos;
+using namespace mesos::internal;
 
 // TODO(bmahler): Add tests for other JSON models.
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/composing_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/composing_containerizer_tests.cpp b/src/tests/composing_containerizer_tests.cpp
index 6bb49ea..5ab5a36 100644
--- a/src/tests/composing_containerizer_tests.cpp
+++ b/src/tests/composing_containerizer_tests.cpp
@@ -34,8 +34,9 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::slave;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
+using namespace mesos::internal::tests;
 
 using namespace process;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/containerizer.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer.cpp b/src/tests/containerizer.cpp
index 8341c20..26b87ac 100644
--- a/src/tests/containerizer.cpp
+++ b/src/tests/containerizer.cpp
@@ -29,6 +29,7 @@ using testing::Return;
 using namespace process;
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 
@@ -244,4 +245,5 @@ void TestContainerizer::setup()
 }
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/containerizer.hpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer.hpp b/src/tests/containerizer.hpp
index f6fdb52..24b014f 100644
--- a/src/tests/containerizer.hpp
+++ b/src/tests/containerizer.hpp
@@ -45,6 +45,7 @@
 #include "slave/state.hpp"
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 // Forward declaration.
@@ -133,6 +134,7 @@ private:
 };
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __TEST_CONTAINERIZER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer_tests.cpp b/src/tests/containerizer_tests.cpp
index 0678849..0c87753 100644
--- a/src/tests/containerizer_tests.cpp
+++ b/src/tests/containerizer_tests.cpp
@@ -44,6 +44,9 @@
 #include "tests/utils.hpp"
 
 using namespace mesos;
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
+
 using namespace mesos::slave;
 
 using std::map;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/cram_md5_authentication_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/cram_md5_authentication_tests.cpp b/src/tests/cram_md5_authentication_tests.cpp
index dd102dc..92a89c5 100644
--- a/src/tests/cram_md5_authentication_tests.cpp
+++ b/src/tests/cram_md5_authentication_tests.cpp
@@ -37,7 +37,7 @@
 #include "tests/mesos.hpp"
 #include "tests/module.hpp"
 
-using namespace mesos::tests;
+using namespace mesos::internal::tests;
 
 using namespace process;
 
@@ -47,6 +47,7 @@ using testing::_;
 using testing::Eq;
 
 namespace mesos {
+namespace internal {
 namespace cram_md5 {
 
 template <typename T>
@@ -272,4 +273,5 @@ TYPED_TEST(CRAMMD5Authentication, AuthenticatorDestructionRace)
 }
 
 } // namespace cram_md5 {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/credentials_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/credentials_tests.cpp b/src/tests/credentials_tests.cpp
index 4210d31..c0a8ad0 100644
--- a/src/tests/credentials_tests.cpp
+++ b/src/tests/credentials_tests.cpp
@@ -33,11 +33,12 @@ using std::string;
 using std::vector;
 
 using namespace mesos;
-using namespace mesos::slave;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
-using mesos::slave::Slave;
+using mesos::internal::master::Master;
+using mesos::internal::slave::Slave;
 
 using process::PID;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/disk_quota_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/disk_quota_tests.cpp b/src/tests/disk_quota_tests.cpp
index 1d3aa0c..3239ed2 100644
--- a/src/tests/disk_quota_tests.cpp
+++ b/src/tests/disk_quota_tests.cpp
@@ -49,7 +49,8 @@
 using namespace process;
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using std::string;
 using std::vector;
@@ -57,12 +58,12 @@ using std::vector;
 using testing::_;
 using testing::Return;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::DiskUsageCollector;
-using mesos::slave::Fetcher;
-using mesos::slave::MesosContainerizer;
-using mesos::slave::Slave;
+using mesos::internal::slave::DiskUsageCollector;
+using mesos::internal::slave::Fetcher;
+using mesos::internal::slave::MesosContainerizer;
+using mesos::internal::slave::Slave;
 
 
 class DiskUsageCollectorTest : public TemporaryDirectoryTest {};

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/docker_containerizer_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/docker_containerizer_tests.cpp b/src/tests/docker_containerizer_tests.cpp
index 8b212d4..2105ae2 100644
--- a/src/tests/docker_containerizer_tests.cpp
+++ b/src/tests/docker_containerizer_tests.cpp
@@ -42,18 +42,19 @@
 
 
 using namespace mesos;
-using namespace mesos::slave::paths;
-using namespace mesos::slave::state;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::slave::paths;
+using namespace mesos::internal::slave::state;
+using namespace mesos::internal::tests;
 
 using namespace process;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::DockerContainerizer;
-using mesos::slave::DockerContainerizerProcess;
-using mesos::slave::Fetcher;
-using mesos::slave::Slave;
+using mesos::internal::slave::DockerContainerizer;
+using mesos::internal::slave::DockerContainerizerProcess;
+using mesos::internal::slave::Fetcher;
+using mesos::internal::slave::Slave;
 
 using process::Future;
 using process::Message;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/docker_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/docker_tests.cpp b/src/tests/docker_tests.cpp
index ae01a4e..ef05828 100644
--- a/src/tests/docker_tests.cpp
+++ b/src/tests/docker_tests.cpp
@@ -35,7 +35,8 @@
 #include "tests/flags.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using namespace process;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/environment.cpp
----------------------------------------------------------------------
diff --git a/src/tests/environment.cpp b/src/tests/environment.cpp
index 0c2157b..e002363 100644
--- a/src/tests/environment.cpp
+++ b/src/tests/environment.cpp
@@ -64,6 +64,7 @@ using std::vector;
 using process::Owned;
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 // Storage for the global environment instance.
@@ -440,4 +441,5 @@ Try<string> Environment::mkdtemp()
 }
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/environment.hpp
----------------------------------------------------------------------
diff --git a/src/tests/environment.hpp b/src/tests/environment.hpp
index 5779528..9cf14bc 100644
--- a/src/tests/environment.hpp
+++ b/src/tests/environment.hpp
@@ -29,6 +29,7 @@
 #include "tests/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace tests {
 
 // Used to set up and manage the test environment.
@@ -59,6 +60,7 @@ private:
 extern Environment* environment;
 
 } // namespace tests {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __TESTS_ENVIRONMENT_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/exception_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/exception_tests.cpp b/src/tests/exception_tests.cpp
index 7a41770..13e6d2d 100644
--- a/src/tests/exception_tests.cpp
+++ b/src/tests/exception_tests.cpp
@@ -35,11 +35,12 @@
 #include "tests/mesos.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
-using mesos::master::Master;
+using mesos::internal::master::Master;
 
-using mesos::slave::Slave;
+using mesos::internal::slave::Slave;
 
 using process::Future;
 using process::PID;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/tests/external_containerizer_test.cpp
----------------------------------------------------------------------
diff --git a/src/tests/external_containerizer_test.cpp b/src/tests/external_containerizer_test.cpp
index d6c4437..45cdeb5 100644
--- a/src/tests/external_containerizer_test.cpp
+++ b/src/tests/external_containerizer_test.cpp
@@ -43,13 +43,14 @@
 #include "tests/flags.hpp"
 
 using namespace mesos;
-using namespace mesos::tests;
+using namespace mesos::internal;
+using namespace mesos::internal::tests;
 
 using namespace process;
 
-using mesos::master::Master;
-using mesos::slave::Containerizer;
-using mesos::slave::Slave;
+using mesos::internal::master::Master;
+using mesos::internal::slave::Containerizer;
+using mesos::internal::slave::Slave;
 
 using std::string;
 using std::vector;


[3/7] mesos git commit: Re-introduce "internal" namespace for src/*.

Posted by be...@apache.org.
Re-introduce "internal" namespace for src/*.

Reverted 30295 and 30300.

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


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

Branch: refs/heads/master
Commit: 40b596402521be25b93b9ef4edd8f5c727c9d20e
Parents: 7ee3b7b
Author: Kapil Arya <ka...@mesosphere.io>
Authored: Sun Feb 22 13:59:02 2015 -0800
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Sun Feb 22 21:59:55 2015 -0800

----------------------------------------------------------------------
 include/mesos/executor.hpp                      |  7 +++-
 include/mesos/scheduler.hpp                     | 11 ++++--
 include/mesos/values.hpp                        |  2 +
 src/authentication/cram_md5/authenticatee.hpp   |  2 +
 src/authentication/cram_md5/authenticator.hpp   |  2 +
 src/authentication/cram_md5/auxprop.cpp         |  2 +
 src/authentication/cram_md5/auxprop.hpp         |  2 +
 src/authorizer/authorizer.cpp                   |  2 +
 src/authorizer/authorizer.hpp                   |  2 +
 src/cli/execute.cpp                             |  1 +
 src/cli/resolve.cpp                             |  1 +
 src/common/attributes.cpp                       |  4 ++
 src/common/attributes.hpp                       |  4 ++
 src/common/build.cpp                            |  2 +
 src/common/build.hpp                            |  2 +
 src/common/date_utils.cpp                       |  2 +
 src/common/date_utils.hpp                       |  2 +
 src/common/factory.hpp                          |  6 +--
 src/common/http.cpp                             |  2 +
 src/common/http.hpp                             |  9 +++--
 src/common/lock.cpp                             |  2 +
 src/common/lock.hpp                             |  2 +
 src/common/protobuf_utils.cpp                   |  2 +
 src/common/protobuf_utils.hpp                   |  2 +
 src/common/resources.cpp                        |  2 +-
 src/common/type_utils.cpp                       |  6 ++-
 src/common/values.cpp                           |  2 +
 src/credentials/credentials.hpp                 |  2 +
 src/docker/docker.cpp                           |  2 +-
 src/examples/balloon_framework.cpp              |  1 +
 src/examples/load_generator_framework.cpp       |  4 +-
 src/examples/low_level_scheduler_libprocess.cpp |  4 +-
 src/examples/low_level_scheduler_pthread.cpp    |  4 +-
 src/examples/test_authentication_modules.cpp    |  4 +-
 src/examples/test_framework.cpp                 |  4 +-
 src/examples/test_isolator_module.cpp           |  7 ++--
 src/exec/exec.cpp                               |  5 ++-
 src/files/files.cpp                             |  2 +
 src/files/files.hpp                             |  2 +
 src/health-check/main.cpp                       |  6 ++-
 src/hook/manager.cpp                            |  2 +
 src/hook/manager.hpp                            |  2 +
 src/java/jni/org_apache_mesos_Log.cpp           |  2 +-
 .../org_apache_mesos_state_AbstractState.cpp    |  2 +-
 .../jni/org_apache_mesos_state_LevelDBState.cpp |  2 +-
 .../jni/org_apache_mesos_state_LogState.cpp     |  4 +-
 .../jni/org_apache_mesos_state_Variable.cpp     |  2 +-
 .../org_apache_mesos_state_ZooKeeperState.cpp   |  2 +-
 src/jvm/jvm.cpp                                 |  2 +-
 src/launcher/executor.cpp                       |  6 ++-
 src/launcher/fetcher.cpp                        |  3 +-
 src/linux/cgroups.cpp                           |  2 +-
 src/linux/fs.cpp                                |  2 +
 src/linux/fs.hpp                                |  2 +
 src/local/flags.hpp                             |  2 +
 src/local/local.cpp                             | 22 +++++------
 src/local/local.hpp                             |  2 +
 src/local/main.cpp                              |  6 +--
 src/log/catchup.cpp                             |  2 +
 src/log/catchup.hpp                             |  2 +
 src/log/consensus.cpp                           |  2 +
 src/log/consensus.hpp                           |  2 +
 src/log/coordinator.cpp                         |  2 +
 src/log/coordinator.hpp                         |  2 +
 src/log/leveldb.cpp                             |  2 +
 src/log/leveldb.hpp                             |  2 +
 src/log/log.cpp                                 |  2 +
 src/log/log.hpp                                 |  2 +
 src/log/main.cpp                                |  3 +-
 src/log/recover.cpp                             |  2 +
 src/log/recover.hpp                             |  2 +
 src/log/replica.cpp                             |  2 +
 src/log/replica.hpp                             |  2 +
 src/log/storage.hpp                             |  2 +
 src/log/tool.hpp                                |  2 +
 src/log/tool/benchmark.cpp                      |  2 +
 src/log/tool/benchmark.hpp                      |  2 +
 src/log/tool/initialize.cpp                     |  2 +
 src/log/tool/initialize.hpp                     |  2 +
 src/log/tool/read.cpp                           |  2 +
 src/log/tool/read.hpp                           |  2 +
 src/log/tool/replica.cpp                        |  2 +
 src/log/tool/replica.hpp                        |  2 +
 src/logging/flags.hpp                           |  2 +
 src/logging/logging.cpp                         |  2 +
 src/logging/logging.hpp                         |  2 +
 src/master/allocator/allocator.hpp              |  2 +
 src/master/allocator/mesos/allocator.hpp        |  2 +
 src/master/allocator/mesos/hierarchical.hpp     |  6 ++-
 src/master/allocator/sorter/drf/sorter.cpp      |  2 +
 src/master/allocator/sorter/drf/sorter.hpp      |  2 +
 src/master/allocator/sorter/sorter.hpp          |  2 +
 src/master/constants.cpp                        |  2 +
 src/master/constants.hpp                        |  2 +
 src/master/contender.cpp                        |  2 +
 src/master/contender.hpp                        |  2 +
 src/master/detector.cpp                         |  2 +
 src/master/detector.hpp                         |  2 +
 src/master/flags.hpp                            |  2 +
 src/master/http.cpp                             |  4 +-
 src/master/main.cpp                             | 16 ++++----
 src/master/master.cpp                           |  2 +
 src/master/master.hpp                           |  2 +
 src/master/metrics.cpp                          |  2 +
 src/master/metrics.hpp                          |  2 +
 src/master/registrar.cpp                        |  6 ++-
 src/master/registrar.hpp                        |  2 +
 src/master/registry.proto                       |  2 +-
 src/master/repairer.cpp                         |  2 +
 src/master/repairer.hpp                         |  2 +
 src/master/validation.cpp                       |  2 +
 src/master/validation.hpp                       |  2 +
 src/messages/log.proto                          |  2 +-
 src/messages/messages.hpp                       |  2 +
 src/messages/messages.proto                     |  2 +-
 src/messages/state.proto                        |  2 +-
 src/module/manager.cpp                          |  1 +
 src/module/manager.hpp                          |  6 +--
 src/sched/constants.cpp                         |  2 +
 src/sched/constants.hpp                         |  2 +
 src/sched/flags.hpp                             |  2 +
 src/sched/sched.cpp                             | 11 ++++--
 src/scheduler/scheduler.cpp                     |  3 +-
 src/slave/constants.cpp                         |  2 +
 src/slave/constants.hpp                         |  2 +
 src/slave/containerizer/composing.cpp           |  2 +
 src/slave/containerizer/composing.hpp           |  2 +
 src/slave/containerizer/containerizer.cpp       |  2 +
 src/slave/containerizer/containerizer.hpp       |  2 +
 src/slave/containerizer/docker.cpp              |  4 +-
 src/slave/containerizer/docker.hpp              |  2 +
 .../containerizer/external_containerizer.cpp    |  2 +
 .../containerizer/external_containerizer.hpp    |  2 +
 src/slave/containerizer/fetcher.cpp             |  2 +
 src/slave/containerizer/fetcher.hpp             |  2 +
 .../isolators/cgroups/constants.hpp             |  2 +
 .../isolators/cgroups/cpushare.cpp              |  7 ++++
 .../isolators/cgroups/cpushare.hpp              | 12 +++---
 .../containerizer/isolators/cgroups/mem.cpp     |  7 ++++
 .../containerizer/isolators/cgroups/mem.hpp     | 12 +++---
 .../isolators/cgroups/perf_event.cpp            |  7 ++++
 .../isolators/cgroups/perf_event.hpp            | 10 +++--
 .../isolators/filesystem/shared.cpp             |  7 ++++
 .../isolators/filesystem/shared.hpp             | 10 +++--
 .../containerizer/isolators/namespaces/pid.cpp  |  7 ++++
 .../containerizer/isolators/namespaces/pid.hpp  | 10 +++--
 .../containerizer/isolators/network/helper.cpp  |  2 +-
 .../isolators/network/port_mapping.cpp          |  9 ++++-
 .../isolators/network/port_mapping.hpp          | 10 +++--
 src/slave/containerizer/isolators/posix.hpp     | 41 +++++++++++---------
 .../containerizer/isolators/posix/disk.cpp      |  7 ++++
 .../containerizer/isolators/posix/disk.hpp      | 13 ++++---
 src/slave/containerizer/launcher.cpp            |  4 ++
 src/slave/containerizer/launcher.hpp            |  6 ++-
 src/slave/containerizer/linux_launcher.cpp      |  4 ++
 src/slave/containerizer/linux_launcher.hpp      |  4 +-
 src/slave/containerizer/mesos/containerizer.cpp |  7 ++++
 src/slave/containerizer/mesos/containerizer.hpp | 16 ++++----
 src/slave/containerizer/mesos/launch.cpp        |  2 +
 src/slave/containerizer/mesos/launch.hpp        |  2 +
 src/slave/containerizer/mesos/main.cpp          |  2 +-
 src/slave/flags.hpp                             |  2 +
 src/slave/gc.cpp                                |  2 +
 src/slave/gc.hpp                                |  2 +
 src/slave/http.cpp                              |  4 +-
 src/slave/main.cpp                              |  4 +-
 src/slave/metrics.cpp                           |  2 +
 src/slave/metrics.hpp                           |  2 +
 src/slave/monitor.cpp                           |  2 +
 src/slave/monitor.hpp                           |  2 +
 src/slave/paths.cpp                             |  2 +
 src/slave/paths.hpp                             |  2 +
 src/slave/slave.cpp                             |  2 +
 src/slave/slave.hpp                             |  2 +
 src/slave/state.cpp                             |  2 +
 src/slave/state.hpp                             |  4 +-
 src/slave/status_update_manager.cpp             |  2 +
 src/slave/status_update_manager.hpp             |  2 +
 src/state/in_memory.cpp                         |  2 +
 src/state/in_memory.hpp                         |  2 +
 src/state/leveldb.cpp                           |  2 +
 src/state/leveldb.hpp                           |  2 +
 src/state/log.cpp                               |  4 +-
 src/state/log.hpp                               |  2 +
 src/state/protobuf.hpp                          |  2 +
 src/state/state.hpp                             |  2 +
 src/state/storage.hpp                           |  2 +
 src/state/zookeeper.cpp                         |  2 +
 src/state/zookeeper.hpp                         |  2 +
 src/tests/attributes_tests.cpp                  |  1 +
 src/tests/authentication_tests.cpp              |  7 ++--
 src/tests/authorization_tests.cpp               |  3 +-
 src/tests/cgroups_isolator_tests.cpp            |  3 +-
 src/tests/cgroups_tests.cpp                     |  2 +-
 src/tests/cluster.hpp                           |  2 +
 src/tests/common/http_tests.cpp                 |  1 +
 src/tests/composing_containerizer_tests.cpp     |  5 ++-
 src/tests/containerizer.cpp                     |  2 +
 src/tests/containerizer.hpp                     |  2 +
 src/tests/containerizer_tests.cpp               |  3 ++
 src/tests/cram_md5_authentication_tests.cpp     |  4 +-
 src/tests/credentials_tests.cpp                 |  9 +++--
 src/tests/disk_quota_tests.cpp                  | 13 ++++---
 src/tests/docker_containerizer_tests.cpp        | 17 ++++----
 src/tests/docker_tests.cpp                      |  3 +-
 src/tests/environment.cpp                       |  2 +
 src/tests/environment.hpp                       |  2 +
 src/tests/exception_tests.cpp                   |  7 ++--
 src/tests/external_containerizer_test.cpp       |  9 +++--
 src/tests/fault_tolerance_tests.cpp             | 13 ++++---
 src/tests/fetcher_tests.cpp                     | 13 ++++---
 src/tests/files_tests.cpp                       |  4 +-
 src/tests/flags.cpp                             |  2 +
 src/tests/flags.hpp                             |  2 +
 src/tests/fs_tests.cpp                          |  1 +
 src/tests/gc_tests.cpp                          | 11 +++---
 src/tests/group_tests.cpp                       |  4 +-
 src/tests/health_check_tests.cpp                | 15 +++----
 src/tests/hierarchical_allocator_tests.cpp      |  9 +++--
 src/tests/hook_tests.cpp                        |  7 ++--
 src/tests/isolator.hpp                          | 16 ++++----
 src/tests/isolator_tests.cpp                    | 34 ++++++++--------
 src/tests/log_tests.cpp                         |  5 ++-
 src/tests/logging_tests.cpp                     |  2 +-
 src/tests/main.cpp                              |  8 ++--
 src/tests/master_allocator_tests.cpp            | 13 ++++---
 src/tests/master_authorization_tests.cpp        |  9 +++--
 src/tests/master_contender_detector_tests.cpp   | 35 +++++++++--------
 src/tests/master_slave_reconciliation_tests.cpp |  9 +++--
 src/tests/master_tests.cpp                      | 15 +++----
 src/tests/master_validation_tests.cpp           |  4 +-
 src/tests/mesos.cpp                             |  2 +
 src/tests/mesos.hpp                             |  2 +
 src/tests/metrics_tests.cpp                     |  7 ++--
 src/tests/module.cpp                            |  3 +-
 src/tests/module.hpp                            |  2 +
 src/tests/module_tests.cpp                      |  6 +--
 src/tests/monitor_tests.cpp                     |  3 +-
 src/tests/ns_tests.cpp                          |  2 +-
 src/tests/partition_tests.cpp                   |  9 +++--
 src/tests/paths_tests.cpp                       |  2 +
 src/tests/port_mapping_tests.cpp                | 21 +++++-----
 src/tests/protobuf_io_tests.cpp                 |  3 +-
 src/tests/rate_limiting_tests.cpp               |  9 +++--
 src/tests/reconciliation_tests.cpp              |  7 ++--
 src/tests/registrar_tests.cpp                   | 17 ++++----
 src/tests/registrar_zookeeper_tests.cpp         |  7 ++--
 src/tests/repair_tests.cpp                      |  5 ++-
 src/tests/resource_offers_tests.cpp             |  7 ++--
 src/tests/resources_tests.cpp                   |  5 ++-
 src/tests/scheduler_tests.cpp                   |  9 +++--
 src/tests/script.cpp                            |  2 +
 src/tests/script.hpp                            |  4 +-
 src/tests/shutdown_tests.cpp                    |  9 +++--
 src/tests/slave_recovery_tests.cpp              | 15 +++----
 src/tests/slave_tests.cpp                       | 17 ++++----
 src/tests/sorter_tests.cpp                      |  2 +-
 src/tests/state_tests.cpp                       | 35 ++++++++---------
 src/tests/status_update_manager_tests.cpp       |  7 ++--
 src/tests/utils.cpp                             |  2 +
 src/tests/utils.hpp                             |  2 +
 src/tests/values_tests.cpp                      |  3 +-
 src/tests/zookeeper.cpp                         |  2 +
 src/tests/zookeeper.hpp                         |  4 +-
 src/tests/zookeeper_test_server.cpp             |  2 +
 src/tests/zookeeper_test_server.hpp             |  2 +
 src/tests/zookeeper_tests.cpp                   |  4 +-
 src/usage/main.cpp                              |  2 +-
 src/usage/usage.cpp                             |  2 +
 src/usage/usage.hpp                             |  2 +
 src/watcher/whitelist_watcher.cpp               |  2 +
 src/watcher/whitelist_watcher.hpp               |  2 +
 272 files changed, 865 insertions(+), 390 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/include/mesos/executor.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/executor.hpp b/include/mesos/executor.hpp
index cf82b04..f3cd3cc 100644
--- a/include/mesos/executor.hpp
+++ b/include/mesos/executor.hpp
@@ -50,7 +50,10 @@ namespace mesos {
 
 // A few forward declarations.
 class ExecutorDriver;
+
+namespace internal {
 class ExecutorProcess;
+}
 
 // Callback interface to be implemented by frameworks' executors. Note
 // that only one callback will be invoked at a time, so it is not
@@ -226,12 +229,12 @@ public:
   virtual Status sendFrameworkMessage(const std::string& data);
 
 private:
-  friend class ExecutorProcess;
+  friend class internal::ExecutorProcess;
 
   Executor* executor;
 
   // Libprocess process for communicating with slave.
-  ExecutorProcess* process;
+  internal::ExecutorProcess* process;
 
   // Mutex to enforce all non-callbacks are execute serially.
   pthread_mutex_t mutex;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/include/mesos/scheduler.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/scheduler.hpp b/include/mesos/scheduler.hpp
index f24ec80..efee2cb 100644
--- a/include/mesos/scheduler.hpp
+++ b/include/mesos/scheduler.hpp
@@ -47,14 +47,17 @@
 namespace mesos {
 
 // A few forward declarations.
-class MasterDetector;
 class SchedulerDriver;
-class SchedulerProcess;
 
 namespace scheduler {
 class MesosProcess;
 } // namespace scheduler {
 
+namespace internal {
+class MasterDetector;
+class SchedulerProcess;
+} // namespace internal {
+
 
 // Callback interface to be implemented by frameworks' schedulers.
 // Note that only one callback will be invoked at a time, so it is not
@@ -433,7 +436,7 @@ public:
 
 protected:
   // Used to detect (i.e., choose) the master.
-  MasterDetector* detector;
+  internal::MasterDetector* detector;
 
 private:
   void initialize();
@@ -443,7 +446,7 @@ private:
   std::string master;
 
   // Used for communicating with the master.
-  SchedulerProcess* process;
+  internal::SchedulerProcess* process;
 
   // URL for the master (e.g., zk://, file://, etc).
   std::string url;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/include/mesos/values.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/values.hpp b/include/mesos/values.hpp
index e957677..c61f9e8 100644
--- a/include/mesos/values.hpp
+++ b/include/mesos/values.hpp
@@ -56,11 +56,13 @@ Value::Set& operator -= (Value::Set& left, const Value::Set& right);
 std::ostream& operator << (std::ostream& stream, const Value::Text& value);
 bool operator == (const Value::Text& left, const Value::Text& right);
 
+namespace internal {
 namespace values {
 
 Try<Value> parse(const std::string& text);
 
 } // namespace values {
+} // namespace internal {
 
 } // namespace mesos {
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/authentication/cram_md5/authenticatee.hpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/authenticatee.hpp b/src/authentication/cram_md5/authenticatee.hpp
index 3311916..55fac68 100644
--- a/src/authentication/cram_md5/authenticatee.hpp
+++ b/src/authentication/cram_md5/authenticatee.hpp
@@ -42,6 +42,7 @@
 #include "messages/messages.hpp"
 
 namespace mesos {
+namespace internal {
 namespace cram_md5 {
 
 // Forward declaration.
@@ -420,6 +421,7 @@ inline process::Future<bool> CRAMMD5Authenticatee::authenticate(
 }
 
 } // namespace cram_md5 {
+} // namespace internal {
 } // namespace mesos {
 
 #endif //__AUTHENTICATION_CRAM_MD5_AUTHENTICATEE_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/authentication/cram_md5/authenticator.hpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/authenticator.hpp b/src/authentication/cram_md5/authenticator.hpp
index 7578ea1..c6f465f 100644
--- a/src/authentication/cram_md5/authenticator.hpp
+++ b/src/authentication/cram_md5/authenticator.hpp
@@ -43,6 +43,7 @@
 #include "messages/messages.hpp"
 
 namespace mesos {
+namespace internal {
 namespace cram_md5 {
 
 // Forward declaration.
@@ -510,6 +511,7 @@ process::Future<Option<std::string>> CRAMMD5Authenticator::authenticate(void)
 }
 
 } // namespace cram_md5 {
+} // namespace internal {
 } // namespace mesos {
 
 #endif //__AUTHENTICATION_CRAM_MD5_AUTHENTICATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/authentication/cram_md5/auxprop.cpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/auxprop.cpp b/src/authentication/cram_md5/auxprop.cpp
index 5ff9755..cf503a2 100644
--- a/src/authentication/cram_md5/auxprop.cpp
+++ b/src/authentication/cram_md5/auxprop.cpp
@@ -24,6 +24,7 @@ using std::list;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace cram_md5 {
 
 // Storage for the static members.
@@ -199,4 +200,5 @@ int InMemoryAuxiliaryPropertyPlugin::initialize(
 }
 
 } // namespace cram_md5 {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/authentication/cram_md5/auxprop.hpp
----------------------------------------------------------------------
diff --git a/src/authentication/cram_md5/auxprop.hpp b/src/authentication/cram_md5/auxprop.hpp
index d036b11..b894386 100644
--- a/src/authentication/cram_md5/auxprop.hpp
+++ b/src/authentication/cram_md5/auxprop.hpp
@@ -30,6 +30,7 @@
 #include <stout/option.hpp>
 
 namespace mesos {
+namespace internal {
 namespace cram_md5 {
 
 struct Property
@@ -89,6 +90,7 @@ private:
 };
 
 } // namespace cram_md5 {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __AUTHENTICATION_CRAM_MD5_AUXPROP_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/authorizer/authorizer.cpp
----------------------------------------------------------------------
diff --git a/src/authorizer/authorizer.cpp b/src/authorizer/authorizer.cpp
index 4f2b6a7..21e97e3 100644
--- a/src/authorizer/authorizer.cpp
+++ b/src/authorizer/authorizer.cpp
@@ -46,6 +46,7 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 
 class LocalAuthorizerProcess : public ProtobufProcess<LocalAuthorizerProcess>
 {
@@ -277,4 +278,5 @@ Future<bool> LocalAuthorizer::authorize(const ACL::ShutdownFramework& request)
       process, static_cast<F>(&LocalAuthorizerProcess::authorize), request);
 }
 
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/authorizer/authorizer.hpp
----------------------------------------------------------------------
diff --git a/src/authorizer/authorizer.hpp b/src/authorizer/authorizer.hpp
index 66ddb92..c039d94 100644
--- a/src/authorizer/authorizer.hpp
+++ b/src/authorizer/authorizer.hpp
@@ -31,6 +31,7 @@
 #include "mesos/mesos.hpp"
 
 namespace mesos {
+namespace internal {
 
 // Forward declaration.
 class LocalAuthorizerProcess;
@@ -80,6 +81,7 @@ private:
   LocalAuthorizerProcess* process;
 };
 
+} // namespace internal {
 } // namespace mesos {
 
 #endif //__AUTHORIZER_AUTHORIZER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/cli/execute.cpp
----------------------------------------------------------------------
diff --git a/src/cli/execute.cpp b/src/cli/execute.cpp
index c55e961..84f70dc 100644
--- a/src/cli/execute.cpp
+++ b/src/cli/execute.cpp
@@ -36,6 +36,7 @@
 #include "hdfs/hdfs.hpp"
 
 using namespace mesos;
+using namespace mesos::internal;
 
 using process::UPID;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/cli/resolve.cpp
----------------------------------------------------------------------
diff --git a/src/cli/resolve.cpp b/src/cli/resolve.cpp
index 77bd443..a99b609 100644
--- a/src/cli/resolve.cpp
+++ b/src/cli/resolve.cpp
@@ -33,6 +33,7 @@
 #include "messages/messages.hpp"
 
 using namespace mesos;
+using namespace mesos::internal;
 
 using process::Future;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/attributes.cpp
----------------------------------------------------------------------
diff --git a/src/common/attributes.cpp b/src/common/attributes.cpp
index 33da50c..aab114e 100644
--- a/src/common/attributes.cpp
+++ b/src/common/attributes.cpp
@@ -53,6 +53,9 @@ std::ostream& operator << (std::ostream& stream, const Attribute& attribute)
 }
 
 
+namespace internal {
+
+
 bool Attributes::operator == (const Attributes& that) const
 {
   if (size() != that.size()) {
@@ -228,4 +231,5 @@ Value::Text Attributes::get(
 }
 
 
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/attributes.hpp
----------------------------------------------------------------------
diff --git a/src/common/attributes.hpp b/src/common/attributes.hpp
index 844bdbf..0a043d5 100644
--- a/src/common/attributes.hpp
+++ b/src/common/attributes.hpp
@@ -32,6 +32,9 @@ namespace mesos {
 std::ostream& operator << (std::ostream& stream, const Attribute& attribute);
 
 
+namespace internal {
+
+
 class Attributes
 {
 public:
@@ -115,6 +118,7 @@ private:
 };
 
 
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __ATTRIBUTES_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/build.cpp
----------------------------------------------------------------------
diff --git a/src/common/build.cpp b/src/common/build.cpp
index 90bd719..9bef16e 100644
--- a/src/common/build.cpp
+++ b/src/common/build.cpp
@@ -26,6 +26,7 @@
 #include "common/build.hpp"
 
 namespace mesos {
+namespace internal {
 namespace build {
 
 const std::string DATE = BUILD_DATE;
@@ -52,4 +53,5 @@ const Option<std::string> GIT_TAG = std::string(BUILD_GIT_TAG);
 const Option<std::string> GIT_TAG = None();
 #endif
 } // namespace build {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/build.hpp
----------------------------------------------------------------------
diff --git a/src/common/build.hpp b/src/common/build.hpp
index 9765c8f..7d61a06 100644
--- a/src/common/build.hpp
+++ b/src/common/build.hpp
@@ -21,6 +21,7 @@
 #include <string>
 
 namespace mesos {
+namespace internal {
 namespace build {
 
 extern const std::string DATE;
@@ -33,6 +34,7 @@ extern const Option<std::string> GIT_BRANCH;
 extern const Option<std::string> GIT_TAG;
 
 } // namespace build {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __BUILD_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/date_utils.cpp
----------------------------------------------------------------------
diff --git a/src/common/date_utils.cpp b/src/common/date_utils.cpp
index a148fd8..c5268bc 100644
--- a/src/common/date_utils.cpp
+++ b/src/common/date_utils.cpp
@@ -23,6 +23,7 @@
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace DateUtils {
 
 // Get the current date in the format used for Mesos IDs (YYYYMMDD-hhmmss).
@@ -38,4 +39,5 @@ string currentDate()
 }
 
 } // namespace DateUtils {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/date_utils.hpp
----------------------------------------------------------------------
diff --git a/src/common/date_utils.hpp b/src/common/date_utils.hpp
index b11c8e0..5f14a06 100644
--- a/src/common/date_utils.hpp
+++ b/src/common/date_utils.hpp
@@ -22,6 +22,7 @@
 #include <string>
 
 namespace mesos {
+namespace internal {
 
 /**
  * Utility functions for dealing with dates.
@@ -34,6 +35,7 @@ std::string currentDate();
 
 
 } // namespace DateUtils {
+} // namespace internal {
 } // namespace mesos {
 
 #endif

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/factory.hpp
----------------------------------------------------------------------
diff --git a/src/common/factory.hpp b/src/common/factory.hpp
index 26f545b..bdddcf8 100644
--- a/src/common/factory.hpp
+++ b/src/common/factory.hpp
@@ -49,7 +49,7 @@
 
 
 #define DECLARE_FACTORY(T, P) \
-  class T##Factory : public ::mesos::factory::Factory<T, P> { \
+  class T##Factory : public ::mesos::internal::factory::Factory<T, P> { \
     T##Factory(); \
     static T##Factory *instance; \
     static void initialize(); \
@@ -76,8 +76,7 @@
 
 // Helper classes for the factory macros.
 
-namespace mesos {
-namespace factory {
+namespace mesos { namespace internal { namespace factory {
 
 template<typename T, typename P> class Creator {
 public:
@@ -115,6 +114,7 @@ protected:
 };
 
 } // namespace factory {
+} // namespace internal {
 } // namespace mesos {
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/http.cpp
----------------------------------------------------------------------
diff --git a/src/common/http.cpp b/src/common/http.cpp
index 4b60408..0b57fb0 100644
--- a/src/common/http.cpp
+++ b/src/common/http.cpp
@@ -32,6 +32,7 @@
 using std::vector;
 
 namespace mesos {
+namespace internal {
 
 // TODO(bmahler): Kill these in favor of automatic Proto->JSON
 // Conversion (when it becomes available).
@@ -188,4 +189,5 @@ JSON::Object model(
 }
 
 
+}  // namespace internal {
 }  // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/http.hpp
----------------------------------------------------------------------
diff --git a/src/common/http.hpp b/src/common/http.hpp
index bdb5948..afce7fe 100644
--- a/src/common/http.hpp
+++ b/src/common/http.hpp
@@ -25,13 +25,15 @@
 
 #include <stout/json.hpp>
 
-#include "messages/messages.hpp"
-
 namespace mesos {
 
-class Attributes;
 class Resources;
 
+namespace internal {
+
+class Attributes;
+class Task;
+
 
 JSON::Object model(const Resources& resources);
 JSON::Object model(const Attributes& attributes);
@@ -45,6 +47,7 @@ JSON::Object model(
     const TaskState& state,
     const std::vector<TaskStatus>& statuses);
 
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __COMMON_HTTP_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/lock.cpp
----------------------------------------------------------------------
diff --git a/src/common/lock.cpp b/src/common/lock.cpp
index a52d3ff..bb8ea3a 100644
--- a/src/common/lock.cpp
+++ b/src/common/lock.cpp
@@ -19,6 +19,7 @@
 #include "lock.hpp"
 
 namespace mesos {
+namespace internal {
 
 Lock::Lock(pthread_mutex_t* _mutex)
   : mutex(_mutex), locked(false)
@@ -50,4 +51,5 @@ Lock::~Lock()
   unlock();
 }
 
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/lock.hpp
----------------------------------------------------------------------
diff --git a/src/common/lock.hpp b/src/common/lock.hpp
index fbe04e0..988dff5 100644
--- a/src/common/lock.hpp
+++ b/src/common/lock.hpp
@@ -22,6 +22,7 @@
 #include <pthread.h>
 
 namespace mesos {
+namespace internal {
 
 // RAII class for locking pthread_mutexes.
 class Lock
@@ -38,6 +39,7 @@ private:
   bool locked;
 };
 
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOCK_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/protobuf_utils.cpp
----------------------------------------------------------------------
diff --git a/src/common/protobuf_utils.cpp b/src/common/protobuf_utils.cpp
index c398c58..f57213a 100644
--- a/src/common/protobuf_utils.cpp
+++ b/src/common/protobuf_utils.cpp
@@ -30,6 +30,7 @@
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace protobuf {
 
 bool isTerminalState(const TaskState& state)
@@ -154,4 +155,5 @@ MasterInfo createMasterInfo(const process::UPID& pid)
 }
 
 } // namespace protobuf {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/protobuf_utils.hpp
----------------------------------------------------------------------
diff --git a/src/common/protobuf_utils.hpp b/src/common/protobuf_utils.hpp
index 82c6e4f..a579391 100644
--- a/src/common/protobuf_utils.hpp
+++ b/src/common/protobuf_utils.hpp
@@ -31,6 +31,7 @@ struct UPID;
 }
 
 namespace mesos {
+namespace internal {
 namespace protobuf {
 
 bool isTerminalState(const TaskState& state);
@@ -61,6 +62,7 @@ Option<bool> getTaskHealth(const Task& task);
 MasterInfo createMasterInfo(const process::UPID& pid);
 
 } // namespace protobuf {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __PROTOBUF_UTILS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/resources.cpp
----------------------------------------------------------------------
diff --git a/src/common/resources.cpp b/src/common/resources.cpp
index 625922d..a45bbaf 100644
--- a/src/common/resources.cpp
+++ b/src/common/resources.cpp
@@ -219,7 +219,7 @@ Try<Resource> Resources::parse(
     const string& value,
     const string& role)
 {
-  Try<Value> result = values::parse(value);
+  Try<Value> result = internal::values::parse(value);
   if (result.isError()) {
     return Error(
         "Failed to parse resource " + name +

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/type_utils.cpp
----------------------------------------------------------------------
diff --git a/src/common/type_utils.cpp b/src/common/type_utils.cpp
index 12a36bb..a1704c6 100644
--- a/src/common/type_utils.cpp
+++ b/src/common/type_utils.cpp
@@ -140,7 +140,8 @@ bool operator == (const SlaveInfo& left, const SlaveInfo& right)
 {
   return left.hostname() == right.hostname() &&
     Resources(left.resources()) == Resources(right.resources()) &&
-    Attributes(left.attributes()) == Attributes(right.attributes()) &&
+    internal::Attributes(left.attributes()) ==
+    internal::Attributes(right.attributes()) &&
     left.has_id() == right.has_id() &&
     (!left.has_id() || (left.id() == right.id())) &&
     left.has_checkpoint() == right.has_checkpoint() &&
@@ -157,6 +158,8 @@ bool operator == (const Volume& left, const Volume& right)
 }
 
 
+namespace internal {
+
 bool operator == (const Task& left, const Task& right)
 {
   return left.name() == right.name() &&
@@ -189,4 +192,5 @@ std::ostream& operator << (
     << " of framework " << update.framework_id();
 }
 
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/common/values.cpp
----------------------------------------------------------------------
diff --git a/src/common/values.cpp b/src/common/values.cpp
index 242f2a0..597c452 100644
--- a/src/common/values.cpp
+++ b/src/common/values.cpp
@@ -40,6 +40,7 @@ using std::vector;
 
 namespace mesos {
 
+namespace internal {
 namespace values {
 
 Try<Value> parse(const std::string& text)
@@ -128,6 +129,7 @@ Try<Value> parse(const std::string& text)
 }
 
 } // namespace values {
+} // namespace internal {
 
 
 ostream& operator << (ostream& stream, const Value::Scalar& scalar)

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/credentials/credentials.hpp
----------------------------------------------------------------------
diff --git a/src/credentials/credentials.hpp b/src/credentials/credentials.hpp
index 130beed..43aa40a 100644
--- a/src/credentials/credentials.hpp
+++ b/src/credentials/credentials.hpp
@@ -29,6 +29,7 @@
 #include <stout/try.hpp>
 
 namespace mesos {
+namespace internal {
 namespace credentials {
 
 inline Result<Credentials> read(const Path& path)
@@ -126,6 +127,7 @@ inline Result<Credential> readCredential(const Path& path)
 }
 
 } // namespace credentials {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __CREDENTIALS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/docker/docker.cpp
----------------------------------------------------------------------
diff --git a/src/docker/docker.cpp b/src/docker/docker.cpp
index 94f16e7..3a485a2 100644
--- a/src/docker/docker.cpp
+++ b/src/docker/docker.cpp
@@ -43,7 +43,7 @@
 
 using namespace mesos;
 
-using namespace mesos::slave;
+using namespace mesos::internal::slave;
 
 using namespace process;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/examples/balloon_framework.cpp
----------------------------------------------------------------------
diff --git a/src/examples/balloon_framework.cpp b/src/examples/balloon_framework.cpp
index 08bb613..c2337ba 100644
--- a/src/examples/balloon_framework.cpp
+++ b/src/examples/balloon_framework.cpp
@@ -37,6 +37,7 @@
 #include "examples/utils.hpp"
 
 using namespace mesos;
+using namespace mesos::internal;
 
 using std::cout;
 using std::endl;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/examples/load_generator_framework.cpp
----------------------------------------------------------------------
diff --git a/src/examples/load_generator_framework.cpp b/src/examples/load_generator_framework.cpp
index 16d2782..be1a3bf 100644
--- a/src/examples/load_generator_framework.cpp
+++ b/src/examples/load_generator_framework.cpp
@@ -225,7 +225,7 @@ private:
 };
 
 
-class Flags : public mesos::logging::Flags
+class Flags : public mesos::internal::logging::Flags
 {
 public:
   Flags()
@@ -326,7 +326,7 @@ int main(int argc, char** argv)
   }
 
   // We want the logger to catch failure signals.
-  mesos::logging::initialize(argv[0], flags, true);
+  mesos::internal::logging::initialize(argv[0], flags, true);
 
   LoadGeneratorScheduler scheduler(flags.qps.get(), flags.duration);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/examples/low_level_scheduler_libprocess.cpp
----------------------------------------------------------------------
diff --git a/src/examples/low_level_scheduler_libprocess.cpp b/src/examples/low_level_scheduler_libprocess.cpp
index 986b175..63d34ee 100644
--- a/src/examples/low_level_scheduler_libprocess.cpp
+++ b/src/examples/low_level_scheduler_libprocess.cpp
@@ -361,7 +361,7 @@ int main(int argc, char** argv)
     uri = path::join(os::getenv("MESOS_BUILD_DIR"), "src", "test-executor");
   }
 
-  mesos::logging::Flags flags;
+  mesos::internal::logging::Flags flags;
 
   string role;
   flags.add(&role,
@@ -387,7 +387,7 @@ int main(int argc, char** argv)
   }
 
   process::initialize();
-  logging::initialize(argv[0], flags, true); // Catch signals.
+  internal::logging::initialize(argv[0], flags, true); // Catch signals.
 
   FrameworkInfo framework;
   framework.set_user(""); // Have Mesos fill in the current user.

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/examples/low_level_scheduler_pthread.cpp
----------------------------------------------------------------------
diff --git a/src/examples/low_level_scheduler_pthread.cpp b/src/examples/low_level_scheduler_pthread.cpp
index d69e68b..6d1f938 100644
--- a/src/examples/low_level_scheduler_pthread.cpp
+++ b/src/examples/low_level_scheduler_pthread.cpp
@@ -421,7 +421,7 @@ int main(int argc, char** argv)
     uri = path::join(os::getenv("MESOS_BUILD_DIR"), "src", "test-executor");
   }
 
-  mesos::logging::Flags flags;
+  mesos::internal::logging::Flags flags;
 
   string role;
   flags.add(&role,
@@ -446,7 +446,7 @@ int main(int argc, char** argv)
     EXIT(1);
   }
 
-  logging::initialize(argv[0], flags, true); // Catch signals.
+  internal::logging::initialize(argv[0], flags, true); // Catch signals.
 
   FrameworkInfo framework;
   framework.set_user(""); // Have Mesos fill in the current user.

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/examples/test_authentication_modules.cpp
----------------------------------------------------------------------
diff --git a/src/examples/test_authentication_modules.cpp b/src/examples/test_authentication_modules.cpp
index 5ff58d2..2304a14 100644
--- a/src/examples/test_authentication_modules.cpp
+++ b/src/examples/test_authentication_modules.cpp
@@ -41,7 +41,7 @@ static bool compatible()
 
 static Authenticatee* createCRAMMD5Authenticatee(const Parameters& parameters)
 {
-  return new mesos::cram_md5::CRAMMD5Authenticatee();
+  return new mesos::internal::cram_md5::CRAMMD5Authenticatee();
 }
 
 
@@ -57,7 +57,7 @@ mesos::modules::Module<Authenticatee> org_apache_mesos_TestCRAMMD5Authenticatee(
 
 static Authenticator* createCRAMMD5Authenticator(const Parameters& parameters)
 {
-  return new mesos::cram_md5::CRAMMD5Authenticator();
+  return new mesos::internal::cram_md5::CRAMMD5Authenticator();
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/examples/test_framework.cpp
----------------------------------------------------------------------
diff --git a/src/examples/test_framework.cpp b/src/examples/test_framework.cpp
index 04468c2..9f4b53e 100644
--- a/src/examples/test_framework.cpp
+++ b/src/examples/test_framework.cpp
@@ -201,7 +201,7 @@ int main(int argc, char** argv)
     uri = string(getenv("MESOS_BUILD_DIR")) + "/src/test-executor";
   }
 
-  mesos::logging::Flags flags;
+  mesos::internal::logging::Flags flags;
 
   string role;
   flags.add(&role,
@@ -226,7 +226,7 @@ int main(int argc, char** argv)
     exit(1);
   }
 
-  logging::initialize(argv[0], flags, true); // Catch signals.
+  internal::logging::initialize(argv[0], flags, true); // Catch signals.
 
   ExecutorInfo executor;
   executor.mutable_executor_id()->set_value("default");

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/examples/test_isolator_module.cpp
----------------------------------------------------------------------
diff --git a/src/examples/test_isolator_module.cpp b/src/examples/test_isolator_module.cpp
index a66dc74..2c303f5 100644
--- a/src/examples/test_isolator_module.cpp
+++ b/src/examples/test_isolator_module.cpp
@@ -30,10 +30,11 @@
 
 using namespace mesos;
 
-using mesos::slave::Flags;
+using mesos::internal::slave::Flags;
+using mesos::internal::slave::PosixCpuIsolatorProcess;
+using mesos::internal::slave::PosixMemIsolatorProcess;
+
 using mesos::slave::Isolator;
-using mesos::slave::PosixCpuIsolatorProcess;
-using mesos::slave::PosixMemIsolatorProcess;
 
 
 // The sole purpose of this function is just to exercise the

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/exec/exec.cpp
----------------------------------------------------------------------
diff --git a/src/exec/exec.cpp b/src/exec/exec.cpp
index 8250bd4..a159846 100644
--- a/src/exec/exec.cpp
+++ b/src/exec/exec.cpp
@@ -57,7 +57,8 @@
 #include "slave/state.hpp"
 
 using namespace mesos;
-using namespace mesos::slave;
+using namespace mesos::internal;
+using namespace mesos::internal::slave;
 
 using namespace process;
 
@@ -67,6 +68,7 @@ using process::wait; // Necessary on some OS's to disambiguate.
 
 
 namespace mesos {
+namespace internal {
 
 class ShutdownProcess : public Process<ShutdownProcess>
 {
@@ -566,6 +568,7 @@ private:
   LinkedHashMap<TaskID, TaskInfo> tasks; // Unacknowledged tasks.
 };
 
+} // namespace internal {
 } // namespace mesos {
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/files/files.cpp
----------------------------------------------------------------------
diff --git a/src/files/files.cpp b/src/files/files.cpp
index 58a74b1..7b10240 100644
--- a/src/files/files.cpp
+++ b/src/files/files.cpp
@@ -52,6 +52,7 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 
 class FilesProcess : public Process<FilesProcess>
 {
@@ -471,4 +472,5 @@ void Files::detach(const string& name)
   dispatch(process, &FilesProcess::detach, name);
 }
 
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/files/files.hpp
----------------------------------------------------------------------
diff --git a/src/files/files.hpp b/src/files/files.hpp
index c8322d1..818087b 100644
--- a/src/files/files.hpp
+++ b/src/files/files.hpp
@@ -35,6 +35,7 @@
 #include <stout/path.hpp>
 
 namespace mesos {
+namespace internal {
 
 // Forward declarations.
 class FilesProcess;
@@ -139,6 +140,7 @@ inline JSON::Object jsonFileInfo(const std::string& path,
   return file;
 }
 
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __FILES_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/health-check/main.cpp
----------------------------------------------------------------------
diff --git a/src/health-check/main.cpp b/src/health-check/main.cpp
index 260b872..a4ce742 100644
--- a/src/health-check/main.cpp
+++ b/src/health-check/main.cpp
@@ -60,6 +60,7 @@ using std::vector;
 using process::UPID;
 
 namespace mesos {
+namespace internal {
 
 using namespace process;
 
@@ -250,6 +251,7 @@ private:
   process::Time startTime;
 };
 
+} // namespace internal {
 } // namespace mesos {
 
 
@@ -357,7 +359,7 @@ int main(int argc, char** argv)
   TaskID taskID;
   taskID.set_value(flags.task_id.get());
 
-  HealthCheckerProcess process(
+  internal::HealthCheckerProcess process(
     check.get(),
     flags.executor.get(),
     taskID);
@@ -366,7 +368,7 @@ int main(int argc, char** argv)
 
   process::Future<Nothing> checking =
     process::dispatch(
-      process, &HealthCheckerProcess::healthCheck);
+      process, &internal::HealthCheckerProcess::healthCheck);
 
   checking.await();
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/hook/manager.cpp
----------------------------------------------------------------------
diff --git a/src/hook/manager.cpp b/src/hook/manager.cpp
index a6938d0..3fd9d5e 100644
--- a/src/hook/manager.cpp
+++ b/src/hook/manager.cpp
@@ -41,6 +41,7 @@ using std::vector;
 using mesos::modules::ModuleManager;
 
 namespace mesos {
+namespace internal {
 
 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
 static hashmap<string, Hook*> availableHooks;
@@ -148,4 +149,5 @@ void HookManager::slaveRemoveExecutorHook(
   }
 }
 
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/hook/manager.hpp
----------------------------------------------------------------------
diff --git a/src/hook/manager.hpp b/src/hook/manager.hpp
index a6594c1..d3729ea 100644
--- a/src/hook/manager.hpp
+++ b/src/hook/manager.hpp
@@ -27,6 +27,7 @@
 #include <stout/try.hpp>
 
 namespace mesos {
+namespace internal {
 
 class HookManager
 {
@@ -52,6 +53,7 @@ public:
       const ExecutorInfo& executorInfo);
 };
 
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __HOOK_MANAGER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/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 3261b61..1e1d821 100644
--- a/src/java/jni/org_apache_mesos_Log.cpp
+++ b/src/java/jni/org_apache_mesos_Log.cpp
@@ -33,7 +33,7 @@
 #include "org_apache_mesos_Log_Writer.h"
 
 using namespace mesos;
-using namespace mesos::log;
+using namespace mesos::internal::log;
 
 using namespace process;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/java/jni/org_apache_mesos_state_AbstractState.cpp
----------------------------------------------------------------------
diff --git a/src/java/jni/org_apache_mesos_state_AbstractState.cpp b/src/java/jni/org_apache_mesos_state_AbstractState.cpp
index d7e6cb5..1accc8a 100644
--- a/src/java/jni/org_apache_mesos_state_AbstractState.cpp
+++ b/src/java/jni/org_apache_mesos_state_AbstractState.cpp
@@ -14,7 +14,7 @@
 #include "construct.hpp"
 #include "convert.hpp"
 
-using namespace mesos::state;
+using namespace mesos::internal::state;
 
 using process::Future;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/java/jni/org_apache_mesos_state_LevelDBState.cpp
----------------------------------------------------------------------
diff --git a/src/java/jni/org_apache_mesos_state_LevelDBState.cpp b/src/java/jni/org_apache_mesos_state_LevelDBState.cpp
index 27e8905..30f6309 100644
--- a/src/java/jni/org_apache_mesos_state_LevelDBState.cpp
+++ b/src/java/jni/org_apache_mesos_state_LevelDBState.cpp
@@ -8,7 +8,7 @@
 #include "construct.hpp"
 #include "convert.hpp"
 
-using namespace mesos::state;
+using namespace mesos::internal::state;
 
 using std::string;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/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 dc1e49d..6382b9c 100644
--- a/src/java/jni/org_apache_mesos_state_LogState.cpp
+++ b/src/java/jni/org_apache_mesos_state_LogState.cpp
@@ -12,8 +12,8 @@
 #include "construct.hpp"
 #include "convert.hpp"
 
-using namespace mesos::log;
-using namespace mesos::state;
+using namespace mesos::internal::log;
+using namespace mesos::internal::state;
 
 using std::string;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/java/jni/org_apache_mesos_state_Variable.cpp
----------------------------------------------------------------------
diff --git a/src/java/jni/org_apache_mesos_state_Variable.cpp b/src/java/jni/org_apache_mesos_state_Variable.cpp
index b600996..4d840ce 100644
--- a/src/java/jni/org_apache_mesos_state_Variable.cpp
+++ b/src/java/jni/org_apache_mesos_state_Variable.cpp
@@ -4,7 +4,7 @@
 
 #include "state/state.hpp"
 
-using namespace mesos::state;
+using namespace mesos::internal::state;
 
 extern "C" {
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/java/jni/org_apache_mesos_state_ZooKeeperState.cpp
----------------------------------------------------------------------
diff --git a/src/java/jni/org_apache_mesos_state_ZooKeeperState.cpp b/src/java/jni/org_apache_mesos_state_ZooKeeperState.cpp
index 7b81760..c40e685 100644
--- a/src/java/jni/org_apache_mesos_state_ZooKeeperState.cpp
+++ b/src/java/jni/org_apache_mesos_state_ZooKeeperState.cpp
@@ -10,7 +10,7 @@
 #include "construct.hpp"
 #include "convert.hpp"
 
-using namespace mesos::state;
+using namespace mesos::internal::state;
 
 using std::string;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/jvm/jvm.cpp
----------------------------------------------------------------------
diff --git a/src/jvm/jvm.cpp b/src/jvm/jvm.cpp
index 38fedfc..d33a655 100644
--- a/src/jvm/jvm.cpp
+++ b/src/jvm/jvm.cpp
@@ -60,7 +60,7 @@ Try<Jvm*> Jvm::create(
   std::string libJvmPath = os::getenv("JAVA_JVM_LIBRARY", false);
 
   if (libJvmPath.empty()) {
-    libJvmPath = mesos::build::JAVA_JVM_LIBRARY;
+    libJvmPath = mesos::internal::build::JAVA_JVM_LIBRARY;
   }
 
   static DynamicLibrary* libJvm = new DynamicLibrary();

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/launcher/executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/executor.cpp b/src/launcher/executor.cpp
index f5db28c..de6f1b1 100644
--- a/src/launcher/executor.cpp
+++ b/src/launcher/executor.cpp
@@ -57,6 +57,8 @@
 
 #include "slave/constants.hpp"
 
+using namespace mesos::internal::slave;
+
 using process::wait; // Necessary on some OS's to disambiguate.
 
 using std::cout;
@@ -66,6 +68,7 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 
 using namespace process;
 
@@ -574,6 +577,7 @@ private:
   CommandExecutorProcess* process;
 };
 
+} // namespace internal {
 } // namespace mesos {
 
 
@@ -647,7 +651,7 @@ int main(int argc, char** argv)
   if (path.empty()) {
     path = os::realpath(dirname(argv[0])).get();
   }
-  mesos::CommandExecutor executor(override, path);
+  mesos::internal::CommandExecutor executor(override, path);
   mesos::MesosExecutorDriver driver(&executor);
   return driver.run() == mesos::DRIVER_STOPPED ? 0 : 1;
 }

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/launcher/fetcher.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/fetcher.cpp b/src/launcher/fetcher.cpp
index 5b2d86d..fed0105 100644
--- a/src/launcher/fetcher.cpp
+++ b/src/launcher/fetcher.cpp
@@ -35,6 +35,7 @@
 #include "logging/logging.hpp"
 
 using namespace mesos;
+using namespace mesos::internal;
 
 using mesos::fetcher::FetcherInfo;
 
@@ -256,7 +257,7 @@ int main(int argc, char* argv[])
 {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 
-  mesos::logging::Flags flags;
+  mesos::internal::logging::Flags flags;
 
   Try<Nothing> load = flags.load("MESOS_", argc, argv);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/linux/cgroups.cpp
----------------------------------------------------------------------
diff --git a/src/linux/cgroups.cpp b/src/linux/cgroups.cpp
index a307e27..a533b31 100644
--- a/src/linux/cgroups.cpp
+++ b/src/linux/cgroups.cpp
@@ -62,7 +62,7 @@
 using namespace process;
 
 // TODO(benh): Move linux/fs.hpp out of 'mesos- namespace.
-using namespace mesos;
+using namespace mesos::internal;
 
 using std::dec;
 using std::getline;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/linux/fs.cpp
----------------------------------------------------------------------
diff --git a/src/linux/fs.cpp b/src/linux/fs.cpp
index d17d3ab..b01d14c 100644
--- a/src/linux/fs.cpp
+++ b/src/linux/fs.cpp
@@ -30,6 +30,7 @@
 
 
 namespace mesos {
+namespace internal {
 namespace fs {
 
 
@@ -178,4 +179,5 @@ Try<Nothing> unmount(const std::string& target, int flags)
 
 
 } // namespace fs {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/linux/fs.hpp
----------------------------------------------------------------------
diff --git a/src/linux/fs.hpp b/src/linux/fs.hpp
index 9368d36..ac8b5f4 100644
--- a/src/linux/fs.hpp
+++ b/src/linux/fs.hpp
@@ -32,6 +32,7 @@
 
 
 namespace mesos {
+namespace internal {
 namespace fs {
 
 
@@ -141,6 +142,7 @@ Try<Nothing> unmount(const std::string& target, int flags = 0);
 
 
 } // namespace fs {
+} // namespace internal {
 } // namespace mesos {
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/local/flags.hpp
----------------------------------------------------------------------
diff --git a/src/local/flags.hpp b/src/local/flags.hpp
index 16be2ad..54e8831 100644
--- a/src/local/flags.hpp
+++ b/src/local/flags.hpp
@@ -24,6 +24,7 @@
 #include "logging/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace local {
 
 class Flags : public logging::Flags
@@ -41,6 +42,7 @@ public:
 };
 
 } // namespace local {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOCAL_FLAGS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/local/local.cpp
----------------------------------------------------------------------
diff --git a/src/local/local.cpp b/src/local/local.cpp
index 5717bd6..377bd36 100644
--- a/src/local/local.cpp
+++ b/src/local/local.cpp
@@ -66,25 +66,19 @@
 #include "state/protobuf.hpp"
 #include "state/storage.hpp"
 
-using namespace mesos;
-using namespace mesos::log;
+using namespace mesos::internal;
+using namespace mesos::internal::log;
 
-using mesos::master::allocator::Allocator;
-using mesos::master::allocator::HierarchicalDRFAllocator;
+using mesos::internal::master::allocator::Allocator;
+using mesos::internal::master::allocator::HierarchicalDRFAllocator;
 
-using mesos::master::Master;
-using mesos::master::Registrar;
-using mesos::master::Repairer;
+using mesos::internal::master::Master;
+using mesos::internal::master::Registrar;
+using mesos::internal::master::Repairer;
 
 using mesos::modules::Anonymous;
 using mesos::modules::ModuleManager;
 
-using mesos::slave::Containerizer;
-using mesos::slave::Fetcher;
-using mesos::slave::GarbageCollector;
-using mesos::slave::Slave;
-using mesos::slave::StatusUpdateManager;
-
 using process::Owned;
 using process::PID;
 using process::UPID;
@@ -97,6 +91,7 @@ using std::vector;
 
 
 namespace mesos {
+namespace internal {
 namespace local {
 
 static Allocator* allocator = NULL;
@@ -355,4 +350,5 @@ void shutdown()
 }
 
 } // namespace local {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/local/local.hpp
----------------------------------------------------------------------
diff --git a/src/local/local.hpp b/src/local/local.hpp
index 053434a..0aa50ef 100644
--- a/src/local/local.hpp
+++ b/src/local/local.hpp
@@ -24,6 +24,7 @@
 #include "local/flags.hpp"
 
 namespace mesos {
+namespace internal {
 
 // Forward declarations.
 namespace master {
@@ -50,6 +51,7 @@ process::PID<master::Master> launch(
 void shutdown();
 
 } // namespace local {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MESOS_LOCAL_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/local/main.cpp
----------------------------------------------------------------------
diff --git a/src/local/main.cpp b/src/local/main.cpp
index 7f12142..a641b9e 100644
--- a/src/local/main.cpp
+++ b/src/local/main.cpp
@@ -33,10 +33,10 @@
 
 #include "logging/logging.hpp"
 
-using namespace mesos;
+using namespace mesos::internal;
 
-using mesos::master::Master;
-using mesos::slave::Slave;
+using mesos::internal::master::Master;
+using mesos::internal::slave::Slave;
 
 using std::cerr;
 using std::endl;

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/catchup.cpp
----------------------------------------------------------------------
diff --git a/src/log/catchup.cpp b/src/log/catchup.cpp
index c33ecd8..f7afc38 100644
--- a/src/log/catchup.cpp
+++ b/src/log/catchup.cpp
@@ -38,6 +38,7 @@ using namespace process;
 using std::list;
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 class CatchUpProcess : public Process<CatchUpProcess>
@@ -349,4 +350,5 @@ Future<Nothing> catchup(
 }
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/catchup.hpp
----------------------------------------------------------------------
diff --git a/src/log/catchup.hpp b/src/log/catchup.hpp
index 9767c24..5e23b57 100644
--- a/src/log/catchup.hpp
+++ b/src/log/catchup.hpp
@@ -33,6 +33,7 @@
 #include "log/replica.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 // Catches-up a set of log positions in the local replica. The user of
@@ -52,6 +53,7 @@ extern process::Future<Nothing> catchup(
     const Duration& timeout = Seconds(10));
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_CATCHUP_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/consensus.cpp
----------------------------------------------------------------------
diff --git a/src/log/consensus.cpp b/src/log/consensus.cpp
index 7e33c69..59f80d0 100644
--- a/src/log/consensus.cpp
+++ b/src/log/consensus.cpp
@@ -40,6 +40,7 @@ using namespace process;
 using std::set;
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 class ExplicitPromiseProcess : public Process<ExplicitPromiseProcess>
@@ -781,4 +782,5 @@ Future<Action> fill(
 }
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/consensus.hpp
----------------------------------------------------------------------
diff --git a/src/log/consensus.hpp b/src/log/consensus.hpp
index ee9e908..ba41601 100644
--- a/src/log/consensus.hpp
+++ b/src/log/consensus.hpp
@@ -41,6 +41,7 @@
 // to agree on previously written entries in the log.
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 // Runs the promise phase (a.k.a., the prepare phase) in Paxos. This
@@ -129,6 +130,7 @@ extern process::Future<Action> fill(
     uint64_t position);
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_CONSENSUS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/coordinator.cpp
----------------------------------------------------------------------
diff --git a/src/log/coordinator.cpp b/src/log/coordinator.cpp
index b97e133..da689fa 100644
--- a/src/log/coordinator.cpp
+++ b/src/log/coordinator.cpp
@@ -40,6 +40,7 @@ using namespace process;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 class CoordinatorProcess : public Process<CoordinatorProcess>
@@ -476,4 +477,5 @@ Future<Option<uint64_t> > Coordinator::truncate(uint64_t to)
 }
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/coordinator.hpp
----------------------------------------------------------------------
diff --git a/src/log/coordinator.hpp b/src/log/coordinator.hpp
index e00d34d..b8a475f 100644
--- a/src/log/coordinator.hpp
+++ b/src/log/coordinator.hpp
@@ -32,6 +32,7 @@
 #include "log/replica.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 // Forward declaration.
@@ -75,6 +76,7 @@ private:
 };
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_COORDINATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/leveldb.cpp
----------------------------------------------------------------------
diff --git a/src/log/leveldb.cpp b/src/log/leveldb.cpp
index 1d67942..ad9e2f0 100644
--- a/src/log/leveldb.cpp
+++ b/src/log/leveldb.cpp
@@ -37,6 +37,7 @@
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 class Varint64Comparator : public leveldb::Comparator
@@ -440,4 +441,5 @@ Try<Action> LevelDBStorage::read(uint64_t position)
 }
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/leveldb.hpp
----------------------------------------------------------------------
diff --git a/src/log/leveldb.hpp b/src/log/leveldb.hpp
index 8f5df5b..40a6d6f 100644
--- a/src/log/leveldb.hpp
+++ b/src/log/leveldb.hpp
@@ -28,6 +28,7 @@
 #include "log/storage.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 // Concrete implementation of the storage interface using leveldb.
@@ -50,6 +51,7 @@ private:
 };
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_LEVELDB_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/log.cpp
----------------------------------------------------------------------
diff --git a/src/log/log.cpp b/src/log/log.cpp
index cd7b6a8..598af69 100644
--- a/src/log/log.cpp
+++ b/src/log/log.cpp
@@ -46,6 +46,7 @@ using std::set;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 class LogProcess : public Process<LogProcess>
@@ -866,4 +867,5 @@ Future<Option<Log::Position> > Log::Writer::truncate(const Log::Position& to)
 }
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/log.hpp
----------------------------------------------------------------------
diff --git a/src/log/log.hpp b/src/log/log.hpp
index fac7d97..7c905c7 100644
--- a/src/log/log.hpp
+++ b/src/log/log.hpp
@@ -38,6 +38,7 @@
 #include "zookeeper/group.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 // Forward declarations.
@@ -231,6 +232,7 @@ private:
 };
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/main.cpp
----------------------------------------------------------------------
diff --git a/src/log/main.cpp b/src/log/main.cpp
index 2027ba0..348e887 100644
--- a/src/log/main.cpp
+++ b/src/log/main.cpp
@@ -33,7 +33,8 @@
 #include "log/tool/replica.hpp"
 
 using namespace mesos;
-using namespace mesos::log;
+using namespace mesos::internal;
+using namespace mesos::internal::log;
 
 using namespace process;
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/recover.cpp
----------------------------------------------------------------------
diff --git a/src/log/recover.cpp b/src/log/recover.cpp
index 3e175f3..cc5fa94 100644
--- a/src/log/recover.cpp
+++ b/src/log/recover.cpp
@@ -46,6 +46,7 @@ using namespace process;
 using std::set;
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 // This class is responsible for executing the log recover protocol.
@@ -640,4 +641,5 @@ Future<Owned<Replica> > recover(
 }
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/recover.hpp
----------------------------------------------------------------------
diff --git a/src/log/recover.hpp b/src/log/recover.hpp
index 11e144e..6243c18 100644
--- a/src/log/recover.hpp
+++ b/src/log/recover.hpp
@@ -31,6 +31,7 @@
 #include "log/replica.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 // Recovers a replica by catching up enough missing positions. A
@@ -57,6 +58,7 @@ extern process::Future<process::Owned<Replica> > recover(
     bool autoInitialize = false);
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_RECOVER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/replica.cpp
----------------------------------------------------------------------
diff --git a/src/log/replica.cpp b/src/log/replica.cpp
index 83cb3e7..2bfcc3e 100644
--- a/src/log/replica.cpp
+++ b/src/log/replica.cpp
@@ -44,6 +44,7 @@ using std::list;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 namespace protocol {
@@ -821,4 +822,5 @@ PID<ReplicaProcess> Replica::pid() const
 }
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/replica.hpp
----------------------------------------------------------------------
diff --git a/src/log/replica.hpp b/src/log/replica.hpp
index b260208..33d3f1d 100644
--- a/src/log/replica.hpp
+++ b/src/log/replica.hpp
@@ -33,6 +33,7 @@
 #include "messages/log.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 namespace protocol {
@@ -101,6 +102,7 @@ private:
 };
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_REPLICA_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/storage.hpp
----------------------------------------------------------------------
diff --git a/src/log/storage.hpp b/src/log/storage.hpp
index 5e81f4e..60bf37f 100644
--- a/src/log/storage.hpp
+++ b/src/log/storage.hpp
@@ -30,6 +30,7 @@
 #include "messages/log.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 
 // Abstract interface for reading and writing records.
@@ -58,6 +59,7 @@ public:
 };
 
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_STORAGE_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/tool.hpp
----------------------------------------------------------------------
diff --git a/src/log/tool.hpp b/src/log/tool.hpp
index 3905159..656d3f6 100644
--- a/src/log/tool.hpp
+++ b/src/log/tool.hpp
@@ -25,6 +25,7 @@
 #include <stout/try.hpp>
 
 namespace mesos {
+namespace internal {
 namespace log {
 namespace tool {
 
@@ -44,6 +45,7 @@ public:
 
 } // namespace tool {
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_TOOL_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/tool/benchmark.cpp
----------------------------------------------------------------------
diff --git a/src/log/tool/benchmark.cpp b/src/log/tool/benchmark.cpp
index 096298e..54d7898 100644
--- a/src/log/tool/benchmark.cpp
+++ b/src/log/tool/benchmark.cpp
@@ -52,6 +52,7 @@ using std::string;
 using std::vector;
 
 namespace mesos {
+namespace internal {
 namespace log {
 namespace tool {
 
@@ -277,4 +278,5 @@ Try<Nothing> Benchmark::execute(int argc, char** argv)
 
 } // namespace tool {
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/tool/benchmark.hpp
----------------------------------------------------------------------
diff --git a/src/log/tool/benchmark.hpp b/src/log/tool/benchmark.hpp
index d519a69..e0109e2 100644
--- a/src/log/tool/benchmark.hpp
+++ b/src/log/tool/benchmark.hpp
@@ -27,6 +27,7 @@
 #include "logging/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 namespace tool {
 
@@ -61,6 +62,7 @@ private:
 
 } // namespace tool {
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_TOOL_BENCHMARK_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/tool/initialize.cpp
----------------------------------------------------------------------
diff --git a/src/log/tool/initialize.cpp b/src/log/tool/initialize.cpp
index f3d6337..ccda7fb 100644
--- a/src/log/tool/initialize.cpp
+++ b/src/log/tool/initialize.cpp
@@ -36,6 +36,7 @@ using std::ostringstream;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace log {
 namespace tool {
 
@@ -143,4 +144,5 @@ Try<Nothing> Initialize::execute(int argc, char** argv)
 
 } // namespace tool {
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/tool/initialize.hpp
----------------------------------------------------------------------
diff --git a/src/log/tool/initialize.hpp b/src/log/tool/initialize.hpp
index f55225f..10ac269 100644
--- a/src/log/tool/initialize.hpp
+++ b/src/log/tool/initialize.hpp
@@ -28,6 +28,7 @@
 #include "logging/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 namespace tool {
 
@@ -56,6 +57,7 @@ private:
 
 } // namespace tool {
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_TOOL_INITIALIZE_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/tool/read.cpp
----------------------------------------------------------------------
diff --git a/src/log/tool/read.cpp b/src/log/tool/read.cpp
index 4c6c30d..d141385 100644
--- a/src/log/tool/read.cpp
+++ b/src/log/tool/read.cpp
@@ -40,6 +40,7 @@ using std::ostringstream;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace log {
 namespace tool {
 
@@ -185,4 +186,5 @@ Try<Nothing> Read::execute(int argc, char** argv)
 
 } // namespace tool {
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/tool/read.hpp
----------------------------------------------------------------------
diff --git a/src/log/tool/read.hpp b/src/log/tool/read.hpp
index 1a077de..9a6971b 100644
--- a/src/log/tool/read.hpp
+++ b/src/log/tool/read.hpp
@@ -30,6 +30,7 @@
 #include "logging/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 namespace tool {
 
@@ -60,6 +61,7 @@ private:
 
 } // namespace tool {
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_TOOL_READ_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/tool/replica.cpp
----------------------------------------------------------------------
diff --git a/src/log/tool/replica.cpp b/src/log/tool/replica.cpp
index 0edc70a..3985fc7 100644
--- a/src/log/tool/replica.cpp
+++ b/src/log/tool/replica.cpp
@@ -37,6 +37,7 @@ using std::ostringstream;
 using std::string;
 
 namespace mesos {
+namespace internal {
 namespace log {
 namespace tool {
 
@@ -145,4 +146,5 @@ Try<Nothing> Replica::execute(int argc, char** argv)
 
 } // namespace tool {
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/log/tool/replica.hpp
----------------------------------------------------------------------
diff --git a/src/log/tool/replica.hpp b/src/log/tool/replica.hpp
index 9d8dfd0..7140c7e 100644
--- a/src/log/tool/replica.hpp
+++ b/src/log/tool/replica.hpp
@@ -29,6 +29,7 @@
 #include "logging/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace log {
 namespace tool {
 
@@ -61,6 +62,7 @@ private:
 
 } // namespace tool {
 } // namespace log {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOG_TOOL_REPLICA_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/logging/flags.hpp
----------------------------------------------------------------------
diff --git a/src/logging/flags.hpp b/src/logging/flags.hpp
index 30b59b6..4facb33 100644
--- a/src/logging/flags.hpp
+++ b/src/logging/flags.hpp
@@ -25,6 +25,7 @@
 #include <stout/option.hpp>
 
 namespace mesos {
+namespace internal {
 namespace logging {
 
 class Flags : public virtual flags::FlagsBase
@@ -79,6 +80,7 @@ public:
 };
 
 } // namespace logging {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOGGING_FLAGS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/logging/logging.cpp
----------------------------------------------------------------------
diff --git a/src/logging/logging.cpp b/src/logging/logging.cpp
index 9ae91d1..6b14575 100644
--- a/src/logging/logging.cpp
+++ b/src/logging/logging.cpp
@@ -59,6 +59,7 @@ extern "C" void __cxa_pure_virtual()
 
 
 namespace mesos {
+namespace internal {
 namespace logging {
 
 // Persistent copy of argv0 since InitGoogleLogging requires the
@@ -232,4 +233,5 @@ Try<string> getLogFile(google::LogSeverity severity)
 }
 
 } // namespace logging {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/logging/logging.hpp
----------------------------------------------------------------------
diff --git a/src/logging/logging.hpp b/src/logging/logging.hpp
index 1984f9b..f204d61 100644
--- a/src/logging/logging.hpp
+++ b/src/logging/logging.hpp
@@ -26,6 +26,7 @@
 #include "logging/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace logging {
 
 void initialize(
@@ -43,6 +44,7 @@ Try<std::string> getLogFile(google::LogSeverity severity);
 google::LogSeverity getLogSeverity(const std::string& logging_level);
 
 } // namespace logging {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __LOGGING_LOGGING_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/allocator/allocator.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/allocator.hpp b/src/master/allocator/allocator.hpp
index c2461a3..b67b8fd 100644
--- a/src/master/allocator/allocator.hpp
+++ b/src/master/allocator/allocator.hpp
@@ -32,6 +32,7 @@
 #include "master/flags.hpp"
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 namespace allocator {
@@ -124,6 +125,7 @@ public:
 
 } // namespace allocator {
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_ALLOCATOR_ALLOCATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/allocator/mesos/allocator.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/allocator.hpp b/src/master/allocator/mesos/allocator.hpp
index 99b40a0..fb898f1 100644
--- a/src/master/allocator/mesos/allocator.hpp
+++ b/src/master/allocator/mesos/allocator.hpp
@@ -25,6 +25,7 @@
 #include "master/allocator/allocator.hpp"
 
 namespace mesos {
+namespace internal {
 namespace master {
 namespace allocator {
 
@@ -378,6 +379,7 @@ inline void MesosAllocator<AllocatorProcess>::reviveOffers(
 
 } // namespace allocator {
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_ALLOCATOR_MESOS_ALLOCATOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/allocator/mesos/hierarchical.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/mesos/hierarchical.hpp b/src/master/allocator/mesos/hierarchical.hpp
index 2680d62..9b7ded3 100644
--- a/src/master/allocator/mesos/hierarchical.hpp
+++ b/src/master/allocator/mesos/hierarchical.hpp
@@ -39,6 +39,7 @@
 #include "master/allocator/sorter/drf/sorter.hpp"
 
 namespace mesos {
+namespace internal {
 namespace master {
 namespace allocator {
 
@@ -400,6 +401,7 @@ HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::deactivateFramework(
 }
 
 
+namespace internal {
 
 // TODO(bmahler): Generalize this.
 template <typename Iterable>
@@ -412,6 +414,7 @@ Resources sum(const Iterable& resources)
   return total;
 }
 
+} // namespace internal {
 
 
 template <class RoleSorter, class FrameworkSorter>
@@ -444,7 +447,7 @@ HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::addSlave(
 
   slaves[slaveId] = Slave();
   slaves[slaveId].total = total;
-  slaves[slaveId].available = total - sum(used.values());
+  slaves[slaveId].available = total - internal::sum(used.values());
   slaves[slaveId].activated = true;
   slaves[slaveId].checkpoint = slaveInfo.checkpoint();
   slaves[slaveId].hostname = slaveInfo.hostname();
@@ -916,6 +919,7 @@ HierarchicalAllocatorProcess<RoleSorter, FrameworkSorter>::allocatable(
 
 } // namespace allocator {
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_ALLOCATOR_MESOS_HIERARCHICAL_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/allocator/sorter/drf/sorter.cpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/sorter/drf/sorter.cpp b/src/master/allocator/sorter/drf/sorter.cpp
index 7baee45..2f69f38 100644
--- a/src/master/allocator/sorter/drf/sorter.cpp
+++ b/src/master/allocator/sorter/drf/sorter.cpp
@@ -26,6 +26,7 @@ using std::string;
 
 
 namespace mesos {
+namespace internal {
 namespace master {
 namespace allocator {
 
@@ -290,4 +291,5 @@ set<Client, DRFComparator>::iterator DRFSorter::find(const string& name)
 
 } // namespace allocator {
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/allocator/sorter/drf/sorter.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/sorter/drf/sorter.hpp b/src/master/allocator/sorter/drf/sorter.hpp
index 966fe03..4366710 100644
--- a/src/master/allocator/sorter/drf/sorter.hpp
+++ b/src/master/allocator/sorter/drf/sorter.hpp
@@ -30,6 +30,7 @@
 
 
 namespace mesos {
+namespace internal {
 namespace master {
 namespace allocator {
 
@@ -124,6 +125,7 @@ private:
 
 } // namespace allocator {
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_ALLOCATOR_SORTER_DRF_SORTER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/allocator/sorter/sorter.hpp
----------------------------------------------------------------------
diff --git a/src/master/allocator/sorter/sorter.hpp b/src/master/allocator/sorter/sorter.hpp
index 8cd70dd..e2efb27 100644
--- a/src/master/allocator/sorter/sorter.hpp
+++ b/src/master/allocator/sorter/sorter.hpp
@@ -25,6 +25,7 @@
 #include <mesos/resources.hpp>
 
 namespace mesos {
+namespace internal {
 namespace master {
 namespace allocator {
 
@@ -100,6 +101,7 @@ public:
 
 } // namespace allocator {
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_ALLOCATOR_SORTER_SORTER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/constants.cpp
----------------------------------------------------------------------
diff --git a/src/master/constants.cpp b/src/master/constants.cpp
index d3d0f71..9ee17e9 100644
--- a/src/master/constants.cpp
+++ b/src/master/constants.cpp
@@ -25,6 +25,7 @@
 #include "master/constants.hpp"
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 const int MAX_OFFERS_PER_FRAMEWORK = 50;
@@ -44,4 +45,5 @@ const Duration ZOOKEEPER_SESSION_TIMEOUT = Seconds(10);
 const std::string DEFAULT_AUTHENTICATOR = "crammd5";
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/constants.hpp
----------------------------------------------------------------------
diff --git a/src/master/constants.hpp b/src/master/constants.hpp
index ad3fe81..c386eab 100644
--- a/src/master/constants.hpp
+++ b/src/master/constants.hpp
@@ -27,6 +27,7 @@
 #include <stout/duration.hpp>
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 // TODO(benh): Add units after constants.
@@ -108,6 +109,7 @@ extern const Duration ZOOKEEPER_SESSION_TIMEOUT;
 extern const std::string DEFAULT_AUTHENTICATOR;
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_CONSTANTS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/contender.cpp
----------------------------------------------------------------------
diff --git a/src/master/contender.cpp b/src/master/contender.cpp
index 594a764..2af70c7 100644
--- a/src/master/contender.cpp
+++ b/src/master/contender.cpp
@@ -38,6 +38,7 @@ using namespace process;
 using namespace zookeeper;
 
 namespace mesos {
+namespace internal {
 
 using namespace master;
 
@@ -244,4 +245,5 @@ Future<Future<Nothing> > ZooKeeperMasterContenderProcess::contend()
   return candidacy.get();
 }
 
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/contender.hpp
----------------------------------------------------------------------
diff --git a/src/master/contender.hpp b/src/master/contender.hpp
index c009de3..62bcff4 100644
--- a/src/master/contender.hpp
+++ b/src/master/contender.hpp
@@ -34,6 +34,7 @@
 #include "zookeeper/url.hpp"
 
 namespace mesos {
+namespace internal {
 
 extern const Duration MASTER_CONTENDER_ZK_SESSION_TIMEOUT;
 
@@ -125,6 +126,7 @@ private:
   ZooKeeperMasterContenderProcess* process;
 };
 
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_CONTENDER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/detector.cpp
----------------------------------------------------------------------
diff --git a/src/master/detector.cpp b/src/master/detector.cpp
index 053b0a7..5700711 100644
--- a/src/master/detector.cpp
+++ b/src/master/detector.cpp
@@ -51,6 +51,7 @@ using std::set;
 using std::string;
 
 namespace mesos {
+namespace internal {
 
 const Duration MASTER_DETECTOR_ZK_SESSION_TIMEOUT = Seconds(10);
 
@@ -483,4 +484,5 @@ Future<Option<MasterInfo> > ZooKeeperMasterDetector::detect(
   return dispatch(process, &ZooKeeperMasterDetectorProcess::detect, previous);
 }
 
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/detector.hpp
----------------------------------------------------------------------
diff --git a/src/master/detector.hpp b/src/master/detector.hpp
index 1373845..d31ce53 100644
--- a/src/master/detector.hpp
+++ b/src/master/detector.hpp
@@ -35,6 +35,7 @@
 #include "zookeeper/url.hpp"
 
 namespace mesos {
+namespace internal {
 
 extern const Duration MASTER_DETECTOR_ZK_SESSION_TIMEOUT;
 
@@ -126,6 +127,7 @@ private:
   ZooKeeperMasterDetectorProcess* process;
 };
 
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_DETECTOR_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/flags.hpp
----------------------------------------------------------------------
diff --git a/src/master/flags.hpp b/src/master/flags.hpp
index 51a6059..85ce328 100644
--- a/src/master/flags.hpp
+++ b/src/master/flags.hpp
@@ -43,6 +43,7 @@
 #include "messages/messages.hpp"
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 class Flags : public logging::Flags
@@ -414,6 +415,7 @@ public:
 };
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_FLAGS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/http.cpp
----------------------------------------------------------------------
diff --git a/src/master/http.cpp b/src/master/http.cpp
index 5e3afdf..117c0ee 100644
--- a/src/master/http.cpp
+++ b/src/master/http.cpp
@@ -77,10 +77,11 @@ using std::vector;
 
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 // Pull in model overrides from common.
-using mesos::model;
+using mesos::internal::model;
 
 // Pull in definitions from process.
 using process::http::Response;
@@ -925,4 +926,5 @@ Result<Credential> Master::Http::authenticate(const Request& request)
 
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/main.cpp
----------------------------------------------------------------------
diff --git a/src/master/main.cpp b/src/master/main.cpp
index 4f5eb55..f202019 100644
--- a/src/master/main.cpp
+++ b/src/master/main.cpp
@@ -67,10 +67,9 @@
 
 #include "zookeeper/detector.hpp"
 
-using namespace mesos;
-using namespace mesos::log;
-using namespace mesos::master;
-using namespace mesos::state;
+using namespace mesos::internal;
+using namespace mesos::internal::log;
+using namespace mesos::internal::master;
 using namespace zookeeper;
 
 using mesos::MasterInfo;
@@ -193,7 +192,7 @@ int main(int argc, char** argv)
 
   allocator::Allocator* allocator = new allocator::HierarchicalDRFAllocator();
 
-  Storage* storage = NULL;
+  state::Storage* storage = NULL;
   Log* log = NULL;
 
   if (flags.registry == "in_memory") {
@@ -201,7 +200,7 @@ int main(int argc, char** argv)
       EXIT(1) << "Cannot use '--registry_strict' when using in-memory storage"
               << " based registry";
     }
-    storage = new InMemoryStorage();
+    storage = new state::InMemoryStorage();
   } else if (flags.registry == "replicated_log" ||
              flags.registry == "log_storage") {
     // TODO(bmahler): "log_storage" is present for backwards
@@ -244,7 +243,7 @@ int main(int argc, char** argv)
           set<UPID>(),
           flags.log_auto_initialize);
     }
-    storage = new LogStorage(log);
+    storage = new state::LogStorage(log);
   } else {
     EXIT(1) << "'" << flags.registry << "' is not a supported"
             << " option for registry persistence";
@@ -252,8 +251,7 @@ int main(int argc, char** argv)
 
   CHECK_NOTNULL(storage);
 
-  mesos::state::protobuf::State* state =
-    new mesos::state::protobuf::State(storage);
+  state::protobuf::State* state = new state::protobuf::State(storage);
   Registrar* registrar = new Registrar(flags, state);
   Repairer* repairer = new Repairer();
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index f10a3cf..57e86ee 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -108,6 +108,7 @@ using process::metrics::Counter;
 using memory::shared_ptr;
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 using allocator::Allocator;
@@ -5063,4 +5064,5 @@ double Master::_resources_percent(const std::string& name)
 }
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/master.hpp
----------------------------------------------------------------------
diff --git a/src/master/master.hpp b/src/master/master.hpp
index a466f92..8c44d6e 100644
--- a/src/master/master.hpp
+++ b/src/master/master.hpp
@@ -67,6 +67,7 @@ class RateLimiter; // Forward declaration.
 }
 
 namespace mesos {
+namespace internal {
 
 // Forward declarations.
 namespace registry {
@@ -1310,6 +1311,7 @@ private:
 };
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {
 
 #endif // __MASTER_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/40b59640/src/master/metrics.cpp
----------------------------------------------------------------------
diff --git a/src/master/metrics.cpp b/src/master/metrics.cpp
index 3ed84e2..14486bf 100644
--- a/src/master/metrics.cpp
+++ b/src/master/metrics.cpp
@@ -22,6 +22,7 @@
 #include "master/metrics.hpp"
 
 namespace mesos {
+namespace internal {
 namespace master {
 
 // Message counters are named with "messages_" prefix so they can
@@ -380,4 +381,5 @@ void Metrics::incrementTasksStates(
 
 
 } // namespace master {
+} // namespace internal {
 } // namespace mesos {


[5/7] mesos git commit: Removed unnecessary 'mesos::' qualifier.

Posted by be...@apache.org.
Removed unnecessary 'mesos::' qualifier.

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


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

Branch: refs/heads/master
Commit: 5ad9128f757df1e2474d94248461583f8b3b8f17
Parents: c07ac62
Author: Benjamin Hindman <be...@gmail.com>
Authored: Sun Feb 22 15:54:55 2015 -0800
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Sun Feb 22 22:00:08 2015 -0800

----------------------------------------------------------------------
 src/module/manager.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5ad9128f/src/module/manager.hpp
----------------------------------------------------------------------
diff --git a/src/module/manager.hpp b/src/module/manager.hpp
index 9e50b40..14acd0a 100644
--- a/src/module/manager.hpp
+++ b/src/module/manager.hpp
@@ -65,7 +65,7 @@ public:
   //
   // NOTE: If loading fails at a particular library we don't unload
   // all of the already loaded libraries.
-  static Try<Nothing> load(const mesos::Modules& modules);
+  static Try<Nothing> load(const Modules& modules);
 
   // create() should be called only after load().
   template <typename T>