Class RocksDbStore
java.lang.Object
org.apache.storm.metricstore.rocksdb.RocksDbStore
- All Implemented Interfaces:
AutoCloseable,MetricStore
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.storm.metricstore.MetricStore
MetricStore.ScanCallback -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Shutdown the store.voidStores metrics 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.
-
Constructor Details
-
RocksDbStore
public RocksDbStore()
-
-
Method Details
-
prepare
public void prepare(Map<String, Object> config, StormMetricsRegistry metricsRegistry) throws MetricExceptionCreate 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- Throws:
MetricException- on preparation error
-
insert
Stores metrics in the store.- Specified by:
insertin interfaceMetricStore- Parameters:
metric- Metric to store- Throws:
MetricException- if database write fails
-
populateValue
Fill 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
- Throws:
MetricException- if read from database fails
-
close
public void close()Shutdown the store.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceMetricStore
-
scan
public void scan(FilterOptions filter, MetricStore.ScanCallback scanCallback) throws MetricException Scans all metrics in the store and returns the ones matching the specified filtering options. Callback returns Metric class results.- Specified by:
scanin interfaceMetricStore- Parameters:
filter- options to filter byscanCallback- callback for each Metric found- Throws:
MetricException- on error
-