You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/08/24 16:32:33 UTC

[2/2] mesos git commit: Removed unnecessary statements in `CgroupsIsolatorProcess::_watch`.

Removed unnecessary statements in `CgroupsIsolatorProcess::_watch`.

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


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

Branch: refs/heads/master
Commit: db4c8a0e9eaf27f3e2d42a620a5e612863cbf9ea
Parents: 3214584
Author: haosdent huang <ha...@gmail.com>
Authored: Wed Aug 24 09:32:24 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Aug 24 09:32:24 2016 -0700

----------------------------------------------------------------------
 src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/db4c8a0e/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp b/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
index ed9cff2..ae5d49f 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
@@ -546,13 +546,7 @@ void CgroupsIsolatorProcess::_watch(
 
   CHECK(!future.isPending());
 
-  if (future.isReady()) {
-    infos[containerId]->limitation.set(future.get());
-  } else if (future.isFailed()) {
-    infos[containerId]->limitation.fail(future.failure());
-  } else {
-    infos[containerId]->limitation.discard();
-  }
+  infos[containerId]->limitation.set(future);
 }