Class NewPartitionReassignment
java.lang.Object
org.apache.kafka.clients.admin.NewPartitionReassignment
A new partition reassignment, which can be applied via
Admin.alterPartitionReassignments(Map, AlterPartitionReassignmentsOptions). targetReplicas is the total set of brokers assigned while targetObservers is the set brokers that will act as observers. The size of targetReplicas must be greater than the size of targetObservers and every targetObservers must be included in targetReplicas.Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionstatic NewPartitionReassignmentofReplicasAndObservers(List<Integer> replicas, List<Integer> observers)
Constructor Details
NewPartitionReassignment
- Throws:
IllegalArgumentException- if no replicas are supplied
Method Details
ofReplicasAndObservers
@Confluentpublic static NewPartitionReassignment ofReplicasAndObservers(List<Integer> replicas, List<Integer> observers) - Throws:
IllegalArgumentException- if no replicas are supplied or observers is null
targetReplicas
targetObservers