public class TaskManagerMetricsHandler extends AbstractMetricsHandler
If the query parameters do not contain a "get" parameter the list of all metrics is returned.
{"available": [ { "name" : "X", "id" : "X" } ] }
If the query parameters do contain a "get" parameter, a comma-separated list of metric names is expected as a value.
/metrics?get=X,Y
The handler will then return a list containing the values of the requested metrics.
[ { "id" : "X", "value" : "S" }, { "id" : "Y", "value" : "T" } ]
PARAMETER_METRICSexecutor| Constructor and Description |
|---|
TaskManagerMetricsHandler(Executor executor,
MetricFetcher fetcher) |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,String> |
getMapFor(Map<String,String> pathParams,
MetricStore metrics)
Returns a Map containing the metrics belonging to the entity pointed to by the path parameters.
|
String[] |
getPaths()
Returns an array of REST URL's under which this handler can be registered.
|
handleJsonRequesthandleRequestpublic TaskManagerMetricsHandler(Executor executor, MetricFetcher fetcher)
public String[] getPaths()
RequestHandlerprotected Map<String,String> getMapFor(Map<String,String> pathParams, MetricStore metrics)
AbstractMetricsHandlergetMapFor in class AbstractMetricsHandlerpathParams - REST path parametersmetrics - MetricStore containing all metricsCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.