public class MetricFetcherManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BROKER_CAPACITY_CONFIG_RESOLVER_OBJECT_CONFIG |
static java.lang.String |
DEFAULT_BROKER_CAPACITY_CONFIG_RESOLVER_OBJECT_CONFIG |
Constructor and Description |
---|
MetricFetcherManager(KafkaCruiseControlConfig config,
KafkaPartitionMetricSampleAggregator partitionMetricSampleAggregator,
KafkaBrokerMetricSampleAggregator brokerMetricSampleAggregator,
MetadataClient metadataClient,
MetricDef metricDef,
org.apache.kafka.common.utils.Time time,
DataBalancerMetricsRegistry metricRegistry,
BrokerCapacityConfigResolver brokerCapacityConfigResolver)
Create a metric fetcher manager.
|
MetricFetcherManager(KafkaCruiseControlConfig config,
KafkaPartitionMetricSampleAggregator partitionMetricSampleAggregator,
KafkaBrokerMetricSampleAggregator brokerMetricSampleAggregator,
MetadataClient metadataClient,
MetricDef metricDef,
org.apache.kafka.common.utils.Time time,
DataBalancerMetricsRegistry metricRegistry,
BrokerCapacityConfigResolver brokerCapacityConfigResolver,
MetricSampler sampler)
Create a metric fetcher manager.
|
Modifier and Type | Method and Description |
---|---|
boolean |
fetchPartitionMetricSamples(long startMs,
long endMs,
long timeoutMs,
SampleStore sampleStore)
Fetch the partition metric samples for a given period.
|
void |
shutdown()
Shutdown the metric fetcher manager.
|
public static final java.lang.String BROKER_CAPACITY_CONFIG_RESOLVER_OBJECT_CONFIG
public static final java.lang.String DEFAULT_BROKER_CAPACITY_CONFIG_RESOLVER_OBJECT_CONFIG
public MetricFetcherManager(KafkaCruiseControlConfig config, KafkaPartitionMetricSampleAggregator partitionMetricSampleAggregator, KafkaBrokerMetricSampleAggregator brokerMetricSampleAggregator, MetadataClient metadataClient, MetricDef metricDef, org.apache.kafka.common.utils.Time time, DataBalancerMetricsRegistry metricRegistry, BrokerCapacityConfigResolver brokerCapacityConfigResolver)
public MetricFetcherManager(KafkaCruiseControlConfig config, KafkaPartitionMetricSampleAggregator partitionMetricSampleAggregator, KafkaBrokerMetricSampleAggregator brokerMetricSampleAggregator, MetadataClient metadataClient, MetricDef metricDef, org.apache.kafka.common.utils.Time time, DataBalancerMetricsRegistry metricRegistry, BrokerCapacityConfigResolver brokerCapacityConfigResolver, MetricSampler sampler)
config
- The load monitor configurations.partitionMetricSampleAggregator
- The KafkaPartitionMetricSampleAggregator
to aggregate partition metrics.brokerMetricSampleAggregator
- The KafkaBrokerMetricSampleAggregator
to aggregate the broker metrics.metadataClient
- The metadata of the cluster.metricDef
- the metric definitions.time
- The time object.metricRegistry
- The Metric Registry object.brokerCapacityConfigResolver
- The resolver for retrieving broker capacities.sampler
- Metric fetcher or null
to create one using KafkaCruiseControlConfig.METRIC_SAMPLER_CLASS_CONFIG
.public void shutdown()
public boolean fetchPartitionMetricSamples(long startMs, long endMs, long timeoutMs, SampleStore sampleStore)
startMs
- the starting time of the fetching period.endMs
- the end time of the fetching period.timeoutMs
- the timeout.sampleStore
- the sample store to save the partition metric samples.