Class RotationShardShuffler
java.lang.Object
org.elasticsearch.cluster.routing.ShardShuffler
org.elasticsearch.cluster.routing.RotationShardShuffler
Basic
ShardShuffler implementation that uses an AtomicInteger to generate seeds and uses a rotation to permute shards.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintnextSeed()Return a new seed.shuffle(List<ShardRouting> shards, int seed)Return a shuffled view over the list of shards.Methods inherited from class org.elasticsearch.cluster.routing.ShardShuffler
shuffle
-
Constructor Details
-
RotationShardShuffler
public RotationShardShuffler(int seed)
-
-
Method Details
-
nextSeed
public int nextSeed()Description copied from class:ShardShufflerReturn a new seed.- Specified by:
nextSeedin classShardShuffler
-
shuffle
Description copied from class:ShardShufflerReturn a shuffled view over the list of shards. The behavior of this method must be deterministic: if the same list and the same seed are provided twice, then the result needs to be the same.- Specified by:
shufflein classShardShuffler
-