public class Assign extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Assign.AssignmentException
Thrown if there is an exception while assigning nodes for replicas
|
static class |
Assign.AssignRequest |
static class |
Assign.AssignRequestBuilder |
static interface |
Assign.AssignStrategy |
static class |
Assign.AssignStrategyFactory |
static class |
Assign.LegacyAssignStrategy |
static class |
Assign.PolicyBasedAssignStrategy |
static class |
Assign.RulesBasedAssignStrategy |
Constructor and Description |
---|
Assign() |
Modifier and Type | Method and Description |
---|---|
static String |
assignCoreNodeName(DistribStateManager stateManager,
DocCollection collection) |
static String |
assignShard(DocCollection collection,
Integer numShards)
Assign a new unique id up to slices count - then add replicas evenly.
|
static String |
buildSolrCoreName(DistribStateManager stateManager,
DocCollection collection,
String shard,
Replica.Type type) |
static String |
buildSolrCoreName(DistribStateManager stateManager,
DocCollection collection,
String shard,
Replica.Type type,
boolean newCollection) |
static String |
buildSolrCoreName(String collectionName,
String shard,
Replica.Type type,
int replicaNum) |
static String |
getCounterNodePath(String collection) |
static List<String> |
getLiveOrLiveAndCreateNodeSetList(Set<String> liveNodes,
ZkNodeProps message,
Random random) |
static List<ReplicaPosition> |
getNodesForNewReplicas(ClusterState clusterState,
String collectionName,
String shard,
int nrtReplicas,
int tlogReplicas,
int pullReplicas,
Object createNodeSet,
SolrCloudManager cloudManager) |
static List<ReplicaPosition> |
getPositionsUsingPolicy(String collName,
List<String> shardNames,
int nrtReplicas,
int tlogReplicas,
int pullReplicas,
String policyName,
SolrCloudManager cloudManager,
List<String> nodesList) |
static int |
incAndGetId(DistribStateManager stateManager,
String collection,
int defaultValue) |
static boolean |
usePolicyFramework(DocCollection collection,
SolrCloudManager cloudManager) |
static boolean |
usePolicyFramework(SolrCloudManager cloudManager)
Note: where possible, the
usePolicyFramework(DocCollection, SolrCloudManager) method should
be used instead of this method |
public static int incAndGetId(DistribStateManager stateManager, String collection, int defaultValue)
public static String assignCoreNodeName(DistribStateManager stateManager, DocCollection collection)
public static String assignShard(DocCollection collection, Integer numShards)
public static String buildSolrCoreName(String collectionName, String shard, Replica.Type type, int replicaNum)
public static String buildSolrCoreName(DistribStateManager stateManager, DocCollection collection, String shard, Replica.Type type, boolean newCollection)
public static String buildSolrCoreName(DistribStateManager stateManager, DocCollection collection, String shard, Replica.Type type)
public static List<String> getLiveOrLiveAndCreateNodeSetList(Set<String> liveNodes, ZkNodeProps message, Random random)
public static boolean usePolicyFramework(SolrCloudManager cloudManager) throws IOException, InterruptedException
usePolicyFramework(DocCollection, SolrCloudManager)
method should
be used instead of this methodIOException
InterruptedException
public static boolean usePolicyFramework(DocCollection collection, SolrCloudManager cloudManager) throws IOException, InterruptedException
IOException
InterruptedException
public static List<ReplicaPosition> getNodesForNewReplicas(ClusterState clusterState, String collectionName, String shard, int nrtReplicas, int tlogReplicas, int pullReplicas, Object createNodeSet, SolrCloudManager cloudManager) throws IOException, InterruptedException, Assign.AssignmentException
public static List<ReplicaPosition> getPositionsUsingPolicy(String collName, List<String> shardNames, int nrtReplicas, int tlogReplicas, int pullReplicas, String policyName, SolrCloudManager cloudManager, List<String> nodesList) throws IOException, InterruptedException, Assign.AssignmentException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.