Internal deprecation 2: Moved internal protobufs from mesos::internal to mesos 
namespace.

Changed package definition for protobufs defined in
messages/\{log,messages,state\}.proto and master/registry.proto to
remove "internal".

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


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

Branch: refs/heads/master
Commit: 830f4b3a9f949b43d381e39133eeb2046635cb83
Parents: 7c41857
Author: Kapil Arya <[email protected]>
Authored: Thu Feb 5 14:11:52 2015 -0800
Committer: Niklas Q. Nielsen <[email protected]>
Committed: Thu Feb 5 14:11:52 2015 -0800

----------------------------------------------------------------------
 src/common/parse.hpp              | 4 ++--
 src/common/type_utils.cpp         | 3 ---
 src/common/type_utils.hpp         | 3 ---
 src/log/consensus.hpp             | 2 --
 src/log/leveldb.cpp               | 2 --
 src/log/leveldb.hpp               | 2 --
 src/log/replica.hpp               | 2 --
 src/log/storage.hpp               | 2 --
 src/master/registry.proto         | 2 +-
 src/messages/log.proto            | 2 +-
 src/messages/messages.hpp         | 4 ----
 src/messages/messages.proto       | 4 ++--
 src/messages/state.proto          | 2 +-
 src/state/storage.hpp             | 2 --
 src/tests/rate_limiting_tests.cpp | 2 +-
 src/tests/state_tests.cpp         | 4 ++--
 16 files changed, 10 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/common/parse.hpp
----------------------------------------------------------------------
diff --git a/src/common/parse.hpp b/src/common/parse.hpp
index ae581e5..772a1a5 100644
--- a/src/common/parse.hpp
+++ b/src/common/parse.hpp
@@ -56,7 +56,7 @@ inline Try<mesos::RateLimits> parse(const std::string& value)
 
 
 template<>
-inline Try<mesos::internal::Modules> parse(const std::string& value)
+inline Try<mesos::Modules> parse(const std::string& value)
 {
   // Convert from string or file to JSON.
   Try<JSON::Object> json = parse<JSON::Object>(value);
@@ -65,7 +65,7 @@ inline Try<mesos::internal::Modules> parse(const std::string& 
value)
   }
 
   // Convert from JSON to Protobuf.
-  return protobuf::parse<mesos::internal::Modules>(json.get());
+  return protobuf::parse<mesos::Modules>(json.get());
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/common/type_utils.cpp
----------------------------------------------------------------------
diff --git a/src/common/type_utils.cpp b/src/common/type_utils.cpp
index 890df56..6062e43 100644
--- a/src/common/type_utils.cpp
+++ b/src/common/type_utils.cpp
@@ -155,8 +155,6 @@ bool operator == (const Volume& left, const Volume& right)
 }
 
 
