Class BalancedShardsAllocator.Balancer

java.lang.Object
org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.Balancer
Enclosing class:
BalancedShardsAllocator

public static class BalancedShardsAllocator.Balancer
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    Balancer​(org.apache.logging.log4j.Logger logger, RoutingAllocation allocation, org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.WeightFunction weight, float threshold)  
  • Method Summary

    Modifier and Type Method Description
    float avgShardsPerNode()
    Returns the global average of shards per node
    float avgShardsPerNode​(java.lang.String index)
    Returns the average of shards per node for the given index
    MoveDecision decideMove​(ShardRouting shardRouting)
    Makes a decision on whether to move a started shard to another node.
    void moveShards()
    Move started shards that can not be allocated to a node anymore For each shard to be moved this function executes a move operation to the minimal eligible node with respect to the weight function.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Balancer

      public Balancer​(org.apache.logging.log4j.Logger logger, RoutingAllocation allocation, org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator.WeightFunction weight, float threshold)
  • Method Details