Class ShardRelocationOrder.DefaultOrder

java.lang.Object
org.elasticsearch.cluster.routing.allocation.allocator.ShardRelocationOrder.DefaultOrder
All Implemented Interfaces:
ShardRelocationOrder
Enclosing interface:
ShardRelocationOrder

public static class ShardRelocationOrder.DefaultOrder extends Object implements ShardRelocationOrder
  • Constructor Details

    • DefaultOrder

      public DefaultOrder()
  • Method Details

    • forNecessaryMoves

      public Iterator<ShardRouting> forNecessaryMoves(RoutingAllocation allocation, String nodeId)
      Node's shards are ordered from data stream write indices, to regular indices and lastly to data stream read indices. In case of the necessary shard movement, such shards will move first. This might be useful in case of the timeout for the node shutdown.
      Specified by:
      forNecessaryMoves in interface ShardRelocationOrder
    • forBalancing

      public Iterator<ShardRouting> forBalancing(RoutingAllocation allocation, String nodeId)
      Node's shards are ordered from data stream read indices, to regular indices and lastly to data stream write indices. This is to minimize the impact of relocations on shards with active writes in case of balancing.
      Specified by:
      forBalancing in interface ShardRelocationOrder