@ThreadSafe
public class MetricsStore
extends java.lang.Object
| Constructor and Description |
|---|
MetricsStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all the metrics.
|
java.util.Set<Metric> |
getMetricsByInstanceTypeAndName(MetricsSystem.InstanceType instanceType,
java.lang.String name)
Gets all the metrics by instance type and the metric name.
|
void |
putClientMetrics(java.lang.String hostname,
java.lang.String clientId,
java.util.List<Metric> metrics)
Put the metrics from a client with a hostname and a client id.
|
void |
putWorkerMetrics(java.lang.String hostname,
java.util.List<Metric> metrics)
Put the metrics from a worker with a hostname.
|
public void putWorkerMetrics(java.lang.String hostname,
java.util.List<Metric> metrics)
hostname - the hostname of the instancemetrics - the new worker metricspublic void putClientMetrics(java.lang.String hostname,
java.lang.String clientId,
java.util.List<Metric> metrics)
hostname - the hostname of the clientclientId - the id of the clientmetrics - the new metricspublic java.util.Set<Metric> getMetricsByInstanceTypeAndName(MetricsSystem.InstanceType instanceType, java.lang.String name)
instanceType - the instance typename - the metric namepublic void clear()
DefaultMetricsMaster
and before starting the metrics updater to avoid conflicts with
other methods in this class which updates or accesses
the metrics inside metrics sets.Copyright © 2019. All Rights Reserved.