public interface TopicReplicaAssignor
TopicReplicaAssignor
instance is built on each CreateTopicsRequest
and CreatePartitionsRequest
.
Said instance is used for assignments for that request exclusively.Modifier and Type | Interface and Description |
---|---|
static class |
TopicReplicaAssignor.NewPartitions |
Modifier and Type | Method and Description |
---|---|
Optional<List<List<Integer>>> |
computeAssignmentForExistingTopic(TopicReplicaAssignor.NewPartitions partitions,
Optional<org.apache.kafka.metadata.TopicPlacement> topicPlacementOpt,
Set<Integer> excludedBrokerIds)
Computes the replica assignment for an existing topic that is about to have new partitions created on it (CreatePartitions request).
|
Optional<List<List<Integer>>> |
computeAssignmentForNewTopic(TopicReplicaAssignor.NewPartitions partitions,
Optional<org.apache.kafka.metadata.TopicPlacement> topicPlacementOpt,
Set<Integer> excludedBrokerIds)
Computes the replica assignment for a topic that's about to be created (CreateTopics request).
|
Optional<List<List<Integer>>> computeAssignmentForNewTopic(TopicReplicaAssignor.NewPartitions partitions, Optional<org.apache.kafka.metadata.TopicPlacement> topicPlacementOpt, Set<Integer> excludedBrokerIds) throws org.apache.kafka.common.errors.ApiException
partitions
- - an pre-validated TopicReplicaAssignor.NewPartitions
argument. Implementations do not need to re-validate this parameter (e.g non-negative values, consistency in number of partitions).topicPlacementOpt
- - an optional denoting topic placement constraints for this topic.excludedBrokerIds
- - a list of broker IDs that are excluded from replica placement. No new replicas should be placed on these brokers.org.apache.kafka.common.errors.ApiException
- - in case anything is wrong with the requested TopicReplicaAssignor.NewPartitions
(e.g invalid number of partitions)Optional<List<List<Integer>>> computeAssignmentForExistingTopic(TopicReplicaAssignor.NewPartitions partitions, Optional<org.apache.kafka.metadata.TopicPlacement> topicPlacementOpt, Set<Integer> excludedBrokerIds) throws org.apache.kafka.common.errors.ApiException
partitions
- - an pre-validated TopicReplicaAssignor.NewPartitions
argument. Implementations do not need to re-validate this parameter (e.g non-negative values, consistency in number of partitions)topicPlacementOpt
- - an optional denoting topic placement constraints for this topic.excludedBrokerIds
- - a list of broker IDs that are excluded from replica placement. No new replicas should be placed on these brokers.org.apache.kafka.common.errors.ApiException
- - in case anything is wrong with the requested TopicReplicaAssignor.NewPartitions
(e.g invalid number of partitions)