Class SplitShardCmd
- java.lang.Object
-
- org.apache.solr.cloud.api.collections.SplitShardCmd
-
- All Implemented Interfaces:
CollApiCmds.CollectionApiCommand
public class SplitShardCmd extends Object implements CollApiCmds.CollectionApiCommand
-
-
Constructor Summary
Constructors Constructor Description SplitShardCmd(CollectionCommandContext ccc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
call(ClusterState state, ZkNodeProps message, NamedList<Object> results)
static void
checkDiskSpace(String collection, String shard, Replica parentShardLeader, SolrIndexSplitter.SplitMethod method, SolrCloudManager cloudManager)
static String
fillRanges(SolrCloudManager cloudManager, ZkNodeProps message, DocCollection collection, Slice parentSlice, List<DocRouter.Range> subRanges, List<String> subSlices, List<String> subShardNames, boolean firstReplicaNrt)
static Slice
getParentSlice(ClusterState clusterState, String collectionName, AtomicReference<String> slice, String splitKey)
static boolean
lockForSplit(SolrCloudManager cloudManager, String collection, String shard)
boolean
split(ClusterState clusterState, ZkNodeProps message, NamedList<Object> results)
static void
unlockForSplit(SolrCloudManager cloudManager, String collection, String shard)
-
-
-
Constructor Detail
-
SplitShardCmd
public SplitShardCmd(CollectionCommandContext ccc)
-
-
Method Detail
-
call
public void call(ClusterState state, ZkNodeProps message, NamedList<Object> results) throws Exception
- Specified by:
call
in interfaceCollApiCmds.CollectionApiCommand
- Throws:
Exception
-
split
public boolean split(ClusterState clusterState, ZkNodeProps message, NamedList<Object> results) throws Exception
- Throws:
Exception
-
checkDiskSpace
public static void checkDiskSpace(String collection, String shard, Replica parentShardLeader, SolrIndexSplitter.SplitMethod method, SolrCloudManager cloudManager) throws SolrException
- Throws:
SolrException
-
getParentSlice
public static Slice getParentSlice(ClusterState clusterState, String collectionName, AtomicReference<String> slice, String splitKey)
-
fillRanges
public static String fillRanges(SolrCloudManager cloudManager, ZkNodeProps message, DocCollection collection, Slice parentSlice, List<DocRouter.Range> subRanges, List<String> subSlices, List<String> subShardNames, boolean firstReplicaNrt)
-
lockForSplit
public static boolean lockForSplit(SolrCloudManager cloudManager, String collection, String shard) throws Exception
- Throws:
Exception
-
unlockForSplit
public static void unlockForSplit(SolrCloudManager cloudManager, String collection, String shard) throws Exception
- Throws:
Exception
-
-