public class ReplicaAssigner extends Object
Modifier and Type | Field and Description |
---|---|
Map<String,SnitchContext> |
failedNodes |
Constructor and Description |
---|
ReplicaAssigner(List<Rule> rules,
Map<String,Integer> shardVsReplicaCount,
List snitches,
Map<String,Map<String,Integer>> shardVsNodes,
List<String> participatingLiveNodes,
SolrCloudManager cloudManager,
ClusterState clusterState) |
Modifier and Type | Method and Description |
---|---|
Map<ReplicaPosition,String> |
getNodeMappings()
For each shard return a new set of nodes where the replicas need to be created satisfying
the specified rule
|
Map<String,Map<String,Object>> |
getNodeVsTags() |
protected SnitchContext |
getSnitchCtx(String node,
org.apache.solr.cloud.rule.ReplicaAssigner.SnitchInfoImpl info,
SolrCloudManager cloudManager) |
static Iterator<int[]> |
permutations(int level)
get all permutations for the int[] whose items are 0..level
|
static void |
verifySnitchConf(SolrCloudManager cloudManager,
List snitchConf) |
public Map<String,SnitchContext> failedNodes
public ReplicaAssigner(List<Rule> rules, Map<String,Integer> shardVsReplicaCount, List snitches, Map<String,Map<String,Integer>> shardVsNodes, List<String> participatingLiveNodes, SolrCloudManager cloudManager, ClusterState clusterState)
shardVsReplicaCount
- shard names vs no:of replicas required for each of those shardssnitches
- snitches detailsshardVsNodes
- The current state of the system. can be an empty map if no nodes
are created in this collection till nowpublic Map<ReplicaPosition,String> getNodeMappings()
public static Iterator<int[]> permutations(int level)
protected SnitchContext getSnitchCtx(String node, org.apache.solr.cloud.rule.ReplicaAssigner.SnitchInfoImpl info, SolrCloudManager cloudManager)
public static void verifySnitchConf(SolrCloudManager cloudManager, List snitchConf)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.