public class BrokerAdditionDescription extends Object
ConfluentAdmin.describeBrokerAdditions(DescribeBrokerAdditionsOptions)
.
The status of the addition is tracked by one status field:
#partitionReassignmentsStatus()
, a #PartitionReassignmentsStatus
denoting the status of the addition operation.
Additionally, the #additionError()
helps give context to the status - it
can shed light on why the operation failed, why it's stuck in pending for a long time and etc.Constructor and Description |
---|
BrokerAdditionDescription(int brokerId,
BalancerOperationStatus balancerOperationGeneralStatus,
PartitionReassignmentsStatus partitionReassignmentsStatus,
Optional<BalancerOperationError> additionError,
long createTimeMs,
long lastUpdateTimestamp) |
Modifier and Type | Method and Description |
---|---|
Optional<BalancerOperationError> |
additionError()
An optional error that gives context as to why the operation is in the given status.
|
int |
brokerId() |
long |
createTimeMs()
The timestamp at which this broker addition operation was created
|
boolean |
equals(Object o) |
BalancerOperationStatus |
generalOperationStatus()
The current high-level status of the broker addition operation
|
int |
hashCode() |
long |
lastUpdateTimeMs()
The timestamp at which this broker addition operation was last updated
|
PartitionReassignmentsStatus |
partitionReassignmentsStatus()
The detailed, current status of the broker addition operation's status.
|
String |
toString() |
public BrokerAdditionDescription(int brokerId, BalancerOperationStatus balancerOperationGeneralStatus, PartitionReassignmentsStatus partitionReassignmentsStatus, Optional<BalancerOperationError> additionError, long createTimeMs, long lastUpdateTimestamp)
public BalancerOperationStatus generalOperationStatus()
public PartitionReassignmentsStatus partitionReassignmentsStatus()
PartitionReassignmentsStatus.ERROR
- when the broker addition operation failed
2. PartitionReassignmentsStatus.PENDING
- when the intent of addition is registered but the balancer is yet to start on it (e.g still collecting metrics for computing a reassignment plan)
3. PartitionReassignmentsStatus.CANCELED
- when the broker addition operation was canceled (e.g a higher-priority operation overriding it)
4. PartitionReassignmentsStatus.IN_PROGRESS
- when the addition is in progress (replicas are being reassigned)
5. PartitionReassignmentsStatus.COMPLETED
- when the broker has successfully been added to the clusterpublic int brokerId()
public long createTimeMs()
public long lastUpdateTimeMs()
public Optional<BalancerOperationError> additionError()