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/07/27 22:52:52 UTC

mesos git commit: Implemented `CgroupsIsolatorProcess::update`.

Repository: mesos
Updated Branches:
  refs/heads/master 43886b946 -> b464fdf74


Implemented `CgroupsIsolatorProcess::update`.

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


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

Branch: refs/heads/master
Commit: b464fdf7454f733fe81ade4f8854c4cee03cde69
Parents: 43886b9
Author: haosdent huang <ha...@gmail.com>
Authored: Wed Jul 27 15:49:27 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Jul 27 15:51:55 2016 -0700

----------------------------------------------------------------------
 .../containerizer/mesos/isolators/cgroups/cgroups.cpp    | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/b464fdf7/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 9933cb0..d99d14b 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp
@@ -267,7 +267,16 @@ Future<Nothing> CgroupsIsolatorProcess::update(
     const ContainerID& containerId,
     const Resources& resources)
 {
-  return Failure("Not implemented.");
+  if (!infos.contains(containerId)) {
+    return Failure("Unknown container");
+  }
+
+  list<Future<Nothing>> updates;
+  foreachvalue (const Owned<Subsystem>& subsystem, subsystems) {
+    updates.push_back(subsystem->update(containerId, resources));
+  }
+
+  return collect(updates).then([]() { return Nothing(); });
 }