public class NoopSampler extends java.lang.Object implements MetricSampler
MetricSampler.Samples, MetricSampler.SamplingMode
EMPTY_SAMPLES
Constructor and Description |
---|
NoopSampler() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
configure(java.util.Map<java.lang.String,?> configs)
Configure this class with the given key-value pairs
|
MetricSampler.Samples |
getSamples(org.apache.kafka.common.Cluster cluster,
java.util.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, java.util.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(java.util.Map<java.lang.String,?> configs)
CruiseControlConfigurable
configure
in interface CruiseControlConfigurable
public void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception