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 2014/10/31 23:06:10 UTC
[11/12] git commit: Removed unnecessary parameter.
Removed unnecessary parameter.
Review: https://reviews.apache.org/r/26618
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9c3cd48c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9c3cd48c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9c3cd48c
Branch: refs/heads/master
Commit: 9c3cd48c5c957b170a1de8c82c3fb89de1c366ca
Parents: 4e2daac
Author: Benjamin Hindman <be...@gmail.com>
Authored: Sat Oct 11 14:59:55 2014 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Fri Oct 31 15:05:39 2014 -0700
----------------------------------------------------------------------
src/slave/containerizer/docker.cpp | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/9c3cd48c/src/slave/containerizer/docker.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/docker.cpp b/src/slave/containerizer/docker.cpp
index 8b412a6..57a6066 100644
--- a/src/slave/containerizer/docker.cpp
+++ b/src/slave/containerizer/docker.cpp
@@ -147,12 +147,10 @@ private:
const std::list<Docker::Container>& containers);
process::Future<Nothing> _launch(
- const ContainerID& containerId,
- const std::string& directory);
+ const ContainerID& containerId);
process::Future<Nothing> __launch(
- const ContainerID& containerId,
- const std::string& directory);
+ const ContainerID& containerId);
// NOTE: This continuation is only applicable when launching a
// container for a task.
@@ -883,8 +881,8 @@ Future<bool> DockerContainerizerProcess::launch(
<< "') of framework '" << executorInfo.framework_id() << "'";
return fetch(containerId, taskInfo.command(), directory)
- .then(defer(self(), &Self::_launch, containerId, directory))
- .then(defer(self(), &Self::__launch, containerId, directory))
+ .then(defer(self(), &Self::_launch, containerId))
+ .then(defer(self(), &Self::__launch, containerId))
.then(defer(self(), &Self::___launch, containerId))
.then(defer(self(), &Self::______launch, containerId, lambda::_1))
.onFailed(defer(self(), &Self::destroy, containerId, true));
@@ -892,8 +890,7 @@ Future<bool> DockerContainerizerProcess::launch(
Future<Nothing> DockerContainerizerProcess::_launch(
- const ContainerID& containerId,
- const string& directory)
+ const ContainerID& containerId)
{
// Doing the fetch might have succeded but we were actually asked to
// destroy the container, which we did, so don't continue.
@@ -905,13 +902,12 @@ Future<Nothing> DockerContainerizerProcess::_launch(
container->state = Container::PULLING;
- return pull(containerId, directory, container->image());
+ return pull(containerId, container->directory, container->image());
}
Future<Nothing> DockerContainerizerProcess::__launch(
- const ContainerID& containerId,
- const string& directory)
+ const ContainerID& containerId)
{
if (!containers_.contains(containerId)) {
return Failure("Container was destroyed while pulling image");
@@ -926,7 +922,7 @@ Future<Nothing> DockerContainerizerProcess::__launch(
container->container(),
container->command(),
container->name(),
- directory,
+ container->directory,
flags.docker_sandbox_directory,
// TODO(benh): Figure out the right resources to pass here.
// Apparently when running a container for a task we pass the
@@ -1062,8 +1058,8 @@ Future<bool> DockerContainerizerProcess::launch(
<< "' and framework '" << executorInfo.framework_id() << "'";
return fetch(containerId, executorInfo.command(), directory)
- .then(defer(self(), &Self::_launch, containerId, directory))
- .then(defer(self(), &Self::__launch, containerId, directory))
+ .then(defer(self(), &Self::_launch, containerId))
+ .then(defer(self(), &Self::__launch, containerId))
.then(defer(self(), &Self::____launch, containerId))
.then(defer(self(), &Self::_____launch, containerId, lambda::_1))
.then(defer(self(), &Self::______launch, containerId, lambda::_1))