Class BalancedShardsAllocator.Balancer

    • Method Detail

      • avgShardsPerNode

        public float avgShardsPerNode​(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.