Enum AllocationDecision
- java.lang.Object
-
- java.lang.Enum<AllocationDecision>
-
- org.elasticsearch.cluster.routing.allocation.AllocationDecision
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AllocationDecision>,Writeable
public enum AllocationDecision extends java.lang.Enum<AllocationDecision> implements Writeable
An enum which represents the various decision types that can be taken by the allocators and deciders for allocating a shard to a node.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOCATION_DELAYEDThe allocation decision has been delayed waiting for a replica with a shard copy that left the cluster to rejoin.AWAITING_INFOWaiting on getting shard data from all nodes before making a decision about where to allocate the shard.NOThe shard cannot be allocated, which can happen for any number of reasons, including the allocation deciders gave a NO decision for allocating.NO_ATTEMPTNo attempt was made to allocate the shardNO_VALID_SHARD_COPYThe shard was denied allocation because there were no valid shard copies found for it amongst the nodes in the cluster.THROTTLEDThe allocation attempt was throttled for the shard.WORSE_BALANCEThe shard could not be rebalanced to another node despite rebalancing being allowed, because moving the shard to the other node would not form a better cluster balance.YESThe shard can be allocated to a node.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AllocationDecisionfromAllocationStatus(UnassignedInfo.AllocationStatus allocationStatus)Gets anAllocationDecisionfrom aUnassignedInfo.AllocationStatus.static AllocationDecisionfromDecisionType(Decision.Type type)Gets anAllocationDecisionfrom aDecision.Typestatic AllocationDecisionreadFrom(StreamInput in)java.lang.StringtoString()static AllocationDecisionvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static AllocationDecision[]values()Returns an array containing the constants of this enum type, in the order they are declared.voidwriteTo(StreamOutput out)Write this into the StreamOutput.
-
-
-
Enum Constant Detail
-
YES
public static final AllocationDecision YES
The shard can be allocated to a node.
-
THROTTLED
public static final AllocationDecision THROTTLED
The allocation attempt was throttled for the shard.
-
NO
public static final AllocationDecision NO
The shard cannot be allocated, which can happen for any number of reasons, including the allocation deciders gave a NO decision for allocating.
-
WORSE_BALANCE
public static final AllocationDecision WORSE_BALANCE
The shard could not be rebalanced to another node despite rebalancing being allowed, because moving the shard to the other node would not form a better cluster balance.
-
AWAITING_INFO
public static final AllocationDecision AWAITING_INFO
Waiting on getting shard data from all nodes before making a decision about where to allocate the shard.
-
ALLOCATION_DELAYED
public static final AllocationDecision ALLOCATION_DELAYED
The allocation decision has been delayed waiting for a replica with a shard copy that left the cluster to rejoin.
-
NO_VALID_SHARD_COPY
public static final AllocationDecision NO_VALID_SHARD_COPY
The shard was denied allocation because there were no valid shard copies found for it amongst the nodes in the cluster.
-
NO_ATTEMPT
public static final AllocationDecision NO_ATTEMPT
No attempt was made to allocate the shard
-
-
Method Detail
-
values
public static AllocationDecision[] 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 (AllocationDecision c : AllocationDecision.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AllocationDecision valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:WriteableWrite this into the StreamOutput.
-
readFrom
public static AllocationDecision readFrom(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
fromAllocationStatus
public static AllocationDecision fromAllocationStatus(UnassignedInfo.AllocationStatus allocationStatus)
Gets anAllocationDecisionfrom aUnassignedInfo.AllocationStatus.
-
fromDecisionType
public static AllocationDecision fromDecisionType(Decision.Type type)
Gets anAllocationDecisionfrom aDecision.Type
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<AllocationDecision>
-
-