Class CoreAdminRequest
java.lang.Object
org.apache.solr.client.solrj.SolrRequest<CoreAdminResponse>
org.apache.solr.client.solrj.request.CoreAdminRequest
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CoreAdminRequest.Create,CoreAdminRequest.CreateSnapshot,CoreAdminRequest.DeleteSnapshot,CoreAdminRequest.ListSnapshots,CoreAdminRequest.MergeIndexes,CoreAdminRequest.RequestRecovery,CoreAdminRequest.RequestSyncShard,CoreAdminRequest.Unload,CoreAdminRequest.WaitForState
This class is experimental and subject to change.
- Since:
- solr 1.3
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classNested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
SolrRequest.ApiVersion, SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CoreAdminParams.CoreAdminActionprotected Stringprotected booleanprotected StringFields inherited from class org.apache.solr.client.solrj.SolrRequest
SUPPORTED_METHODS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CoreAdminResponsecreateCore(String name, String instanceDir, SolrClient client) static CoreAdminResponsecreateCore(String name, String instanceDir, SolrClient client, String configFile, String schemaFile) static CoreAdminResponsecreateCore(String name, String instanceDir, SolrClient client, String configFile, String schemaFile, String dataDir, String ulogDir) protected CoreAdminResponsecreateResponse(NamedList<Object> namedList) Create a new SolrResponse to hold the response from the server.getCoreStatus(String coreName, boolean getIndexInfo, SolrClient client) getCoreStatus(String coreName, SolrClient client) The parameters for this request; never null.static CoreAdminResponsegetStatus(String name, SolrClient client) static CoreAdminResponsemergeIndexes(String name, String[] indexDirs, String[] srcCores, SolrClient client) static CoreAdminResponsereloadCore(String name, SolrClient client) static CoreAdminResponserenameCore(String coreName, String newName, SolrClient client) Rename an existing core.voidvoidsetCoreName(String coreName) final voidsetIndexInfoNeeded(boolean isIndexInfoNeeded) final voidsetOtherCoreName(String otherCoreName) static CoreAdminResponseswapCore(String core1, String core2, SolrClient client) Swap two existing cores.static CoreAdminResponseunloadCore(String name, boolean deleteIndex, boolean deleteInstanceDir, SolrClient client) static CoreAdminResponseunloadCore(String name, boolean deleteIndex, SolrClient client) static CoreAdminResponseunloadCore(String name, SolrClient client) Methods inherited from class org.apache.solr.client.solrj.SolrRequest
addHeader, addHeaders, getApiVersion, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, getHeaders, getMethod, getPath, getPreferredNodes, getQueryParams, getRequestType, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, processWithBaseUrl, requiresCollection, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setRequestType, setResponseParser, setStreamingResponseCallback, setUserPrincipal
-
Field Details
-
core
-
other
-
isIndexInfoNeeded
protected boolean isIndexInfoNeeded -
action
-
-
Constructor Details
-
CoreAdminRequest
public CoreAdminRequest() -
CoreAdminRequest
-
-
Method Details
-
setCoreName
-
setOtherCoreName
-
setIndexInfoNeeded
public final void setIndexInfoNeeded(boolean isIndexInfoNeeded) -
setAction
-
getParams
Description copied from class:SolrRequestThe parameters for this request; never null. The runtime type may be mutable but modifications may not affect thisSolrRequestinstance, as it may return a new instance here every time. If the subclass specifies the response type asModifiableSolrParams, then one can expect it to change this request. If the subclass has a setter then one can expect this method to return the value set.- Specified by:
getParamsin classSolrRequest<CoreAdminResponse>
-
createResponse
Description copied from class:SolrRequestCreate a new SolrResponse to hold the response from the server. If the response extendsSolrResponse, then there's no need to use the arguments, asSolrResponse.setResponse(NamedList)will be called right after this method.- Specified by:
createResponsein classSolrRequest<CoreAdminResponse>- Parameters:
namedList- fromSolrClient.request(SolrRequest, String).
-
reloadCore
public static CoreAdminResponse reloadCore(String name, SolrClient client) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-
unloadCore
public static CoreAdminResponse unloadCore(String name, SolrClient client) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-
unloadCore
public static CoreAdminResponse unloadCore(String name, boolean deleteIndex, SolrClient client) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-
unloadCore
public static CoreAdminResponse unloadCore(String name, boolean deleteIndex, boolean deleteInstanceDir, SolrClient client) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-
renameCore
public static CoreAdminResponse renameCore(String coreName, String newName, SolrClient client) throws SolrServerException, IOException Rename an existing core.- Throws:
IllegalArgumentException- if the new core name contains invalid characters.SolrServerExceptionIOException
-
swapCore
public static CoreAdminResponse swapCore(String core1, String core2, SolrClient client) throws SolrServerException, IOException Swap two existing cores.- Parameters:
core1- name of the first corecore2- name of the other coreclient- SolrClient to use- Returns:
- response
- Throws:
SolrServerException- if one or both cores don't existIOException- on IO errors
-
getCoreStatus
public static CoreStatusResponse.SingleCoreData getCoreStatus(String coreName, SolrClient client) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-
getCoreStatus
public static CoreStatusResponse.SingleCoreData getCoreStatus(String coreName, boolean getIndexInfo, SolrClient client) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-
getStatus
public static CoreAdminResponse getStatus(String name, SolrClient client) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-
createCore
public static CoreAdminResponse createCore(String name, String instanceDir, SolrClient client) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-
createCore
public static CoreAdminResponse createCore(String name, String instanceDir, SolrClient client, String configFile, String schemaFile) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-
createCore
public static CoreAdminResponse createCore(String name, String instanceDir, SolrClient client, String configFile, String schemaFile, String dataDir, String ulogDir) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-
mergeIndexes
public static CoreAdminResponse mergeIndexes(String name, String[] indexDirs, String[] srcCores, SolrClient client) throws SolrServerException, IOException - Throws:
SolrServerExceptionIOException
-