public class DefaultMetricSamplerPartitionAssignor extends Object implements MetricSamplerPartitionAssignor
The assignment tries to achieve the following goals: 1. All the partitions of the same topic goes to one metric fetcher. 2. The number of partitions assigned to each fetcher should be about the same.
Constructor and Description |
---|
DefaultMetricSamplerPartitionAssignor() |
Modifier and Type | Method and Description |
---|---|
Set<org.apache.kafka.common.PartitionInfo> |
assignPartitions(org.apache.kafka.common.Cluster cluster)
Assign the partitions in the cluster to the single metric fetcher.
|
void |
configure(Map<String,?> configs)
Configure this class with the given key-value pairs
|
public DefaultMetricSamplerPartitionAssignor()
public void configure(Map<String,?> configs)
CruiseControlConfigurable
configure
in interface CruiseControlConfigurable
public Set<org.apache.kafka.common.PartitionInfo> assignPartitions(org.apache.kafka.common.Cluster cluster)
MetricSamplerPartitionAssignor
assignPartitions
in interface MetricSamplerPartitionAssignor
cluster
- The Kafka cluster