-namespace internal {
-
 bool operator == (const Task& left, const Task& right)
 {
   return left.name() == right.name() &&
@@ -189,5 +187,4 @@ std::ostream& operator << (
     << " of framework " << update.framework_id();
 }
 
-} // namespace internal {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/common/type_utils.hpp
----------------------------------------------------------------------
diff --git a/src/common/type_utils.hpp b/src/common/type_utils.hpp
index b23eeb8..5c24c08 100644
--- a/src/common/type_utils.hpp
+++ b/src/common/type_utils.hpp
@@ -352,8 +352,6 @@ inline std::ostream& operator << (
 }
 
 
-namespace internal {
-
 bool operator == (const Task& left, const Task& right);
 
 
@@ -397,7 +395,6 @@ inline std::ostream& operator << (
 }
 
 } // namespace log {
-} // namespace internal {
 } // namespace mesos {
 
 #endif // __TYPE_UTILS_HPP__

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/log/consensus.hpp
----------------------------------------------------------------------
diff --git a/src/log/consensus.hpp b/src/log/consensus.hpp
index 102a65b..ee9e908 100644
--- a/src/log/consensus.hpp
+++ b/src/log/consensus.hpp
@@ -43,8 +43,6 @@
 namespace mesos {
 namespace log {
 
-using namespace mesos::internal::log;
-
 // Runs the promise phase (a.k.a., the prepare phase) in Paxos. This
 // phase has two purposes. First, the proposer asks promises from a
 // quorum of replicas not to accept writes from proposers with lower

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/log/leveldb.cpp
----------------------------------------------------------------------
diff --git a/src/log/leveldb.cpp b/src/log/leveldb.cpp
index 6441405..1d67942 100644
--- a/src/log/leveldb.cpp
+++ b/src/log/leveldb.cpp
@@ -39,8 +39,6 @@ using std::string;
 namespace mesos {
 namespace log {
 
-using namespace mesos::internal::log;
-
 class Varint64Comparator : public leveldb::Comparator
 {
 public:

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/log/leveldb.hpp
----------------------------------------------------------------------
diff --git a/src/log/leveldb.hpp b/src/log/leveldb.hpp
index 60ea949..8f5df5b 100644
--- a/src/log/leveldb.hpp
+++ b/src/log/leveldb.hpp
@@ -30,8 +30,6 @@
 namespace mesos {
 namespace log {
 
-using namespace mesos::internal::log;
-
 // Concrete implementation of the storage interface using leveldb.
 class LevelDBStorage : public Storage
 {

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/log/replica.hpp
----------------------------------------------------------------------
diff --git a/src/log/replica.hpp b/src/log/replica.hpp
index 7563ecd..b260208 100644
--- a/src/log/replica.hpp
+++ b/src/log/replica.hpp
@@ -35,8 +35,6 @@
 namespace mesos {
 namespace log {
 
-using namespace mesos::internal::log;
-
 namespace protocol {
 
 // Some replica protocol declarations.

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/log/storage.hpp
----------------------------------------------------------------------
diff --git a/src/log/storage.hpp b/src/log/storage.hpp
index 5d238e7..5e81f4e 100644
--- a/src/log/storage.hpp
+++ b/src/log/storage.hpp
@@ -32,8 +32,6 @@
 namespace mesos {
 namespace log {
 
-using namespace mesos::internal::log;
-
 // Abstract interface for reading and writing records.
 class Storage
 {

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

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

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/messages/messages.hpp
----------------------------------------------------------------------
diff --git a/src/messages/messages.hpp b/src/messages/messages.hpp
index ac222ca..77840bc 100644
--- a/src/messages/messages.hpp
+++ b/src/messages/messages.hpp
@@ -30,10 +30,6 @@
 
 #include "messages/messages.pb.h"
 
-// TODO(karya): We should remove this once the internal protobufs are
-// moved from mesos::internal to mesos namespace.
-using namespace mesos::internal;
-
 namespace messages {
 
 template <typename T>

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/messages/messages.proto
----------------------------------------------------------------------
diff --git a/src/messages/messages.proto b/src/messages/messages.proto
index 8d86517..44122bd 100644
--- a/src/messages/messages.proto
+++ b/src/messages/messages.proto
@@ -18,12 +18,12 @@
 
 import "mesos/mesos.proto";
 
-package mesos.internal;
+package mesos;
 
 // TODO(benh): Provide comments for each of these messages. Also,
 // consider splitting these messages into different "packages" which
 // represent which messages get handled by which components (e.g., the
-// "mesos.internal.executor" package includes messages that the
+// "mesos.executor" package includes messages that the
 // executor handles).
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/messages/state.proto
----------------------------------------------------------------------
diff --git a/src/messages/state.proto b/src/messages/state.proto
index 15071c2..7fc4883 100644
--- a/src/messages/state.proto
+++ b/src/messages/state.proto
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package mesos.internal.state;
+package mesos.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/830f4b3a/src/state/storage.hpp
----------------------------------------------------------------------
diff --git a/src/state/storage.hpp b/src/state/storage.hpp
index 190c7a3..f5cd607 100644
--- a/src/state/storage.hpp
+++ b/src/state/storage.hpp
@@ -32,8 +32,6 @@
 namespace mesos {
 namespace state {
 
-using namespace mesos::internal::state;
-
 class Storage
 {
 public:

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/tests/rate_limiting_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/rate_limiting_tests.cpp 
b/src/tests/rate_limiting_tests.cpp
index 34c2267..8b55bff 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.internal.RegisterFrameworkMessage dropped: capacity(2) "
+      "Message mesos.RegisterFrameworkMessage dropped: capacity(2) "
       "exceeded"))
     .WillOnce(FutureSatisfy(&error));
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/830f4b3a/src/tests/state_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/state_tests.cpp b/src/tests/state_tests.cpp
index 541feca..4a216e6 100644
--- a/src/tests/state_tests.cpp
+++ b/src/tests/state_tests.cpp
@@ -84,8 +84,8 @@ using std::vector;
 
 using mesos::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)
 {

Reply via email to