public class MetricsManager extends Object
| Constructor and Description |
|---|
MetricsManager(MetricStore metricStore) |
| Modifier and Type | Method and Description |
|---|---|
RuntimeMetrics |
getFlowletMetrics(String namespace,
String appName,
String flowName,
String flowletName)
returns flowlet related metrics
|
RuntimeMetrics |
getServiceHandlerMetrics(String namespace,
String applicationId,
String serviceId,
String handlerId)
returns service handler related metrics
|
RuntimeMetrics |
getServiceMetrics(String namespace,
String applicationId,
String serviceId)
returns service related metrics
|
long |
getTotalMetric(Map<String,String> tags,
String metricName)
get metrics total count value for a given context and metric.
|
Collection<MetricTimeSeries> |
query(MetricDataQuery query)
query the metric store and return the Collection
|
void |
resetAll()
deletes all metrics
|
void |
waitForTotalMetricCount(Map<String,String> tags,
String metricName,
long count,
long timeout,
TimeUnit timeoutUnit)
waitFor a metric value count for the metric identified by metricName and context.
|
public MetricsManager(MetricStore metricStore)
public Collection<MetricTimeSeries> query(MetricDataQuery query) throws Exception
query - Exceptionpublic RuntimeMetrics getFlowletMetrics(String namespace, String appName, String flowName, String flowletName)
namespace - appName - flowName - flowletName - RuntimeMetricspublic RuntimeMetrics getServiceMetrics(String namespace, String applicationId, String serviceId)
namespace - applicationId - serviceId - RuntimeMetricspublic RuntimeMetrics getServiceHandlerMetrics(String namespace, String applicationId, String serviceId, String handlerId)
namespace - applicationId - serviceId - handlerId - public long getTotalMetric(Map<String,String> tags, String metricName)
tags - - tags that identify a contextmetricName - public void waitForTotalMetricCount(Map<String,String> tags, String metricName, long count, long timeout, TimeUnit timeoutUnit) throws TimeoutException, InterruptedException
tags - - context identified by tags mapmetricName - count - - expected metric total count valuetimeout - timeoutUnit - TimeoutExceptionInterruptedExceptionCopyright © 2015 Cask Data, Inc. Licensed under the Apache License, Version 2.0.