Module org.elasticsearch.server
Enum Class ShardRoutingState
- All Implemented Interfaces:
Serializable
,Comparable<ShardRoutingState>
,Constable
Tracks the current assignment status of a particular shard copy (
ShardRouting
).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe shard is assigned to a node and the recovery process has begun.The shard is being reassigned away from one node to another node.The shard is assigned to a specific data node and ready to accept indexing and search requests.The shard is not assigned to any node; any data which it contains is unavailable to the cluster. -
Method Summary
Modifier and TypeMethodDescriptionstatic ShardRoutingState
fromValue
(byte value) byte
value()
Byte value of thisShardRoutingState
static ShardRoutingState
Returns the enum constant of this class with the specified name.static ShardRoutingState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNASSIGNED
The shard is not assigned to any node; any data which it contains is unavailable to the cluster.A shard transitions from
UNASSIGNED
toINITIALIZING
when the master wants an assigned data node to create or start recovering that shard copy. A shard may also transition back toUNASSIGNED
in case of any failure, during initialization or later. -
INITIALIZING
The shard is assigned to a node and the recovery process has begun. The shard data is not yet available on the node initializing the shard (though there is a small window of time when the data is available, after recovery completes and before the cluster state is updated to mark the shardSTARTED
).A shard transitions from
INITIALIZING
->STARTED
when recovery is complete and the data node informs the master that it is ready to serve requests. -
STARTED
The shard is assigned to a specific data node and ready to accept indexing and search requests.A shard transitions from
STARTED
->RELOCATING
when the master wants to initialize the shard elsewhere. -
RELOCATING
The shard is being reassigned away from one node to another node. This is the state of the shard on a source node when the shard is being moved away to a new target node. The target shard copy will beINITIALIZING
.
-
-
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
-
value
public byte value()Byte value of thisShardRoutingState
- Returns:
- Byte value of this
ShardRoutingState
-
fromValue
-