You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2016/08/10 18:28:53 UTC

[1/5] mesos git commit: Removed the redundant `mesos::` namespace prefix + minor style fixes.

Repository: mesos
Updated Branches:
  refs/heads/master 0d3793e94 -> 5a17f4044


Removed the redundant `mesos::` namespace prefix + minor style fixes.

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


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

Branch: refs/heads/master
Commit: 4175806cefcbdfea6ba8652b44b1a5c492cefd85
Parents: 0d3793e
Author: Anand Mazumdar <an...@apache.org>
Authored: Wed Aug 10 11:03:46 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Wed Aug 10 11:03:46 2016 -0700

----------------------------------------------------------------------
 src/internal/evolve.cpp | 24 ++++++++++++++----------
 src/internal/evolve.hpp |  6 +++---
 2 files changed, 17 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4175806c/src/internal/evolve.cpp
----------------------------------------------------------------------
diff --git a/src/internal/evolve.cpp b/src/internal/evolve.cpp
index 64818cc..5f92188 100644
--- a/src/internal/evolve.cpp
+++ b/src/internal/evolve.cpp
@@ -380,7 +380,7 @@ v1::scheduler::Event evolve(const FrameworkErrorMessage& message)
 }
 
 
-v1::executor::Event evolve(const mesos::executor::Event& event)
+v1::executor::Event evolve(const executor::Event& event)
 {
   return evolve<v1::executor::Event>(event);
 }
@@ -615,39 +615,43 @@ v1::agent::Response evolve<v1::agent::Response::GET_CONTAINERS>(
 
     Result<JSON::String> container_id =
       object.find<JSON::String>("container_id");
+
     CHECK_SOME(container_id);
     container->mutable_container_id()->set_value(container_id.get().value);
 
     Result<JSON::String> framework_id =
       object.find<JSON::String>("framework_id");
+
     CHECK_SOME(framework_id);
     container->mutable_framework_id()->set_value(framework_id.get().value);
 
-    Result<JSON::String> executor_id =
-      object.find<JSON::String>("executor_id");
+    Result<JSON::String> executor_id = object.find<JSON::String>("executor_id");
+
     CHECK_SOME(executor_id);
     container->mutable_executor_id()->set_value(executor_id.get().value);
 
     Result<JSON::String> executor_name =
       object.find<JSON::String>("executor_name");
+
     CHECK_SOME(executor_name);
     container->set_executor_name(executor_name.get().value);
 
-    Result<JSON::Object> container_status =
-      object.find<JSON::Object>("status");
+    Result<JSON::Object> container_status = object.find<JSON::Object>("status");
     if (container_status.isSome()) {
-      Try<mesos::v1::ContainerStatus> status =
-        protobuf::parse<mesos::v1::ContainerStatus>(container_status.get());
+      Try<v1::ContainerStatus> status =
+        protobuf::parse<v1::ContainerStatus>(container_status.get());
+
       CHECK_SOME(status);
       container->mutable_container_status()->CopyFrom(status.get());
     }
 
     Result<JSON::Object> resource_statistics =
       object.find<JSON::Object>("statistics");
+
     if (resource_statistics.isSome()) {
-      Try<mesos::v1::ResourceStatistics> statistics =
-        protobuf::parse<mesos::v1::ResourceStatistics>(
-            resource_statistics.get());
+      Try<v1::ResourceStatistics> statistics =
+        protobuf::parse<v1::ResourceStatistics>(resource_statistics.get());
+
       CHECK_SOME(statistics);
       container->mutable_resource_statistics()->CopyFrom(statistics.get());
     }

http://git-wip-us.apache.org/repos/asf/mesos/blob/4175806c/src/internal/evolve.hpp
----------------------------------------------------------------------
diff --git a/src/internal/evolve.hpp b/src/internal/evolve.hpp
index 1e2d49b..8b340a9 100644
--- a/src/internal/evolve.hpp
+++ b/src/internal/evolve.hpp
@@ -112,7 +112,7 @@ v1::scheduler::Event evolve(const ExecutorToFrameworkMessage& message);
 v1::scheduler::Event evolve(const FrameworkErrorMessage& message);
 
 
-v1::executor::Event evolve(const mesos::executor::Event& event);
+v1::executor::Event evolve(const executor::Event& event);
 
 
 // Helper functions that evolve old style internal messages to a
@@ -143,8 +143,8 @@ v1::master::Response evolve(const JSON::Object& object);
 
 // Helper functions that evolve old style internal messages to a
 // v1::master::Response.
-v1::master::Response evolve(const mesos::maintenance::ClusterStatus& status);
-v1::master::Response evolve(const mesos::maintenance::Schedule& schedule);
+v1::master::Response evolve(const maintenance::ClusterStatus& status);
+v1::master::Response evolve(const maintenance::Schedule& schedule);
 
 
 // Declaration of helper functions for evolving JSON objects used in agent's


[2/5] mesos git commit: Added helpers evolve/devolve functions for executor calls/events.

Posted by an...@apache.org.
Added helpers evolve/devolve functions for executor calls/events.

This change adds a couple of missing evolve/devolve helpers that
we would be needing for making the existing command executor
unversioned.

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


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

Branch: refs/heads/master
Commit: 7070d1e1b79113eca5ad3e28132dabb0df07e33d
Parents: 4175806
Author: Anand Mazumdar <an...@apache.org>
Authored: Wed Aug 10 11:03:52 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Wed Aug 10 11:03:52 2016 -0700

----------------------------------------------------------------------
 src/internal/devolve.cpp | 6 ++++++
 src/internal/devolve.hpp | 1 +
 src/internal/evolve.cpp  | 6 ++++++
 src/internal/evolve.hpp  | 2 +-
 4 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7070d1e1/src/internal/devolve.cpp
----------------------------------------------------------------------
diff --git a/src/internal/devolve.cpp b/src/internal/devolve.cpp
index a2ad464..4597325 100644
--- a/src/internal/devolve.cpp
+++ b/src/internal/devolve.cpp
@@ -139,6 +139,12 @@ executor::Call devolve(const v1::executor::Call& call)
 }
 
 
