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/02/10 18:06:52 UTC

[2/3] mesos git commit: Exposed `ContainerStatus` in `state.json`.

Exposed `ContainerStatus` in `state.json`.

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


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

Branch: refs/heads/master
Commit: d6a68ada7bbf617f7608a76b6a89d59a47da926b
Parents: 38166b5
Author: Avinash sridharan <av...@mesosphere.io>
Authored: Wed Feb 10 08:50:16 2016 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Wed Feb 10 09:06:46 2016 -0800

----------------------------------------------------------------------
 src/common/http.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d6a68ada/src/common/http.cpp
----------------------------------------------------------------------
diff --git a/src/common/http.cpp b/src/common/http.cpp
index a56c3f1..f8a0441 100644
--- a/src/common/http.cpp
+++ b/src/common/http.cpp
@@ -220,6 +220,10 @@ JSON::Object model(const ContainerStatus& status)
     object.values["network_infos"] = std::move(array);
   }
 
+  if (status.has_cgroup_info()) {
+    object.values["cgroup_info"] = JSON::protobuf(status.cgroup_info());
+  }
+
   return object;
 }
 
@@ -478,6 +482,10 @@ void json(JSON::ObjectWriter* writer, const ContainerStatus& status)
   if (status.network_infos().size() > 0) {
     writer->field("network_infos", status.network_infos());
   }
+
+  if (status.has_cgroup_info()) {
+    writer->field("cgroup_info", status.cgroup_info());
+  }
 }