public class ExecutionProposal extends Object
Constructor and Description |
---|
ExecutionProposal(org.apache.kafka.common.TopicPartition tp,
long partitionSize,
ReplicaPlacementInfo oldLeader,
List<ReplicaPlacementInfo> oldReplicas,
List<ReplicaPlacementInfo> newReplicas,
List<ReplicaPlacementInfo> oldObservers,
List<ReplicaPlacementInfo> newObservers)
Construct an execution proposals.
|
Modifier and Type | Method and Description |
---|---|
long |
dataToMoveInMB() |
boolean |
equals(Object other) |
Map<String,Object> |
getJsonStructure()
Return an object that can be further used
to encode into JSON
|
int |
hashCode() |
boolean |
hasLeaderAction() |
boolean |
hasReplicaAction() |
long |
interBrokerDataToMoveInMB() |
long |
intraBrokerDataToMoveInMB() |
boolean |
isInterBrokerMovementAborted(org.apache.kafka.common.Node[] currentOrderedReplicas,
org.apache.kafka.common.Node[] currentOrderedObservers)
Check whether the abortion of inter-broker replica movement from this proposal is reflected in the current ordered
replicas in the given cluster.
|
boolean |
isInterBrokerMovementCompleted(org.apache.kafka.common.Node[] currentOrderedReplicas,
org.apache.kafka.common.Node[] currentOrderedObservers)
Check whether the successful completion of inter-broker replica movement from this proposal is reflected in the current
ordered replicas in the given cluster.
|
ReplicaPlacementInfo |
newLeader() |
List<ReplicaPlacementInfo> |
newObservers() |
List<ReplicaPlacementInfo> |
newReplicas() |
ReplicaPlacementInfo |
oldLeader() |
List<ReplicaPlacementInfo> |
oldObservers() |
List<ReplicaPlacementInfo> |
oldReplicas() |
int |
partitionId() |
int |
replicaMovementParallelism() |
Set<ReplicaPlacementInfo> |
replicasToAdd() |
Map<Integer,ReplicaPlacementInfo> |
replicasToMoveBetweenDisksByBroker() |
Set<ReplicaPlacementInfo> |
replicasToRemove() |
long |
singleDestinationBrokerDataToReceiveInMB() |
String |
topic() |
org.apache.kafka.common.TopicPartition |
topicPartition() |
String |
toString() |
public ExecutionProposal(org.apache.kafka.common.TopicPartition tp, long partitionSize, ReplicaPlacementInfo oldLeader, List<ReplicaPlacementInfo> oldReplicas, List<ReplicaPlacementInfo> newReplicas, List<ReplicaPlacementInfo> oldObservers, List<ReplicaPlacementInfo> newObservers)
tp
- the topic partition of this execution proposalpartitionSize
- the size of the partition.oldLeader
- the old leader of the partition to determine if leader movement is needed.oldReplicas
- the old replicas for rollback. (Rollback is not supported until KAFKA-6304)newReplicas
- the new replicas of the partition in this order.oldObservers
- the old observers for rollback.newObservers
- the new observers for the partition.public boolean isInterBrokerMovementCompleted(org.apache.kafka.common.Node[] currentOrderedReplicas, org.apache.kafka.common.Node[] currentOrderedObservers)
currentOrderedReplicas
- Current ordered replica list from the cluster.public boolean isInterBrokerMovementAborted(org.apache.kafka.common.Node[] currentOrderedReplicas, org.apache.kafka.common.Node[] currentOrderedObservers)
currentOrderedReplicas
- Current ordered replica list from the cluster.public String topic()
public int partitionId()
public org.apache.kafka.common.TopicPartition topicPartition()
public ReplicaPlacementInfo oldLeader()
public ReplicaPlacementInfo newLeader()
public List<ReplicaPlacementInfo> oldReplicas()
public List<ReplicaPlacementInfo> newReplicas()
public List<ReplicaPlacementInfo> oldObservers()
public List<ReplicaPlacementInfo> newObservers()
public Set<ReplicaPlacementInfo> replicasToAdd()
public Set<ReplicaPlacementInfo> replicasToRemove()
public Map<Integer,ReplicaPlacementInfo> replicasToMoveBetweenDisksByBroker()
public boolean hasReplicaAction()
public boolean hasLeaderAction()
public long interBrokerDataToMoveInMB()
public long singleDestinationBrokerDataToReceiveInMB()
public long intraBrokerDataToMoveInMB()
public long dataToMoveInMB()
public int replicaMovementParallelism()
public Map<String,Object> getJsonStructure()