Package org.apache.storm.metricstore
Class NoOpMetricStore
- java.lang.Object
-
- org.apache.storm.metricstore.NoOpMetricStore
-
- All Implemented Interfaces:
AutoCloseable,MetricStore
public class NoOpMetricStore extends Object implements MetricStore
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.storm.metricstore.MetricStore
MetricStore.ScanCallback
-
-
Constructor Summary
Constructors Constructor Description NoOpMetricStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the metric store.voidinsert(Metric metric)Stores a metric in the store.booleanpopulateValue(Metric metric)Fill out the numeric values for a metric.voidprepare(Map<String,Object> config, StormMetricsRegistry metricsRegistry)Create metric store instance using the configurations provided via the config map.voidscan(FilterOptions filter, MetricStore.ScanCallback scanCallback)Scans all metrics in the store and returns the ones matching the specified filtering options.
-
-
-
Method Detail
-
prepare
public void prepare(Map<String,Object> config, StormMetricsRegistry metricsRegistry)
Description copied from interface:MetricStoreCreate metric store instance using the configurations provided via the config map.- Specified by:
preparein interfaceMetricStore- Parameters:
config- Storm config mapmetricsRegistry- The Nimbus daemon metrics registry
-
insert
public void insert(Metric metric)
Description copied from interface:MetricStoreStores a metric in the store.- Specified by:
insertin interfaceMetricStore- Parameters:
metric- Metric to store
-
populateValue
public boolean populateValue(Metric metric)
Description copied from interface:MetricStoreFill out the numeric values for a metric.- Specified by:
populateValuein interfaceMetricStore- Parameters:
metric- Metric to populate- Returns:
- true if the metric was populated, false otherwise
-
close
public void close()
Description copied from interface:MetricStoreClose the metric store.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceMetricStore
-
scan
public void scan(FilterOptions filter, MetricStore.ScanCallback scanCallback)
Description copied from interface:MetricStoreScans all metrics in the store and returns the ones matching the specified filtering options.- Specified by:
scanin interfaceMetricStore- Parameters:
filter- options to filter byscanCallback- callback for each Metric found
-
-