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:38 UTC

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

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 {