public class BalancingAction extends Object
Constructor and Description |
---|
BalancingAction(org.apache.kafka.common.TopicPartition tp,
Disk sourceDisk,
Disk destinationDisk,
ActionType actionType)
Constructor for creating a balancing proposal with given topic partition, source and destination disk (on the same broker),
and balancing action type.
|
BalancingAction(org.apache.kafka.common.TopicPartition sourceTp,
Disk sourceDisk,
Disk destinationDisk,
ActionType actionType,
org.apache.kafka.common.TopicPartition destinationTp)
Constructor for creating a balancing proposal with given topic partitions, source and destination disk (on the same broker),
balancing action type and the topic partition of replica to swap with.
|
BalancingAction(org.apache.kafka.common.TopicPartition tp,
Integer sourceBrokerId,
Integer destinationBrokerId,
ActionType actionType)
Constructor for creating a balancing proposal with given topic partition, source and destination broker id, and
balancing action type.
|
BalancingAction(org.apache.kafka.common.TopicPartition sourceTp,
Integer sourceBrokerId,
Integer destinationBrokerId,
ActionType actionType,
org.apache.kafka.common.TopicPartition destinationTp)
Constructor for creating a balancing proposal with given topic partitions, source and destination broker id, balancing
action type and the topic partition of replica to swap with.
|
Modifier and Type | Method and Description |
---|---|
ActionType |
balancingAction()
Get the type of action that provides balancing.
|
Integer |
destinationBrokerId()
Get the destination broker Id.
|
String |
destinationBrokerLogdir()
Get the destination broker logdir.
|
String |
destinationTopic()
Get topic name of the replica to swap with at the destination.
|
org.apache.kafka.common.TopicPartition |
destinationTopicPartition()
Get the destination topic partition to swap with.
|
boolean |
equals(Object other)
Compare the given object with this object.
|
Map<String,Object> |
getJsonStructure()
Return an object that can be further used
to encode into JSON
|
int |
hashCode() |
int |
partitionId()
Get the partition Id that is impacted by the balancing action.
|
Integer |
sourceBrokerId()
Get the source broker id that is impacted by the balancing action.
|
String |
sourceBrokerLogdir()
Get the source broker logdir.
|
String |
topic()
Get topic name of the impacted partition.
|
org.apache.kafka.common.TopicPartition |
topicPartition()
Get topic partition.
|
String |
toString()
Get string representation of this balancing proposal.
|
public BalancingAction(org.apache.kafka.common.TopicPartition tp, Integer sourceBrokerId, Integer destinationBrokerId, ActionType actionType)
tp
- Topic partition of the replica.sourceBrokerId
- Source broker id of the replica.destinationBrokerId
- Destination broker id of the replica.actionType
- Action type.public BalancingAction(org.apache.kafka.common.TopicPartition sourceTp, Integer sourceBrokerId, Integer destinationBrokerId, ActionType actionType, org.apache.kafka.common.TopicPartition destinationTp)
sourceTp
- Topic partition of the source replica.sourceBrokerId
- Source broker id of the replica.destinationBrokerId
- Destination broker id of the replica.actionType
- Action type.destinationTp
- Topic partition of the replica to swap with, null if there is no replica to swap with, i.e.
only move source replica to destination broker.public BalancingAction(org.apache.kafka.common.TopicPartition tp, Disk sourceDisk, Disk destinationDisk, ActionType actionType)
tp
- Topic partition of the replica.sourceDisk
- Source disk of the replica.destinationDisk
- Destination disk of the replica.actionType
- Action type.public BalancingAction(org.apache.kafka.common.TopicPartition sourceTp, Disk sourceDisk, Disk destinationDisk, ActionType actionType, org.apache.kafka.common.TopicPartition destinationTp)
sourceTp
- Topic partition of the source replica.sourceDisk
- Source disk of the replica.destinationDisk
- Destination disk of the replica.actionType
- Action type.destinationTp
- Topic partition of the replica to swap with, null if there is no replica to swap with, i.e.
only move source replica to destination disk.public org.apache.kafka.common.TopicPartition destinationTopicPartition()
public String destinationTopic()
public int partitionId()
public String topic()
public org.apache.kafka.common.TopicPartition topicPartition()
public String sourceBrokerLogdir()
public String destinationBrokerLogdir()
public Integer sourceBrokerId()
public Integer destinationBrokerId()
public ActionType balancingAction()
public Map<String,Object> getJsonStructure()
public String toString()
public boolean equals(Object other)