java.lang.Object
org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceReconciler

public class DesiredBalanceReconciler extends Object
Given the current allocation of shards and the desired balance, performs the next (legal) shard movements towards the goal.
  • Field Details

    • UNDESIRED_ALLOCATIONS_LOG_INTERVAL_SETTING

      public static final Setting<TimeValue> UNDESIRED_ALLOCATIONS_LOG_INTERVAL_SETTING
      The minimum interval that log messages will be written if the number of undesired shard allocations reaches the percentage of total shards set by UNDESIRED_ALLOCATIONS_LOG_THRESHOLD_SETTING.
    • UNDESIRED_ALLOCATIONS_LOG_THRESHOLD_SETTING

      public static final Setting<Double> UNDESIRED_ALLOCATIONS_LOG_THRESHOLD_SETTING
      Warning log messages may be periodically written if the number of shards that are on undesired nodes reaches this percentage setting. Works together with UNDESIRED_ALLOCATIONS_LOG_INTERVAL_SETTING to log on a periodic basis.
  • Constructor Details

  • Method Details

    • reconcile

      public void reconcile(DesiredBalance desiredBalance, RoutingAllocation allocation)
      Applies a desired shard allocation to the routing table by initializing and relocating shards in the cluster state.
      Parameters:
      desiredBalance - The new desired cluster shard allocation
      allocation - Cluster state information with which to make decisions, contains routing table metadata that will be modified to reach the given desired balance.
    • clear

      public void clear()