+executor::Event devolve(const v1::executor::Event& event)
+{
+  return devolve<executor::Event>(event);
+}
+
+
 scheduler::Call devolve(const v1::scheduler::Call& call)
 {
   return devolve<scheduler::Call>(call);

http://git-wip-us.apache.org/repos/asf/mesos/blob/7070d1e1/src/internal/devolve.hpp
----------------------------------------------------------------------
diff --git a/src/internal/devolve.hpp b/src/internal/devolve.hpp
index 3812fd6..90681eb 100644
--- a/src/internal/devolve.hpp
+++ b/src/internal/devolve.hpp
@@ -62,6 +62,7 @@ scheduler::Call devolve(const v1::scheduler::Call& call);
 scheduler::Event devolve(const v1::scheduler::Event& event);
 
 executor::Call devolve(const v1::executor::Call& call);
+executor::Event devolve(const v1::executor::Event& event);
 
 mesos::agent::Call devolve(const v1::agent::Call& call);
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/7070d1e1/src/internal/evolve.cpp
----------------------------------------------------------------------
diff --git a/src/internal/evolve.cpp b/src/internal/evolve.cpp
index 5f92188..0f20459 100644
--- a/src/internal/evolve.cpp
+++ b/src/internal/evolve.cpp
@@ -380,6 +380,12 @@ v1::scheduler::Event evolve(const FrameworkErrorMessage& message)
 }
 
 
