Class DeleteReplica
- java.lang.Object
-
- org.apache.solr.api.JerseyResource
-
- org.apache.solr.handler.admin.api.AdminAPIBase
-
- org.apache.solr.handler.admin.api.DeleteReplica
-
- All Implemented Interfaces:
DeleteReplicaApi
public class DeleteReplica extends AdminAPIBase implements DeleteReplicaApi
V2 APIs for deleting one or more existing replicas from one or more shards.These APIs are analogous to the v1 /admin/collections?action=DELETEREPLICA command.
-
-
Field Summary
-
Fields inherited from class org.apache.solr.handler.admin.api.AdminAPIBase
coreContainer, solrQueryRequest, solrQueryResponse
-
Fields inherited from class org.apache.solr.api.JerseyResource
containerRequestContext
-
-
Constructor Summary
Constructors Constructor Description DeleteReplica(CoreContainer coreContainer, SolrQueryRequest solrQueryRequest, SolrQueryResponse solrQueryResponse)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.apache.solr.common.cloud.ZkNodeProps
createRemoteMessage(String collectionName, String shardName, String replicaName, Integer numReplicasToDelete, Boolean followAliases, Boolean deleteInstanceDir, Boolean deleteDataDir, Boolean deleteIndex, Boolean onlyIfDown, String asyncId)
static ScaleCollectionRequestBody
createScaleRequestBodyFromV1Params(org.apache.solr.common.params.SolrParams v1Params)
SubResponseAccumulatingJerseyResponse
deleteReplicaByName(String collectionName, String shardName, String replicaName, Boolean followAliases, Boolean deleteInstanceDir, Boolean deleteDataDir, Boolean deleteIndex, Boolean onlyIfDown, String async)
SubResponseAccumulatingJerseyResponse
deleteReplicasByCount(String collectionName, String shardName, Integer numToDelete, Boolean followAliases, Boolean deleteInstanceDir, Boolean deleteDataDir, Boolean deleteIndex, Boolean onlyIfDown, String asyncId)
SubResponseAccumulatingJerseyResponse
deleteReplicasByCountAllShards(String collectionName, ScaleCollectionRequestBody requestBody)
static void
invokeWithV1Params(CoreContainer coreContainer, SolrQueryRequest solrQueryRequest, SolrQueryResponse solrQueryResponse)
-
Methods inherited from class org.apache.solr.handler.admin.api.AdminAPIBase
disableResponseCaching, fetchAndValidateZooKeeperAwareCoreContainer, insertIfNotNull, recordCollectionForLogAndTracing, resolveAndValidateAliasIfEnabled, resolveCollectionName, submitRemoteMessageAndHandleResponse, validateZooKeeperAwareCoreContainer
-
Methods inherited from class org.apache.solr.api.JerseyResource
ensureRequiredParameterProvided, ensureRequiredRequestBodyProvided, instantiateJerseyResponse, instantiateJerseyResponse
-
-
-
-
Constructor Detail
-
DeleteReplica
@Inject public DeleteReplica(CoreContainer coreContainer, SolrQueryRequest solrQueryRequest, SolrQueryResponse solrQueryResponse)
-
-
Method Detail
-
deleteReplicaByName
public SubResponseAccumulatingJerseyResponse deleteReplicaByName(String collectionName, String shardName, String replicaName, Boolean followAliases, Boolean deleteInstanceDir, Boolean deleteDataDir, Boolean deleteIndex, Boolean onlyIfDown, String async) throws Exception
- Specified by:
deleteReplicaByName
in interfaceDeleteReplicaApi
- Throws:
Exception
-
deleteReplicasByCount
public SubResponseAccumulatingJerseyResponse deleteReplicasByCount(String collectionName, String shardName, Integer numToDelete, Boolean followAliases, Boolean deleteInstanceDir, Boolean deleteDataDir, Boolean deleteIndex, Boolean onlyIfDown, String asyncId) throws Exception
- Specified by:
deleteReplicasByCount
in interfaceDeleteReplicaApi
- Throws:
Exception
-
createScaleRequestBodyFromV1Params
public static ScaleCollectionRequestBody createScaleRequestBodyFromV1Params(org.apache.solr.common.params.SolrParams v1Params)
-
deleteReplicasByCountAllShards
public SubResponseAccumulatingJerseyResponse deleteReplicasByCountAllShards(String collectionName, ScaleCollectionRequestBody requestBody) throws Exception
- Specified by:
deleteReplicasByCountAllShards
in interfaceDeleteReplicaApi
- Throws:
Exception
-
createRemoteMessage
public static org.apache.solr.common.cloud.ZkNodeProps createRemoteMessage(String collectionName, String shardName, String replicaName, Integer numReplicasToDelete, Boolean followAliases, Boolean deleteInstanceDir, Boolean deleteDataDir, Boolean deleteIndex, Boolean onlyIfDown, String asyncId)
-
invokeWithV1Params
public static void invokeWithV1Params(CoreContainer coreContainer, SolrQueryRequest solrQueryRequest, SolrQueryResponse solrQueryResponse) throws Exception
- Throws:
Exception
-
-