Class ClusterInfoSimulator

java.lang.Object
org.elasticsearch.cluster.ClusterInfoSimulator

public class ClusterInfoSimulator extends Object
  • Constructor Details

    • ClusterInfoSimulator

      public ClusterInfoSimulator(ClusterInfo clusterInfo)
  • Method Details

    • simulateShardStarted

      public void simulateShardStarted(ShardRouting shard)
      This method updates disk usage to reflect shard relocations and new replica initialization. In case of a single data path both mostAvailableSpaceUsage and leastAvailableSpaceUsage are update to reflect the change. In case of multiple data path only mostAvailableSpaceUsage as it is used in calculation in DiskThresholdDecider for allocating new shards. This assumes the worst case (all shards are placed on a single most used disk) and prevents node overflow. Balance is later recalculated with a refreshed cluster info containing actual shards placement.
    • getClusterInfo

      public ClusterInfo getClusterInfo()