public class BrokerRemovalDescription
extends java.lang.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
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.Modifier and Type | Class and Description |
---|---|
static class |
BrokerRemovalDescription.BrokerShutdownStatus
Deprecated.
- use #
BrokerShutdownStatus |
static class |
BrokerRemovalDescription.PartitionReassignmentsStatus
Deprecated.
- use #
PartitionReassignmentsStatus |
Constructor and Description |
---|
BrokerRemovalDescription(java.lang.Integer brokerId,
BalancerOperationStatus generalOperationStatus,
BrokerShutdownStatus brokerShutdownStatus,
PartitionReassignmentsStatus partitionReassignmentsStatus,
java.util.Optional<BrokerRemovalError> removalError,
long createTimeMs,
long lastUpdateTimeMs) |
BrokerRemovalDescription(java.lang.Integer brokerId,
BrokerRemovalDescription.BrokerShutdownStatus brokerShutdownStatus,
BrokerRemovalDescription.PartitionReassignmentsStatus partitionReassignmentsStatus,
java.util.Optional<BrokerRemovalError> removalError)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
brokerId() |
BrokerRemovalDescription.BrokerShutdownStatus |
brokerShutdownStatus()
Deprecated.
Since 6.1. Use #
shutdownStatus() |
long |
createTimeMs()
The timestamp at which this broker removal operation was created
|
java.util.Optional<BalancerOperationError> |
error()
The error that failed the broker removal operation.
|
BalancerOperationStatus |
generalOperationStatus()
Nullable, the current high-level status of the broker removal operation.
|
long |
lastUpdateTimeMs()
The timestamp at which this broker removal operation was last updated
|
BrokerRemovalDescription.PartitionReassignmentsStatus |
partitionReassignmentsStatus()
Deprecated.
Since 6.1. Use #
reassignmentsStatus() |
PartitionReassignmentsStatus |
reassignmentsStatus()
The status of the partition reassignments, draining replicas out of the to be removed broker.
|
java.util.Optional<BrokerRemovalError> |
removalError()
The error that failed the broker removal operation.
|
BrokerShutdownStatus |
shutdownStatus()
The status of the broker shutdown.
|
java.lang.String |
toString() |
@Deprecated public BrokerRemovalDescription(java.lang.Integer brokerId, BrokerRemovalDescription.BrokerShutdownStatus brokerShutdownStatus, BrokerRemovalDescription.PartitionReassignmentsStatus partitionReassignmentsStatus, java.util.Optional<BrokerRemovalError> removalError)
public BrokerRemovalDescription(java.lang.Integer brokerId, BalancerOperationStatus generalOperationStatus, BrokerShutdownStatus brokerShutdownStatus, PartitionReassignmentsStatus partitionReassignmentsStatus, java.util.Optional<BrokerRemovalError> removalError, long createTimeMs, long lastUpdateTimeMs)
public java.lang.Integer brokerId()
public long createTimeMs()
public long lastUpdateTimeMs()
public BalancerOperationStatus generalOperationStatus()
@Deprecated public BrokerRemovalDescription.BrokerShutdownStatus brokerShutdownStatus()
shutdownStatus()
public BrokerShutdownStatus shutdownStatus()
BrokerRemovalDescription.BrokerShutdownStatus.FAILED
- when the broker removal operation failed midway, unable to initiate a shutdown on the broker.
The user is expected to either retry the removal or cancel it.
2. BrokerRemovalDescription.BrokerShutdownStatus.PENDING
- when the broker is yet to be shut down.
3. BrokerRemovalDescription.BrokerShutdownStatus.CANCELED
- when the shutdown operation is canceled (e.g due to the initial reassignment plan computation failing)
4. BrokerRemovalDescription.BrokerShutdownStatus.COMPLETE
- 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.@Deprecated public BrokerRemovalDescription.PartitionReassignmentsStatus partitionReassignmentsStatus()
reassignmentsStatus()
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 java.util.Optional<BrokerRemovalError> removalError()
error()
method.public java.util.Optional<BalancerOperationError> error()
public java.lang.String toString()
toString
in class java.lang.Object