+v1::executor::Call evolve(const executor::Call& call)
+{
+  return evolve<v1::executor::Call>(call);
+}
+
+
 v1::executor::Event evolve(const executor::Event& event)
 {
   return evolve<v1::executor::Event>(event);

http://git-wip-us.apache.org/repos/asf/mesos/blob/7070d1e1/src/internal/evolve.hpp
----------------------------------------------------------------------
diff --git a/src/internal/evolve.hpp b/src/internal/evolve.hpp
index 8b340a9..52a1302 100644
--- a/src/internal/evolve.hpp
+++ b/src/internal/evolve.hpp
@@ -111,7 +111,7 @@ v1::scheduler::Event evolve(const ExitedExecutorMessage& message);
 v1::scheduler::Event evolve(const ExecutorToFrameworkMessage& message);
 v1::scheduler::Event evolve(const FrameworkErrorMessage& message);
 
-
+v1::executor::Call evolve(const executor::Call& call);
 v1::executor::Event evolve(const executor::Event& event);
 
 


[4/5] mesos git commit: Removed a no longer valid comment.

Posted by an...@apache.org.
Removed a no longer valid comment.

After moving the existing command executor to the unversioned
namespace, we won't be needing support for versioned health
check messages anytime soon. This comment was written when
we were using the `v1` messages for the command executor.

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


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

Branch: refs/heads/master
Commit: 00709d0dbb71d61242b902d3d324fa2dd5f12adc
Parents: 64842e4
Author: Anand Mazumdar <an...@apache.org>
Authored: Wed Aug 10 11:04:13 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Wed Aug 10 11:04:13 2016 -0700

----------------------------------------------------------------------
 src/launcher/executor.cpp | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/00709d0d/src/launcher/executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/executor.cpp b/src/launcher/executor.cpp
index 0e23d4f..1dfe9a4 100644
--- a/src/launcher/executor.cpp
+++ b/src/launcher/executor.cpp
@@ -237,9 +237,6 @@ public:
 protected:
   virtual void initialize()
   {
-    // TODO(qianzhang): Currently, the `mesos-health-check` binary can only
-    // send unversioned `TaskHealthStatus` messages. This needs to be revisited
-    // as part of MESOS-5103.
     install<TaskHealthStatus>(
         &CommandExecutor::taskHealthUpdated,
         &TaskHealthStatus::task_id,


[5/5] mesos git commit: Minor cleanups to the command executor.

Posted by an...@apache.org.
Minor cleanups to the command executor.

This change does a few minor cleanups:
- Renamed `taskID` -> `taskId`
- Renamed `taskId` argument to `_taskId` to avoid confusion
with the member variable `taskId`.

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


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

Branch: refs/heads/master
Commit: 5a17f4044914838363bdd26215d61ba3781d5ddc
Parents: 00709d0
Author: Anand Mazumdar <an...@apache.org>
Authored: Wed Aug 10 11:04:18 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Wed Aug 10 11:04:18 2016 -0700

----------------------------------------------------------------------
 src/launcher/executor.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5a17f404/src/launcher/executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/executor.cpp b/src/launcher/executor.cpp
index 1dfe9a4..7967684 100644
--- a/src/launcher/executor.cpp
+++ b/src/launcher/executor.cpp
@@ -276,18 +276,18 @@ protected:
   }
 
   void taskHealthUpdated(
-      const TaskID& taskID,
+      const TaskID& _taskId,
       const bool healthy,
       const bool initiateTaskKill)
   {
     cout << "Received task health update, healthy: "
          << stringify(healthy) << endl;
 
-    update(taskID, TASK_RUNNING, healthy);
+    update(_taskId, TASK_RUNNING, healthy);
 
     if (initiateTaskKill) {
       killedByHealthCheck = true;
-      kill(taskID);
+      kill(_taskId);
     }
   }
 
@@ -440,7 +440,7 @@ protected:
     launched = true;
   }
 
-  void kill(const TaskID& taskId, const Option<KillPolicy>& override = None())
+  void kill(const TaskID& _taskId, const Option<KillPolicy>& override = None())
   {
     // Default grace period is set to 3s for backwards compatibility.
     //
@@ -456,10 +456,10 @@ protected:
       gracePeriod = Nanoseconds(killPolicy->grace_period().nanoseconds());
     }
 
-    cout << "Received kill for task " << taskId.value()
+    cout << "Received kill for task " << _taskId.value()
          << " with grace period of " << gracePeriod << endl;
 
-    kill(taskId, gracePeriod);
+    kill(_taskId, gracePeriod);
   }
 
   void shutdown()
@@ -672,7 +672,7 @@ private:
   }
 
   void update(
-      const TaskID& taskID,
+      const TaskID& _taskId,
       const TaskState& state,
       const Option<bool>& healthy = None(),
       const Option<string>& message = None())
@@ -680,7 +680,7 @@ private:
     UUID uuid = UUID::random();
 
     TaskStatus status;
-    status.mutable_task_id()->CopyFrom(taskID);
+    status.mutable_task_id()->CopyFrom(_taskId);
     status.mutable_executor_id()->CopyFrom(executorId);
 
     status.set_state(state);


