Module org.elasticsearch.server
Package org.elasticsearch.cluster.routing.allocation.allocator
package org.elasticsearch.cluster.routing.allocation.allocator
-
ClassDescriptionThis event listener might be needed to delay execution of multiple distinct tasks until followup reroute is complete.Manages the lifecycle of a series of
BalancingRoundSummaryresults from allocation balancing rounds and creates reports thereof.TheBalancedShardsAllocatorallocates and balances shards on the cluster nodes usingWeightFunction.A NodeSorter sorts the set of nodes for a single partition using theWeightFunctionfor that partition.Summarizes the impact to the cluster as a result of a rebalancing round.Holds combinedBalancingRoundSummaryresults.The cluster nodes and shards are partitioned into mutually disjoint partitions.A balancing weights factory must be able to divide all shards and nodes into mutually disjoint partitions.Asynchronously runs some computation using at most one thread but expects the input value changes over time as it's running.The desired balance of the cluster, indicating which nodes should hold a copy of each shard.Holds the desired balance and updates it as the cluster evolves.The input to the desired balance computation.Maintains balancer metrics and makes them accessible to theMeterRegistryand APM reporting.Given the current allocation of shards and the desired balance, performs the next (legal) shard movements towards the goal.AShardsAllocatorwhich asynchronously refreshes the desired balance held by theDesiredBalanceComputerand then takes steps towards the desired balance using theDesiredBalanceReconciler.Execute an action at most once per time intervalTracks the order in which nodes are used for allocation so that we can allocate shards to nodes in a round-robin fashion (all else being equal).NodeSorters is just a cache ofBalancedShardsAllocator.NodeSorterinstances for each cluster partitionThis class iterates all shards from all nodes.Registers listeners with an `index` number (PendingListenersQueue.add(long, ActionListener)) and then completes them whenever the latest index number is greater or equal to a listener's index value (PendingListenersQueue.complete(long)).Simple shard assignment summary of shard copies for a particular index shard.AShardsAllocatoris the main entry point for shard allocation on nodes in the cluster.This class is the primary weight function used to create balanced over nodes and shards in the cluster.