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) |
void |
updateClusterMetadata(org.apache.kafka.common.Cluster cluster)
Refresh the latest cluster metadata.
|
void updateClusterMetadata(org.apache.kafka.common.Cluster cluster)
Optional<TopicReplicaAssignor> maybeBuildAssignor(Optional<org.apache.kafka.common.security.auth.KafkaPrincipal> principalOpt)
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)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.