Class AddReplicaCmd
- java.lang.Object
-
- org.apache.solr.cloud.api.collections.AddReplicaCmd
-
- All Implemented Interfaces:
OverseerCollectionMessageHandler.Cmd
public class AddReplicaCmd extends Object implements OverseerCollectionMessageHandler.Cmd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AddReplicaCmd.CreateReplica
A data structure to keep all information required to create a new replica in one place.
-
Field Summary
Fields Modifier and Type Field Description static String
SKIP_NODE_ASSIGNMENT
When AddReplica is called with this set to true, then we do not try to find node assignments for the add replica API.
-
Constructor Summary
Constructors Constructor Description AddReplicaCmd(OverseerCollectionMessageHandler ocmh)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AddReplicaCmd.CreateReplica
assignReplicaDetails(SolrCloudManager cloudManager, ClusterState clusterState, ZkNodeProps message, ReplicaPosition replicaPosition)
static List<ReplicaPosition>
buildReplicaPositions(SolrCloudManager cloudManager, ClusterState clusterState, String collectionName, ZkNodeProps message, EnumMap<Replica.Type,Integer> replicaTypeVsCount, AtomicReference<PolicyHelper.SessionWrapper> sessionWrapper)
void
call(ClusterState state, ZkNodeProps message, NamedList results)
-
-
-
Field Detail
-
SKIP_NODE_ASSIGNMENT
public static final String SKIP_NODE_ASSIGNMENT
When AddReplica is called with this set to true, then we do not try to find node assignments for the add replica API. If set to true, a valid "node" should be specified.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AddReplicaCmd
public AddReplicaCmd(OverseerCollectionMessageHandler ocmh)
-
-
Method Detail
-
call
public void call(ClusterState state, ZkNodeProps message, NamedList results) throws Exception
- Specified by:
call
in interfaceOverseerCollectionMessageHandler.Cmd
- Throws:
Exception
-
assignReplicaDetails
public static AddReplicaCmd.CreateReplica assignReplicaDetails(SolrCloudManager cloudManager, ClusterState clusterState, ZkNodeProps message, ReplicaPosition replicaPosition)
-
buildReplicaPositions
public static List<ReplicaPosition> buildReplicaPositions(SolrCloudManager cloudManager, ClusterState clusterState, String collectionName, ZkNodeProps message, EnumMap<Replica.Type,Integer> replicaTypeVsCount, AtomicReference<PolicyHelper.SessionWrapper> sessionWrapper) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-