[3/5] mesos git commit: Made the command executor use the unversioned protobufs internally.

Posted by an...@apache.org.
Made the command executor use the unversioned protobufs internally.

Currently, the existing command executor was in the `v1` namespace
and used the v1 protobufs. This change addresses that and moves the
code to the `mesos::internal` namespace.

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


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

Branch: refs/heads/master
Commit: 64842e4cdc24900f586f87bb645b6d6d88da4804
Parents: 7070d1e
Author: Anand Mazumdar <an...@apache.org>
Authored: Wed Aug 10 11:04:02 2016 -0700
Committer: Anand Mazumdar <an...@apache.org>
Committed: Wed Aug 10 11:04:02 2016 -0700

----------------------------------------------------------------------
 src/launcher/executor.cpp       | 180 +++++++++++++++++------------------
 src/launcher/posix/executor.cpp |   9 +-
 src/launcher/posix/executor.hpp |   6 +-
 3 files changed, 91 insertions(+), 104 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/64842e4c/src/launcher/executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/executor.cpp b/src/launcher/executor.cpp
index 52d20af..0e23d4f 100644
--- a/src/launcher/executor.cpp
+++ b/src/launcher/executor.cpp
@@ -28,9 +28,6 @@
 
 #include <mesos/mesos.hpp>
 
-#include <mesos/v1/executor.hpp>
-#include <mesos/v1/mesos.hpp>
-
 #include <mesos/type_utils.hpp>
 
 #include <process/clock.hpp>
@@ -110,25 +107,14 @@ using process::Subprocess;
 using process::Time;
 using process::Timer;
 
-using mesos::internal::devolve;
-using mesos::internal::evolve;
-using mesos::internal::HealthChecker;
-using mesos::internal::TaskHealthStatus;
-
-using mesos::internal::protobuf::frameworkHasCapability;
+using mesos::executor::Call;
+using mesos::executor::Event;
 
-using mesos::v1::ExecutorID;
-using mesos::v1::FrameworkID;
-
-using mesos::v1::executor::Call;
-using mesos::v1::executor::Event;
 using mesos::v1::executor::Mesos;
 using mesos::v1::executor::MesosBase;
 using mesos::v1::executor::V0ToV1Adapter;
 
