public class BrokerRemovalDescription extends Object
ConfluentAdmin.describeBrokerRemovals(DescribeBrokerRemovalsOptions)
.
The status of the removal is tracked by two separate status fields:
1. #shutdownStatus()
, a #BrokerShutdownStatus
denoting the status of the shutdown operation
2. #reassignmentsStatus()
, a #PartitionReassignmentsStatus
denoting the status of the partition reassignments operation
3. #isShutdownScheduled()
, a boolean to decide whether to
shutdown the broker after excluding.
4. #brokerReplicaExclusionStatus()
, a #BrokerReplicaExclusionStatus
denoting the status of excluding the broker and removing the exclusion.
When at least one of the two has a failed status, the broker removal operation is considered failed. The user is expected to retry the removal via #ConfluentAdmin.removeBrokers(List)
.
When both have a completed status, the broker removal operation is considered a success.Constructor and Description |
---|
BrokerRemovalDescription(Integer brokerId,
BalancerOperationStatus generalOperationStatus,
BrokerShutdownStatus brokerShutdownStatus,
PartitionReassignmentsStatus partitionReassignmentsStatus,
BrokerReplicaExclusionStatus brokerReplicaExclusionStatus,
boolean shutdownScheduled,
Optional<BrokerRemovalError> removalError,
long createTimeMs,
long lastUpdateTimeMs) |
BrokerRemovalDescription(Integer brokerId,
BalancerOperationStatus generalOperationStatus,
BrokerShutdownStatus brokerShutdownStatus,
PartitionReassignmentsStatus partitionReassignmentsStatus,
Optional<BrokerRemovalError> removalError,
long createTimeMs,
long lastUpdateTimeMs)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Integer |
brokerId() |
BrokerReplicaExclusionStatus |
brokerReplicaExclusionStatus()
Nullable for server versions below 7.0, the status of the broker replica exclusion subtask
of the broker removal operation.
|
long |
createTimeMs()
The timestamp at which this broker removal operation was created
|
Optional<BalancerOperationError> |
error()
The error that failed the broker removal operation.
|
BalancerOperationStatus |
generalOperationStatus()
Nullable, the current high-level status of the broker removal operation.
|
boolean |
isShutdownScheduled() |
long |
lastUpdateTimeMs()
The timestamp at which this broker removal operation was last updated
|
PartitionReassignmentsStatus |
reassignmentsStatus()
The status of the partition reassignments, draining replicas out of the to be removed broker.
|
Optional<BrokerRemovalError> |
removalError()
The error that failed the broker removal operation.
|
BrokerShutdownStatus |
shutdownStatus()
The status of the broker shutdown subtask of the broker removal operation.
|
String |
toString() |
@Deprecated public BrokerRemovalDescription(Integer brokerId, BalancerOperationStatus generalOperationStatus, BrokerShutdownStatus brokerShutdownStatus, PartitionReassignmentsStatus partitionReassignmentsStatus, Optional<BrokerRemovalError> removalError, long createTimeMs, long lastUpdateTimeMs)
public BrokerRemovalDescription(Integer brokerId, BalancerOperationStatus generalOperationStatus, BrokerShutdownStatus brokerShutdownStatus, PartitionReassignmentsStatus partitionReassignmentsStatus, BrokerReplicaExclusionStatus brokerReplicaExclusionStatus, boolean shutdownScheduled, Optional<BrokerRemovalError> removalError, long createTimeMs, long lastUpdateTimeMs)
public Integer brokerId()
public long createTimeMs()
public long lastUpdateTimeMs()
public BalancerOperationStatus generalOperationStatus()
public BrokerReplicaExclusionStatus brokerReplicaExclusionStatus()
BrokerReplicaExclusionStatus.PENDING
- When the broker is yet to be excluded from
having replicas on it.
2. BrokerReplicaExclusionStatus.IN_PROGRESS
- When the broker is being excluded from
having replicas on it.
3. BrokerReplicaExclusionStatus.EXCLUDED
- When the broker has been excluded from
the cluster.
4. BrokerReplicaExclusionStatus.REMOVING
- When the exclusion is in the process of
being removed.
5. BrokerReplicaExclusionStatus.ERROR
- When there was an exception during the broker
replica exclusion task either while excluding the broker or while removing the exclusion -
ultimately, the task did not succeed.
6. BrokerReplicaExclusionStatus.CANCELED
- When the exclusion operation is canceled
due to external influence before the broker replica exclusion task.
7. BrokerReplicaExclusionStatus.COMPLETED
- When the broker has been excluded
successfully.
8. BrokerReplicaExclusionStatus.UNKNOWN
- Kept for future-compatibility reasons -
clients will fall-back to this status when they receive an unrecognized onepublic boolean isShutdownScheduled()
public BrokerShutdownStatus shutdownStatus()
BrokerShutdownStatus.ERROR
- when the broker removal operation failed midway and unable to initiate a shutdown on the broker.
The user is expected to either retry the removal or cancel it.
2. BrokerShutdownStatus.PENDING
- when the broker is yet to be shut down.
3. BrokerShutdownStatus.CANCELED
- when the shutdown operation is canceled (e.g due to the initial reassignment plan computation failing)
4. BrokerShutdownStatus.COMPLETED
- when the broker has successfully been shut down.
If this status is returned, the broker to be removed is no longer part of the Kafka cluster.public PartitionReassignmentsStatus reassignmentsStatus()
PartitionReassignmentsStatus.ERROR
- when the broker removal operation failed midway.
It is unknown whether any replicas were moved away or not.
The user is expected to either retry the removal or cancel it.
2. PartitionReassignmentsStatus.PENDING
- when the partition reassignments plan is being computed. Reassignments are yet to happen.
3. PartitionReassignmentsStatus.IN_PROGRESS
- when the partitions are actively being reassigned.
4. PartitionReassignmentsStatus.CANCELED
- when the partition drain was cancelled because of unrelated factors, like the broker being restarted or the shutdown failing
5. PartitionReassignmentsStatus.COMPLETED
- when all the replicas of the to be removed broker were reassigned away from it.
If this status is returned, the broker to be removed has no replicas on it.public Optional<BrokerRemovalError> removalError()
error()
method.public Optional<BalancerOperationError> error()