public interface TopicReplicaAssignorBuilder
extends org.apache.kafka.common.Configurable
TopicReplicaAssignor
class.
A new TopicReplicaAssignor
instance is built on each CreateTopicsRequest
and CreatePartitionsRequest
.
Said instance is used for assignments for that request exclusively.Modifier and Type | Method and Description |
---|---|
Optional<TopicReplicaAssignor> |
maybeBuildAssignor(Optional<org.apache.kafka.common.security.auth.KafkaPrincipal> principalOpt,
org.apache.kafka.common.PartitionPlacementStrategy targetPlacement) |
void |
updateClusterDescriber(org.apache.kafka.metadata.placement.ClusterDescriber cluster)
Refresh the latest cluster metadata.
|
void updateClusterDescriber(org.apache.kafka.metadata.placement.ClusterDescriber cluster)
Optional<TopicReplicaAssignor> maybeBuildAssignor(Optional<org.apache.kafka.common.security.auth.KafkaPrincipal> principalOpt, org.apache.kafka.common.PartitionPlacementStrategy targetPlacement)
principalOpt
- - the optional principal of the user which requested the topic replica assignment.
The principal can be absent in cases of internal topic creation (e.g consumer offsets topic)targetPlacement
- - the target partition placement strategy.TopicReplicaAssignor
used for replica assignment.
empty if we were unable to build the assignor.
An empty optional will have Kafka delegate assignment to the default assignor.