Class ReplicaAssigner


  • public class ReplicaAssigner
    extends Object
    • Constructor Detail

      • ReplicaAssigner

        public ReplicaAssigner​(List<Rule> rules,
                               Map<String,​Integer> shardVsReplicaCount,
                               List snitches,
                               Map<String,​Map<String,​Integer>> shardVsNodes,
                               List<String> participatingLiveNodes,
                               SolrCloudManager cloudManager,
                               ClusterState clusterState)
        Parameters:
        shardVsReplicaCount - shard names vs no:of replicas required for each of those shards
        snitches - snitches details
        shardVsNodes - The current state of the system. can be an empty map if no nodes are created in this collection till now
    • Method Detail

      • getNodeMappings

        public Map<ReplicaPosition,​String> getNodeMappings()
        For each shard return a new set of nodes where the replicas need to be created satisfying the specified rule
      • permutations

        public static Iterator<int[]> permutations​(int level)
        get all permutations for the int[] whose items are 0..level
      • verifySnitchConf

        public static void verifySnitchConf​(SolrCloudManager cloudManager,
                                            List snitchConf)