public static enum Broker.Strategy extends Enum<Broker.Strategy>
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.
|
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.Strategy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Broker.Strategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Broker.Strategy GENESIS
The code creates such replica as
replica = new Replica(tp, GENESIS_BROKER, false); replica.setBroker(broker);which marks replica as immigrant.
public static final Broker.Strategy ALIVE
public static final Broker.Strategy DEAD
A dead broker is ineligible to receive replicas.
public static final Broker.Strategy 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.Strategy 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.Strategy IGNORE
public static Broker.Strategy[] values()
for (Broker.Strategy c : Broker.Strategy.values()) System.out.println(c);
public static Broker.Strategy 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()