Class InstallShardData
- java.lang.Object
-
- org.apache.solr.api.JerseyResource
-
- org.apache.solr.handler.admin.api.AdminAPIBase
-
- org.apache.solr.handler.admin.api.InstallShardData
-
- All Implemented Interfaces:
InstallShardDataApi
public class InstallShardData extends AdminAPIBase implements InstallShardDataApi
V2 API implementation allowing users to import offline-constructed index into a shard.Particularly 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.
-
-
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 InstallShardData(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, InstallShardDataRequestBody requestBody)
static void
ensureCollectionAndShardExist(org.apache.solr.common.cloud.ClusterState clusterState, String collectionName, String shardName)
SolrJerseyResponse
installShardData(String collName, String shardName, InstallShardDataRequestBody 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
-
InstallShardData
@Inject public InstallShardData(CoreContainer coreContainer, SolrQueryRequest solrQueryRequest, SolrQueryResponse solrQueryResponse)
-
-
Method Detail
-
installShardData
public SolrJerseyResponse installShardData(String collName, String shardName, InstallShardDataRequestBody requestBody) throws Exception
- Specified by:
installShardData
in interfaceInstallShardDataApi
- 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, InstallShardDataRequestBody requestBody)
-
-