public class JobMetricsHandler 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" } ]
Modifier and Type | Field and Description |
---|---|
static String |
PARAMETER_JOB_ID |
PARAMETER_METRICS
executor
Constructor and Description |
---|
JobMetricsHandler(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.
|
handleJsonRequest
handleRequest
public static final String PARAMETER_JOB_ID
public JobMetricsHandler(Executor executor, MetricFetcher fetcher)
public String[] getPaths()
RequestHandler
protected Map<String,String> getMapFor(Map<String,String> pathParams, MetricStore metrics)
AbstractMetricsHandler
getMapFor
in class AbstractMetricsHandler
pathParams
- REST path parametersmetrics
- MetricStore containing all metricsCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.