public static enum Broker.State extends Enum<Broker.State>
Enum Constant and Description |
---|
ALIVE
The default strategy - an alive broker is eligible to receive and give away replicas/partitions
|
BAD_DISKS
Deprecated.
- a bad disks broker used to represent a broker whose disk was in an unhealthy state.
It used to be treated similar to a
DEAD broker, where we could only move things off of the bad disk (potentially inside a healthy disk in the same broker)
SBC does not support JBOD. Currently unused. |
DEAD
A dead broker is a broker that should be treated as if it's not online - it is eligible to give away
replicas/partitions and in fact goals should treat that with relatively high priority.
|
DEMOTED
Deprecated.
- a demoted broker used to represent a broker which had its leaders moved off (e.g for broker 1 - [1,2,3] to [2,3,1])
A demotion API existed in Cruise Control but is no longer present in SBC. Currently unused.
As of February 2022, we use the
ConfluentAdmin.alterLeadershipPriority(AlterLeadershipPrioritySpec, AlterLeadershipPriorityOptions)
API to demote a broker and SBC is disabled while this is present on the cluster. |
GENESIS
Used for ClusterModel::GENESIS_BROKER.
|
IGNORE
A broker that is ignored is a broker that cannot have new replicas placed on it nor have new replicas moved away from it.
|
NEW
A new broker is the same as an
ALIVE broker but should be treated with higher priority
with relation to moving things into it, presumably because it does not have as many replicas on it. |
Modifier and Type | Method and Description |
---|---|
boolean |
isEligibleDestination()
Denotes whether the broker is eligible as a destination broker - have replicas/leaders/partitions moved into it.
|
boolean |
isEligibleSource()
Denotes whether the broker is eligible as a source broker - have replicas/leaders/partitions moved away from it.
|
static Broker.State |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Broker.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Broker.State GENESIS
replica = new Replica(tp, GENESIS_BROKER, false);
replica.setBroker(broker);
public static final Broker.State ALIVE
public static final Broker.State DEAD
public static final Broker.State NEW
ALIVE
broker but should be treated with higher priority
with relation to moving things into it, presumably because it does not have as many replicas on it.
For example, brokers that are being added are marked as new.@Deprecated public static final Broker.State DEMOTED
ConfluentAdmin.alterLeadershipPriority(AlterLeadershipPrioritySpec, AlterLeadershipPriorityOptions)
API to demote a broker and SBC is disabled while this is present on the cluster.@Deprecated public static final Broker.State BAD_DISKS
DEAD
broker, where we could only move things off of the bad disk (potentially inside a healthy disk in the same broker)
SBC does not support JBOD. Currently unused.public static final Broker.State IGNORE
public static Broker.State[] values()
for (Broker.State c : Broker.State.values()) System.out.println(c);
public static Broker.State valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isEligibleDestination()
public boolean isEligibleSource()