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 2013/07/02 00:12:00 UTC
[4/4] git commit: Updated routes in Mesos to provide help.
Updated routes in Mesos to provide help.
Review: https://reviews.apache.org/r/12120
Project: http://git-wip-us.apache.org/repos/asf/incubator-mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mesos/commit/977f698d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mesos/tree/977f698d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mesos/diff/977f698d
Branch: refs/heads/master
Commit: 977f698d3d0be7fb4fb004652d224a833760aa69
Parents: 0c38dab
Author: Benjamin Hindman <be...@twitter.com>
Authored: Fri Jun 7 18:20:14 2013 -0700
Committer: Benjamin Hindman <be...@twitter.com>
Committed: Mon Jul 1 18:10:27 2013 -0400
----------------------------------------------------------------------
src/files/files.cpp | 8 ++++----
src/master/master.cpp | 8 ++++----
src/slave/monitor.hpp | 5 +++--
src/slave/slave.cpp | 6 +++---
4 files changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mesos/blob/977f698d/src/files/files.cpp
----------------------------------------------------------------------
diff --git a/src/files/files.cpp b/src/files/files.cpp
index 00591a2..c609505 100644
--- a/src/files/files.cpp
+++ b/src/files/files.cpp
@@ -104,10 +104,10 @@ FilesProcess::FilesProcess()
void FilesProcess::initialize()
{
- route("/browse.json", &FilesProcess::browse);
- route("/read.json", &FilesProcess::read);
- route("/download.json", &FilesProcess::download);
- route("/debug.json", &FilesProcess::debug);
+ route("/browse.json", None(), &FilesProcess::browse);
+ route("/read.json", None(), &FilesProcess::read);
+ route("/download.json", None(), &FilesProcess::download);
+ route("/debug.json", None(), &FilesProcess::debug);
}
http://git-wip-us.apache.org/repos/asf/incubator-mesos/blob/977f698d/src/master/master.cpp
----------------------------------------------------------------------
diff --git a/src/master/master.cpp b/src/master/master.cpp
index cf95101..61dbecd 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -357,10 +357,10 @@ void Master::initialize()
&ExitedExecutorMessage::status);
// Setup HTTP routes.
- route("/redirect", bind(&Http::redirect, http, params::_1));
- route("/vars", bind(&Http::vars, http, params::_1));
- route("/stats.json", bind(&Http::stats, http, params::_1));
- route("/state.json", bind(&Http::state, http, params::_1));
+ route("/redirect", None(), bind(&Http::redirect, http, params::_1));
+ route("/vars", None(), bind(&Http::vars, http, params::_1));
+ route("/stats.json", None(), bind(&Http::stats, http, params::_1));
+ route("/state.json", None(), bind(&Http::state, http, params::_1));
// Provide HTTP assets from a "webui" directory. This is either
// specified via flags (which is necessary for running out of the
http://git-wip-us.apache.org/repos/asf/incubator-mesos/blob/977f698d/src/slave/monitor.hpp
----------------------------------------------------------------------
diff --git a/src/slave/monitor.hpp b/src/slave/monitor.hpp
index e5fdcbd..52568ad 100644
--- a/src/slave/monitor.hpp
+++ b/src/slave/monitor.hpp
@@ -28,6 +28,7 @@
#include <stout/duration.hpp>
#include <stout/hashmap.hpp>
#include <stout/nothing.hpp>
+#include <stout/option.hpp>
#include <stout/try.hpp>
#include "common/type_utils.hpp"
@@ -102,8 +103,8 @@ public:
protected:
virtual void initialize()
{
- route("/statistics.json", &ResourceMonitorProcess::statisticsJSON);
- route("/usage.json", &ResourceMonitorProcess::usage);
+ route("/statistics.json", None(), &ResourceMonitorProcess::statisticsJSON);
+ route("/usage.json", None(), &ResourceMonitorProcess::usage);
}
private:
http://git-wip-us.apache.org/repos/asf/incubator-mesos/blob/977f698d/src/slave/slave.cpp
----------------------------------------------------------------------
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 7271097..9a2c671 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -354,9 +354,9 @@ void Slave::initialize()
install("PING", &Slave::ping);
// Setup HTTP routes.
- route("/vars", bind(&Http::vars, http, params::_1));
- route("/stats.json", bind(&Http::stats, http, params::_1));
- route("/state.json", bind(&Http::state, http, params::_1));
+ route("/vars", None(), bind(&Http::vars, http, params::_1));
+ route("/stats.json", None(), bind(&Http::stats, http, params::_1));
+ route("/state.json", None(), bind(&Http::state, http, params::_1));
if (flags.log_dir.isSome()) {
Try<string> log = logging::getLogFile(google::INFO);