Enum Class AllocationDecision
- All Implemented Interfaces:
Serializable
,Comparable<AllocationDecision>
,Constable
,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 class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Enum Constant Summary
Enum ConstantDescriptionThe allocation decision has been delayed waiting for a replica with a shard copy that left the cluster to rejoin.Waiting on getting shard data from all nodes before making a decision about where to allocate the shard.The shard cannot be allocated, which can happen for any number of reasons, including the allocation deciders gave a NO decision for allocating.No attempt was made to allocate the shardThe shard was denied allocation because there were no valid shard copies found for it amongst the nodes in the cluster.The allocation attempt was throttled for the shard.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.The shard can be allocated to a node. -
Method Summary
Modifier and TypeMethodDescriptionstatic AllocationDecision
fromAllocationStatus(UnassignedInfo.AllocationStatus allocationStatus)
Gets anAllocationDecision
from aUnassignedInfo.AllocationStatus
.static AllocationDecision
Gets anAllocationDecision
from aDecision.Type
static AllocationDecision
readFrom(StreamInput in)
toString()
static AllocationDecision
Returns the enum constant of this class with the specified name.static AllocationDecision[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
Enum Constant Details
-
YES
The shard can be allocated to a node. -
THROTTLED
The allocation attempt was throttled for the shard. -
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
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
Waiting on getting shard data from all nodes before making a decision about where to allocate the shard. -
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
The shard was denied allocation because there were no valid shard copies found for it amongst the nodes in the cluster. -
NO_ATTEMPT
No attempt was made to allocate the shard
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
readFrom
- Throws:
IOException
-
fromAllocationStatus
public static AllocationDecision fromAllocationStatus(UnassignedInfo.AllocationStatus allocationStatus)Gets anAllocationDecision
from aUnassignedInfo.AllocationStatus
. -
fromDecisionType
Gets anAllocationDecision
from aDecision.Type
-
toString
- Overrides:
toString
in classEnum<AllocationDecision>
-