Class InstallShardDataAPI
- java.lang.Object
-
- org.apache.solr.api.JerseyResource
-
- org.apache.solr.handler.admin.api.AdminAPIBase
-
- org.apache.solr.handler.admin.api.InstallShardDataAPI
-
@Path("/collections/{collName}/shards/{shardName}/install") public class InstallShardDataAPI extends AdminAPIBase
A V2 API that allows users to import an index constructed offline into a shard of their collectionParticularly useful for installing (per-shard) indices constructed offline into a SolrCloud deployment. Callers are required to put the collection into read-only mode prior to installing data into any shards of that collection, and should exit read only mode when completed.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InstallShardDataAPI.InstallShardRequestBody
-
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 InstallShardDataAPI(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, InstallShardDataAPI.InstallShardRequestBody requestBody)
static void
ensureCollectionAndShardExist(org.apache.solr.common.cloud.ClusterState clusterState, String collectionName, String shardName)
SolrJerseyResponse
installShardData(String collName, String shardName, InstallShardDataAPI.InstallShardRequestBody requestBody)
-
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
-
InstallShardDataAPI
@Inject public InstallShardDataAPI(CoreContainer coreContainer, SolrQueryRequest solrQueryRequest, SolrQueryResponse solrQueryResponse)
-
-
Method Detail
-
installShardData
@POST @Produces({"application/json","application/xml","application/vnd.apache.solr.javabin"}) public SolrJerseyResponse installShardData(@PathParam("collName") String collName, @PathParam("shardName") String shardName, InstallShardDataAPI.InstallShardRequestBody requestBody) throws Exception
- Throws:
Exception
-
ensureCollectionAndShardExist
public static void ensureCollectionAndShardExist(org.apache.solr.common.cloud.ClusterState clusterState, String collectionName, String shardName)
-
createRemoteMessage
public static org.apache.solr.common.cloud.ZkNodeProps createRemoteMessage(String collectionName, String shardName, InstallShardDataAPI.InstallShardRequestBody requestBody)
-
-