public class NoopSampler extends Object implements MetricSampler
MetricSampler.Samples, MetricSampler.SamplingMode
EMPTY_SAMPLES
Constructor and Description |
---|
NoopSampler() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure(Map<String,?> configs)
Configure this class with the given key-value pairs
|
MetricSampler.Samples |
getSamples(org.apache.kafka.common.Cluster cluster,
Set<org.apache.kafka.common.TopicPartition> assignedPartitions,
long startTimeMs,
long endTimeMs,
MetricSampler.SamplingMode mode,
MetricDef metricDef,
long timeout)
Get the metric sample of the given topic partition and replica from the Kafka cluster.
|
public MetricSampler.Samples getSamples(org.apache.kafka.common.Cluster cluster, Set<org.apache.kafka.common.TopicPartition> assignedPartitions, long startTimeMs, long endTimeMs, MetricSampler.SamplingMode mode, MetricDef metricDef, long timeout) throws MetricSamplingException
MetricSampler
getSamples
in interface MetricSampler
cluster
- the metadata of the cluster.assignedPartitions
- the topic partitionstartTimeMs
- the start time of the sampling period.endTimeMs
- the end time of the sampling period.mode
- The sampling mode.metricDef
- the metric definitions.timeout
- The sampling timeout to stop sampling even if there is more data to get.MetricSamplingException
public void configure(Map<String,?> configs)
CruiseControlConfigurable
configure
in interface CruiseControlConfigurable
public void close() throws Exception
close
in interface AutoCloseable
Exception