-
 namespace mesos {
-namespace v1 {
 namespace internal {
 
 class CommandExecutor: public ProtobufProcess<CommandExecutor>
@@ -190,65 +176,60 @@ public:
     state = DISCONNECTED;
   }
 
-  void received(queue<Event> events)
+  void received(const Event& event)
   {
-    while (!events.empty()) {
-      Event event = events.front();
-      events.pop();
-
-      cout << "Received " << event.type() << " event" << endl;
-
-      switch (event.type()) {
-        case Event::SUBSCRIBED: {
-          cout << "Subscribed executor on "
-               << event.subscribed().agent_info().hostname() << endl;
-
-          frameworkInfo = event.subscribed().framework_info();
-          state = SUBSCRIBED;
-          break;
-        }
-
-        case Event::LAUNCH: {
-          launch(event.launch().task());
-          break;
-        }
-
-        case Event::KILL: {
-          Option<KillPolicy> override = event.kill().has_kill_policy()
-            ? Option<KillPolicy>(event.kill().kill_policy())
-            : None();
-
-          kill(event.kill().task_id(), override);
-          break;
-        }
-
-        case Event::ACKNOWLEDGED: {
-          // Remove the corresponding update.
-          updates.erase(UUID::fromBytes(event.acknowledged().uuid()).get());
-
-          // Remove the corresponding task.
-          task = None();
-          break;
-        }
-
-        case Event::SHUTDOWN: {
-          shutdown();
-          break;
-        }
-
-        case Event::MESSAGE: {
-          break;
-        }
-
-        case Event::ERROR: {
-          cerr << "Error: " << event.error().message() << endl;
-          break;
-        }
-
-        case Event::UNKNOWN: {
-          LOG(WARNING) << "Received an UNKNOWN event and ignored";
-          break;
-        }
+    cout << "Received " << event.type() << " event" << endl;
+
+    switch (event.type()) {
+      case Event::SUBSCRIBED: {
+        cout << "Subscribed executor on "
+             << event.subscribed().slave_info().hostname() << endl;
+
+        frameworkInfo = event.subscribed().framework_info();
+        state = SUBSCRIBED;
+        break;
+      }
+
+      case Event::LAUNCH: {
+        launch(event.launch().task());
+        break;
+      }
+
+      case Event::KILL: {
+        Option<KillPolicy> override = event.kill().has_kill_policy()
+          ? Option<KillPolicy>(event.kill().kill_policy())
+          : None();
+
+        kill(event.kill().task_id(), override);
+        break;
+      }
+
+      case Event::ACKNOWLEDGED: {
+        // Remove the corresponding update.
+        updates.erase(UUID::fromBytes(event.acknowledged().uuid()).get());
+
+        // Remove the corresponding task.
+        task = None();
+        break;
+      }
+
+      case Event::SHUTDOWN: {
+        shutdown();
+        break;
+      }
+
+      case Event::MESSAGE: {
+        break;
+      }
+
+      case Event::ERROR: {
+        cerr << "Error: " << event.error().message() << endl;
+        break;
+      }
+
+      case Event::UNKNOWN: {
+        LOG(WARNING) << "Received an UNKNOWN event and ignored";
+        break;
       }
     }
   }
@@ -271,31 +252,45 @@ protected:
     // after the process has spawned.
     if (value.isSome() && value.get() == "1") {
       mesos.reset(new Mesos(
-          mesos::ContentType::PROTOBUF,
+          ContentType::PROTOBUF,
           defer(self(), &Self::connected),
           defer(self(), &Self::disconnected),
-          defer(self(), &Self::received, lambda::_1)));
+          defer(self(), [this](queue<v1::executor::Event> events) {
+            while(!events.empty()) {
+              const v1::executor::Event& event = events.front();
+              received(devolve(event));
+
+              events.pop();
+            }
+          })));
     } else {
       mesos.reset(new V0ToV1Adapter(
           defer(self(), &Self::connected),
           defer(self(), &Self::disconnected),
-          defer(self(), &Self::received, lambda::_1)));
+          defer(self(), [this](queue<v1::executor::Event> events) {
+            while(!events.empty()) {
+              const v1::executor::Event& event = events.front();
+              received(devolve(event));
+
+              events.pop();
+            }
+          })));
     }
   }
 
   void taskHealthUpdated(
-      const mesos::TaskID& taskID,
+      const TaskID& taskID,
       const bool healthy,
       const bool initiateTaskKill)
   {
     cout << "Received task health update, healthy: "
          << stringify(healthy) << endl;
 
-    update(evolve(taskID), TASK_RUNNING, healthy);
+    update(taskID, TASK_RUNNING, healthy);
 
     if (initiateTaskKill) {
       killedByHealthCheck = true;
-      kill(evolve(taskID));
+      kill(taskID);
     }
   }
 
@@ -323,7 +318,7 @@ protected:
       subscribe->add_unacknowledged_tasks()->MergeFrom(task.get());
     }
 
-    mesos->send(call);
+    mesos->send(evolve(call));
 
     delay(Seconds(1), self(), &Self::doReliableRegistration);
   }
@@ -362,7 +357,7 @@ protected:
         ABORT("Failed to parse JSON: " + object.error());
       }
 
-      Try<CommandInfo> parse = protobuf::parse<CommandInfo>(object.get());
+      Try<CommandInfo> parse = ::protobuf::parse<CommandInfo>(object.get());
       if (parse.isError()) {
         ABORT("Failed to parse protobuf: " + parse.error());
       }
@@ -418,9 +413,9 @@ protected:
 
     if (task->has_health_check()) {
       Try<Owned<HealthChecker>> _checker = HealthChecker::create(
-          devolve(task->health_check()),
+          task->health_check(),
           self(),
-          devolve(task->task_id()));
+          task->task_id());
 
       if (_checker.isError()) {
         // TODO(gilbert): Consider ABORT and return a TASK_FAILED here.
@@ -559,9 +554,9 @@ private:
       CHECK_SOME(taskId);
       CHECK(taskId.get() == _taskId);
 
-      if (frameworkHasCapability(
-              devolve(frameworkInfo.get()),
-              mesos::FrameworkInfo::Capability::TASK_KILLING_STATE)) {
+      if (protobuf::frameworkHasCapability(
+              frameworkInfo.get(),
+              FrameworkInfo::Capability::TASK_KILLING_STATE)) {
         update(taskId.get(), TASK_KILLING);
       }
 
@@ -714,7 +709,7 @@ private:
     // Capture the status update.
     updates[uuid] = call.update();
 
-    mesos->send(call);
+    mesos->send(evolve(call));
   }
 
   enum State
@@ -757,7 +752,6 @@ private:
 };
 
 } // namespace internal {
