Class BalancedShardsAllocator.Balancer

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      java.util.Map<DiscoveryNode,​java.lang.Float> weighShard​(ShardRouting shard)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • avgShardsPerNode

        public float avgShardsPerNode​(java.lang.String index)
        Returns the average of shards per node for the given index
      • avgShardsPerNode

        public float avgShardsPerNode()
        Returns the global average of shards per node
      • moveShards

        public 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. If a shard is moved the shard will be set to ShardRoutingState.RELOCATING and a shadow instance of this shard is created with an incremented version in the state ShardRoutingState.INITIALIZING.