Enum Class ShardRoutingState

java.lang.Object
java.lang.Enum<ShardRoutingState>
org.elasticsearch.cluster.routing.ShardRoutingState
All Implemented Interfaces:
Serializable, Comparable<ShardRoutingState>, Constable

public enum ShardRoutingState extends Enum<ShardRoutingState>
Tracks the current assignment status of a particular shard copy (ShardRouting).
  • Enum Constant Details

    • UNASSIGNED

      public static final ShardRoutingState UNASSIGNED
      The shard is not assigned to any node; any data which it contains is unavailable to the cluster.

      A shard transitions from UNASSIGNED to INITIALIZING when the master wants an assigned data node to create or start recovering that shard copy. A shard may also transition back to UNASSIGNED in case of any failure, during initialization or later.

    • INITIALIZING

      public static final ShardRoutingState 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 shard STARTED).

      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

      public static final ShardRoutingState 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

      public static final ShardRoutingState 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 be INITIALIZING.
  • Method Details

    • values

      public static ShardRoutingState[] 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

      public static ShardRoutingState valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • value

      public byte value()
      Byte value of this ShardRoutingState
      Returns:
      Byte value of this ShardRoutingState
    • fromValue

      public static ShardRoutingState fromValue(byte value)