java.lang.Object
org.elasticsearch.cluster.ClusterInfoSimulator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsimulateAlreadyStartedShard(ShardRouting startedShard, String sourceNodeId) This method simulates starting an already started shard with an optionalsourceNodeIdin case of a relocation.voidsimulateShardStarted(ShardRouting shard) This method updates disk usage to reflect shard relocations and new replica initialization.
-
Constructor Details
-
ClusterInfoSimulator
-
-
Method Details
-
simulateShardStarted
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 inDiskThresholdDeciderfor 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. -
simulateAlreadyStartedShard
This method simulates starting an already started shard with an optionalsourceNodeIdin case of a relocation.- Parameters:
startedShard- The shard to simulate. Must be started already.sourceNodeId- The source node ID if the shard started as a result of relocation.nullotherwise.
-
getClusterInfo
-