public class ReadOnlyKafkaSampleStore extends KafkaSampleStore
SampleStore.SampleLoader
_brokerMetricSampleStoreTopic, _consumers, _loadingProgress, _metricProcessorExecutor, _partitionMetricSampleStoreTopic, _producer, _shutdown, _skipSampleStoreTopicRackAwarenessCheck, BROKER_METRIC_SAMPLE_STORE_TOPIC_CONFIG, BROKER_SAMPLE_STORE_TOPIC_PARTITION_COUNT_CONFIG, CONSUMER_CLIENT_ID, CONSUMER_GROUP, DEFAULT_BROKER_SAMPLE_STORE_TOPIC_PARTITION_COUNT, DEFAULT_MIN_BROKER_SAMPLE_STORE_TOPIC_RETENTION_TIME_MS, DEFAULT_MIN_PARTITION_SAMPLE_STORE_TOPIC_RETENTION_TIME_MS, DEFAULT_NUM_SAMPLE_LOADING_THREADS, DEFAULT_PARTITION_SAMPLE_STORE_TOPIC_PARTITION_COUNT, DEFAULT_SKIP_SAMPLE_STORE_TOPIC_RACK_AWARENESS_CHECK, MIN_BROKER_SAMPLE_STORE_TOPIC_RETENTION_TIME_MS_CONFIG, MIN_PARTITION_SAMPLE_STORE_TOPIC_RETENTION_TIME_MS_CONFIG, NUM_SAMPLE_LOADING_THREADS_CONFIG, PARTITION_METRIC_SAMPLE_STORE_TOPIC_CONFIG, PARTITION_SAMPLE_STORE_TOPIC_PARTITION_COUNT_CONFIG, PRODUCER_CLIENT_ID, SKIP_SAMPLE_STORE_TOPIC_RACK_AWARENESS_CHECK_CONFIG
Constructor and Description |
---|
ReadOnlyKafkaSampleStore() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the sample store.
|
void |
configure(java.util.Map<java.lang.String,?> config)
We have to override the configure method so that no producer is created and no ZK topic configuration change
is made either.
|
void |
evictSamplesBefore(long timestamp)
This method is called when a workload snapshot window is evicted.
|
void |
storeSamples(MetricSampler.Samples samples)
Store all the samples to the sample store.
|
checkStartupCondition, createConsumer, createProducer, loadSamples, sampleLoadingProgress
public void configure(java.util.Map<java.lang.String,?> config)
configure
in interface CruiseControlConfigurable
configure
in class KafkaSampleStore
public void close()
SampleStore
close
in interface SampleStore
close
in class KafkaSampleStore
public void storeSamples(MetricSampler.Samples samples)
SampleStore
storeSamples
in interface SampleStore
storeSamples
in class KafkaSampleStore
samples
- the samples to store.public void evictSamplesBefore(long timestamp)
SampleStore
evictSamplesBefore
in interface SampleStore
evictSamplesBefore
in class KafkaSampleStore
timestamp
- the timestamp of the snapshot window that has just been evicted.