Module org.elasticsearch.server
Class DesiredBalanceReconciler
java.lang.Object
org.elasticsearch.cluster.routing.allocation.allocator.DesiredBalanceReconciler
Given the current allocation of shards and the desired balance, performs the next (legal) shard movements towards the goal.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe minimum interval that log messages will be written if the number of undesired shard allocations reaches the percentage of total shards set byUNDESIRED_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. -
Constructor Summary
ConstructorsConstructorDescriptionDesiredBalanceReconciler(ClusterSettings clusterSettings, ThreadPool threadPool) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()reconcile(DesiredBalance desiredBalance, RoutingAllocation allocation) Applies a desired shard allocation to the routing table by initializing and relocating shards in the cluster state.
-
Field Details
-
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 byUNDESIRED_ALLOCATIONS_LOG_THRESHOLD_SETTING. -
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 withUNDESIRED_ALLOCATIONS_LOG_INTERVAL_SETTINGto log on a periodic basis.
-
-
Constructor Details
-
DesiredBalanceReconciler
-
-
Method Details
-
reconcile
public DesiredBalanceMetrics.AllocationStats 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 allocationallocation- Cluster state information with which to make decisions, contains routing table metadata that will be modified to reach the given desired balance.- Returns:
DesiredBalanceMetrics.AllocationStatsfor this round of reconciliation changes.
-
clear
public void clear()
-