Package org.apache.solr.servlet
Class CoordinatorHttpSolrCall
java.lang.Object
org.apache.solr.servlet.HttpSolrCall
org.apache.solr.servlet.CoordinatorHttpSolrCall
A coordinator node can serve requests as if it hosts all collections in the cluster. it does so
by hosting a synthetic replica for each configset used in the cluster.
This class is responsible for forwarding the requests to the right core when the node is acting as a Coordinator The responsibilities also involve creating a synthetic collection or replica if they do not exist. It also sets the right threadlocal variables which reflects the current collection being served.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class org.apache.solr.servlet.HttpSolrCall
action, collectionsList, config, core, cores, coreUrl, handler, INTERNAL_REQUEST_COUNT, invalidStates, origCorename, path, queryParams, req, requestType, response, retry, solrDispatchFilter, solrReq -
Constructor Summary
ConstructorsConstructorDescriptionCoordinatorHttpSolrCall(CoordinatorHttpSolrCall.Factory factory, SolrDispatchFilter solrDispatchFilter, CoreContainer cores, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, boolean retry) -
Method Summary
Modifier and TypeMethodDescriptionstatic SolrCoregetCore(CoordinatorHttpSolrCall.Factory factory, HttpSolrCall solrCall, String collectionName, boolean isPreferLeader) protected SolrCoregetCoreByCollection(String collectionName, boolean isPreferLeader) Retrieves a SolrCore instance associated with the specified collection name, with an option to prefer leader replicas.protected Stringstatic StringgetSyntheticCollectionNameFromConfig(String configName) static StringgetSyntheticCoreNameFromConfig(String configName) protected voidinit()static SolrQueryRequestwrappedReq(SolrQueryRequest delegate, String collectionName, HttpSolrCall httpSolrCall) Methods inherited from class org.apache.solr.servlet.HttpSolrCall
_getHandler, addCollectionParamIfNeeded, call, executeCoreRequest, extractHandlerFromURLPath, extractRemotePath, getCollectionsList, getCommands, getCore, getPath, getQueryParams, getRemoteCoreUrl, getReq, getResponseWriter, getSpan, getSpec, getUserAgentSolrVersion, getValidators, handleAdmin, handleAdminOrRemoteRequest, logAndFlushAdminRequest, normalizeAndSetPath, populateTracingSpan, resolveCollectionListOrAlias, resolveDocCollection, sendError, sendError, sendRemoteProxy, shouldAudit, shouldAudit, shouldAudit, shouldAudit, writeResponse
-
Field Details
-
SYNTHETIC_COLL_PREFIX
- See Also:
-
-
Constructor Details
-
CoordinatorHttpSolrCall
public CoordinatorHttpSolrCall(CoordinatorHttpSolrCall.Factory factory, SolrDispatchFilter solrDispatchFilter, CoreContainer cores, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, boolean retry)
-
-
Method Details
-
getCoreByCollection
Description copied from class:HttpSolrCallRetrieves a SolrCore instance associated with the specified collection name, with an option to prefer leader replicas. Makes a call toHttpSolrCall.resolveDocCollection(java.lang.String)which make an attempt to force update collection if it is not found in local cluster state- Overrides:
getCoreByCollectionin classHttpSolrCall
-
getCore
public static SolrCore getCore(CoordinatorHttpSolrCall.Factory factory, HttpSolrCall solrCall, String collectionName, boolean isPreferLeader) -
getSyntheticCollectionNameFromConfig
-
getSyntheticCoreNameFromConfig
-
init
- Overrides:
initin classHttpSolrCall- Throws:
Exception
-
getCoreOrColName
- Overrides:
getCoreOrColNamein classHttpSolrCall
-
wrappedReq
public static SolrQueryRequest wrappedReq(SolrQueryRequest delegate, String collectionName, HttpSolrCall httpSolrCall)
-