You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2015/06/05 00:10:17 UTC
mesos git commit: Added help for slave's state endpoint.
Repository: mesos
Updated Branches:
refs/heads/master 5706b76c9 -> cca1972ac
Added help for slave's state endpoint.
Review: https://reviews.apache.org/r/35064
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cca1972a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/cca1972a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/cca1972a
Branch: refs/heads/master
Commit: cca1972ac02a68bc6364795369bcc7e4e9015001
Parents: 5706b76
Author: Aditi Dixit <ad...@gmail.com>
Authored: Thu Jun 4 15:09:39 2015 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Thu Jun 4 15:09:40 2015 -0700
----------------------------------------------------------------------
src/slave/http.cpp | 10 ++++++++++
src/slave/slave.cpp | 2 +-
src/slave/slave.hpp | 1 +
3 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/cca1972a/src/slave/http.cpp
----------------------------------------------------------------------
diff --git a/src/slave/http.cpp b/src/slave/http.cpp
index b5e77b0..bc25bdd 100644
--- a/src/slave/http.cpp
+++ b/src/slave/http.cpp
@@ -261,6 +261,16 @@ Future<Response> Slave::Http::health(const Request& request) const
}
+const string Slave::Http::STATE_HELP = HELP(
+ TLDR(
+ "Information about state of the Slave."),
+ USAGE(
+ "/state.json"),
+ DESCRIPTION(
+ "This endpoint shows information about the frameworks, executors",
+ "and the slave's master as a JSON object."));
+
+
Future<Response> Slave::Http::state(const Request& request) const
{
JSON::Object object;
http://git-wip-us.apache.org/repos/asf/mesos/blob/cca1972a/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 30e0d8b..1b7a24a 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -486,7 +486,7 @@ void Slave::initialize()
return http.health(request);
});
route("/state.json",
- None(),
+ Http::STATE_HELP,
[http](const http::Request& request) {
Http::log(request);
return http.state(request);
http://git-wip-us.apache.org/repos/asf/mesos/blob/cca1972a/src/slave/slave.hpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.hpp b/src/slave/slave.hpp
index 37e85af..291f086 100644
--- a/src/slave/slave.hpp
+++ b/src/slave/slave.hpp
@@ -389,6 +389,7 @@ private:
const process::http::Request& request) const;
static const std::string HEALTH_HELP;
+ static const std::string STATE_HELP;
private:
Slave* slave;