Package org.apache.solr.handler.admin
Enum ClusterStatus.Health
- java.lang.Object
-
- java.lang.Enum<ClusterStatus.Health>
-
- org.apache.solr.handler.admin.ClusterStatus.Health
-
- All Implemented Interfaces:
Serializable
,Comparable<ClusterStatus.Health>
- Enclosing class:
- ClusterStatus
public static enum ClusterStatus.Health extends Enum<ClusterStatus.Health>
Shard / collection health state.
-
-
Field Summary
Fields Modifier and Type Field Description static float
ORANGE_LEVEL
static float
RED_LEVEL
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ClusterStatus.Health
calcShardHealth(float fractionReplicasUp, boolean hasLeader)
static ClusterStatus.Health
combine(Collection<ClusterStatus.Health> states)
Combine multiple states into one.static ClusterStatus.Health
valueOf(String name)
Returns the enum constant of this type with the specified name.static ClusterStatus.Health[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GREEN
public static final ClusterStatus.Health GREEN
All replicas up, leader exists.
-
YELLOW
public static final ClusterStatus.Health YELLOW
Some replicas down, leader exists.
-
ORANGE
public static final ClusterStatus.Health ORANGE
Most replicas down, leader exists.
-
RED
public static final ClusterStatus.Health RED
No leader or all replicas down.
-
-
Field Detail
-
ORANGE_LEVEL
public static final float ORANGE_LEVEL
- See Also:
- Constant Field Values
-
RED_LEVEL
public static final float RED_LEVEL
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static ClusterStatus.Health[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ClusterStatus.Health c : ClusterStatus.Health.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ClusterStatus.Health valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
calcShardHealth
public static ClusterStatus.Health calcShardHealth(float fractionReplicasUp, boolean hasLeader)
-
combine
public static ClusterStatus.Health combine(Collection<ClusterStatus.Health> states)
Combine multiple states into one. Always reports as the worst state.
-
-