Class CreateShardAPI
- java.lang.Object
-
- org.apache.solr.api.JerseyResource
-
- org.apache.solr.handler.admin.api.AdminAPIBase
-
- org.apache.solr.handler.admin.api.CreateShardAPI
-
@Path("/collections/{collectionName}/shards") public class CreateShardAPI extends AdminAPIBase
V2 API for creating a new shard in a collection.This API (POST /v2/collections/collectionName/shards {...}) is analogous to the v1 /admin/collections?action=CREATESHARD command.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CreateShardAPI.CreateShardRequestBody
-
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 CreateShardAPI(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, CreateShardAPI.CreateShardRequestBody requestBody)
SubResponseAccumulatingJerseyResponse
createShard(String collectionName, CreateShardAPI.CreateShardRequestBody requestBody)
static void
invokeFromV1Params(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
-
CreateShardAPI
@Inject public CreateShardAPI(CoreContainer coreContainer, SolrQueryRequest solrQueryRequest, SolrQueryResponse solrQueryResponse)
-
-
Method Detail
-
createShard
@POST @Produces({"application/json","application/xml","application/vnd.apache.solr.javabin"}) public SubResponseAccumulatingJerseyResponse createShard(@PathParam("collectionName") String collectionName, CreateShardAPI.CreateShardRequestBody requestBody) throws Exception
- Throws:
Exception
-
invokeFromV1Params
public static void invokeFromV1Params(CoreContainer coreContainer, SolrQueryRequest solrQueryRequest, SolrQueryResponse solrQueryResponse) throws Exception
- Throws:
Exception
-
createRemoteMessage
public static org.apache.solr.common.cloud.ZkNodeProps createRemoteMessage(String collectionName, CreateShardAPI.CreateShardRequestBody requestBody)
-
-