public class ExecutionProposal
extends java.lang.Object
Constructor and Description |
---|
ExecutionProposal(org.apache.kafka.common.TopicPartition tp,
long partitionSize,
ReplicaPlacementInfo oldLeader,
java.util.List<ReplicaPlacementInfo> oldReplicas,
java.util.List<ReplicaPlacementInfo> newReplicas,
java.util.List<ReplicaPlacementInfo> oldObservers,
java.util.List<ReplicaPlacementInfo> newObservers)
Construct an execution proposals.
|
Modifier and Type | Method and Description |
---|---|
long |
dataToMoveInMB() |
boolean |
equals(java.lang.Object other) |
java.util.Map<java.lang.String,java.lang.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() |
java.util.List<ReplicaPlacementInfo> |
newObservers() |
java.util.List<ReplicaPlacementInfo> |
newReplicas() |
ReplicaPlacementInfo |
oldLeader() |
java.util.List<ReplicaPlacementInfo> |
oldObservers() |
java.util.List<ReplicaPlacementInfo> |
oldReplicas() |
int |
partitionId() |
java.util.Set<ReplicaPlacementInfo> |
replicasToAdd() |
java.util.Map<java.lang.Integer,ReplicaPlacementInfo> |
replicasToMoveBetweenDisksByBroker() |
java.util.Set<ReplicaPlacementInfo> |
replicasToRemove() |
java.lang.String |
topic() |
org.apache.kafka.common.TopicPartition |
topicPartition() |
java.lang.String |
toString() |
public ExecutionProposal(org.apache.kafka.common.TopicPartition tp, long partitionSize, ReplicaPlacementInfo oldLeader, java.util.List<ReplicaPlacementInfo> oldReplicas, java.util.List<ReplicaPlacementInfo> newReplicas, java.util.List<ReplicaPlacementInfo> oldObservers, java.util.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 java.lang.String topic()
public int partitionId()
public org.apache.kafka.common.TopicPartition topicPartition()
public ReplicaPlacementInfo oldLeader()
public ReplicaPlacementInfo newLeader()
public java.util.List<ReplicaPlacementInfo> oldReplicas()
public java.util.List<ReplicaPlacementInfo> newReplicas()
public java.util.List<ReplicaPlacementInfo> oldObservers()
public java.util.List<ReplicaPlacementInfo> newObservers()
public java.util.Set<ReplicaPlacementInfo> replicasToAdd()
public java.util.Set<ReplicaPlacementInfo> replicasToRemove()
public java.util.Map<java.lang.Integer,ReplicaPlacementInfo> replicasToMoveBetweenDisksByBroker()
public boolean hasReplicaAction()
public boolean hasLeaderAction()
public long interBrokerDataToMoveInMB()
public long intraBrokerDataToMoveInMB()
public long dataToMoveInMB()
public java.util.Map<java.lang.String,java.lang.Object> getJsonStructure()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object