GraphLab: Distributed Graph-Parallel API
2.1
|
Typedefs | |
typedef boost::function < std::pair< std::string, std::string >std::map < std::string, std::string > &)> | graphlab::http_redirect_callback_type |
Functions | |
void | graphlab::add_metric_server_callback (std::string page, http_redirect_callback_type callback) |
This is used to map a URL on the mtrics server to a processing function. | |
void | graphlab::launch_metric_server () |
Starts the metrics reporting server. | |
void | graphlab::stop_metric_server () |
Stops the metrics reporting server if one is started. | |
void | graphlab::stop_metric_server_on_eof () |
Waits for a ctrl-D on machine 0, and stops the metrics reporting server if one is started. |
typedef boost::function<std::pair<std::string, std::string>std::map<std::string, std::string>&)> graphlab::http_redirect_callback_type |
The callback type used for add_metric_server_callback() See add_metric_server_callback() for details.
Definition at line 42 of file metrics_server.hpp.
void graphlab::add_metric_server_callback | ( | std::string | page, |
http_redirect_callback_type | callback | ||
) |
This is used to map a URL on the mtrics server to a processing function.
The processing function must have the prototype
The processing function takes a map of GET variables to their corresponding values, and returns a pair of strings. (content_type, content)
content
type is the http content_type header. For instance text/plain or text/html. content
is the actual bodyFor instance: The builtin 404 handler looks like this:
page | The page to map. For instance page = "a.html" will be shown on http://[server]/a.html |
callback | The callback function to use to process the page |
Definition at line 198 of file metrics_server.cpp.
void graphlab::launch_metric_server | ( | ) |
Starts the metrics reporting server.
The function may be called by all machines simultaneously since it only does useful work on machine 0. Only machine 0 will launch the web server.
Definition at line 205 of file metrics_server.cpp.
void graphlab::stop_metric_server | ( | ) |
Stops the metrics reporting server if one is started.
The function may be called by all machines simultaneously since it only does useful work on machine 0.
Definition at line 224 of file metrics_server.cpp.
void graphlab::stop_metric_server_on_eof | ( | ) |
Waits for a ctrl-D on machine 0, and stops the metrics reporting server if one is started.
The function may be called by all machines simultaneously since it only does useful work on machine 0. It waits for the stdin stream to close (when the user hit ctrl-d), then shuts down the server.
Definition at line 231 of file metrics_server.cpp.