-} // namespace v1 {
 } // namespace mesos {
 
 
@@ -811,8 +805,8 @@ public:
 int main(int argc, char** argv)
 {
   Flags flags;
-  FrameworkID frameworkId;
-  ExecutorID executorId;
+  mesos::FrameworkID frameworkId;
+  mesos::ExecutorID executorId;
 
 #ifdef __WINDOWS__
   process::Winsock winsock;
@@ -869,8 +863,8 @@ int main(int argc, char** argv)
     shutdownGracePeriod = parse.get();
   }
 
-  Owned<mesos::v1::internal::CommandExecutor> executor(
-      new mesos::v1::internal::CommandExecutor(
+  Owned<mesos::internal::CommandExecutor> executor(
+      new mesos::internal::CommandExecutor(
           flags.launcher_dir,
           flags.rootfs,
           flags.sandbox_directory,

http://git-wip-us.apache.org/repos/asf/mesos/blob/64842e4c/src/launcher/posix/executor.cpp
----------------------------------------------------------------------
diff --git a/src/launcher/posix/executor.cpp b/src/launcher/posix/executor.cpp
index 6814b9f..43573ca 100644
--- a/src/launcher/posix/executor.cpp
+++ b/src/launcher/posix/executor.cpp
@@ -24,8 +24,6 @@
 
 #include <stout/os/raw/argv.hpp>
 
-#include "internal/devolve.hpp"
-
 #include "launcher/posix/executor.hpp"
 
 #ifdef __linux__
@@ -48,16 +46,14 @@ using std::endl;
 using std::string;
 using std::vector;
 
-using mesos::internal::devolve;
 using mesos::internal::slave::MESOS_CONTAINERIZER;
 using mesos::internal::slave::MesosContainerizerLaunch;
 
 namespace mesos {
-namespace v1 {
 namespace internal {
 
 pid_t launchTaskPosix(
-    const mesos::v1::CommandInfo& command,
+    const CommandInfo& command,
     const string& launcherDir,
     const Option<string>& user,
     const Option<string>& rootfs,
@@ -85,7 +81,7 @@ pid_t launchTaskPosix(
   // Prepare the flags to pass to the launch process.
   MesosContainerizerLaunch::Flags launchFlags;
 
-  launchFlags.command = JSON::protobuf(devolve(command));
+  launchFlags.command = JSON::protobuf(command);
 
   if (rootfs.isSome()) {
     CHECK_SOME(sandboxDirectory);
@@ -127,5 +123,4 @@ pid_t launchTaskPosix(
 }
 
 } // namespace internal {
-} // namespace v1 {
 } // namespace mesos {

http://git-wip-us.apache.org/repos/asf/mesos/blob/64842e4c/src/launcher/posix/executor.hpp
----------------------------------------------------------------------
diff --git a/src/launcher/posix/executor.hpp b/src/launcher/posix/executor.hpp
index a508089..9e46726 100644
--- a/src/launcher/posix/executor.hpp
+++ b/src/launcher/posix/executor.hpp
@@ -19,16 +19,15 @@
 
 #include <string>
 
-#include <mesos/v1/mesos.hpp>
+#include <mesos/mesos.hpp>
 
 #include <stout/option.hpp>
 
 namespace mesos {
-namespace v1 {
 namespace internal {
 
 pid_t launchTaskPosix(
-    const mesos::v1::CommandInfo& command,
+    const CommandInfo& command,
     const std::string& launcherDir,
     const Option<std::string>& user,
     const Option<std::string>& rootfs,
@@ -36,7 +35,6 @@ pid_t launchTaskPosix(
     const Option<std::string>& workingDirectory);
 
 } // namespace internal {
-} // namespace v1 {
 } // namespace mesos {
 
 #endif // __LAUNCHER_POSIX_EXECUTOR_HPP__