Class V2HttpCall
- Direct Known Subclasses:
CoordinatorV2HttpSolrCall
-
Nested Class Summary
Nested Classes -
Field Summary
Fields 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
ConstructorsConstructorDescriptionV2HttpCall(SolrDispatchFilter solrDispatchFilter, CoreContainer cc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, boolean retry) -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectprotected voidExecutes the API or Jersey resource corresponding to a core-level request.static ApigetApiInfo(PluginBag<SolrRequestHandler> requestHandlers, String path, String method, String fullPath, Map<String, String> parts) protected org.apache.solr.common.util.ValidatingJsonMapgetSpec()protected voidhandleAdmin(SolrQueryResponse solrResp) protected voidDifferentiate between "admin" and "remoteproxy"-type requests; executing each as appropriate.protected voidinit()protected voidprotected voidpopulateTracingSpan(io.opentelemetry.api.trace.Span span) protected voidwriteResponse(SolrQueryResponse solrRsp, QueryResponseWriter responseWriter, Method reqMethod) Methods inherited from class org.apache.solr.servlet.HttpSolrCall
addCollectionParamIfNeeded, call, extractHandlerFromURLPath, extractRemotePath, getCollectionsList, getCommands, getCore, getCoreByCollection, getCoreOrColName, getPath, getQueryParams, getRemoteCoreUrl, getReq, getResponseWriter, getSpan, getUserAgentSolrVersion, logAndFlushAdminRequest, normalizeAndSetPath, resolveCollectionListOrAlias, resolveDocCollection, sendError, sendError, sendRemoteProxy, shouldAudit, shouldAudit, shouldAudit, shouldAudit
-
Constructor Details
-
V2HttpCall
public V2HttpCall(SolrDispatchFilter solrDispatchFilter, CoreContainer cc, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, boolean retry)
-
-
Method Details
-
init
- Overrides:
initin classHttpSolrCall- Throws:
Exception
-
parseRequest
- Throws:
Exception
-
getApiInfo
-
getPathSegments
-
handleAdminOrRemoteRequest
Differentiate between "admin" and "remoteproxy"-type requests; executing each as appropriate.The JAX-RS framework used by
V2HttpCalldoesn't provide any easy way to check in advance whether a Jersey application can handle an incoming request. This, in turn, makes it difficult to classify requests as being "admin" or "core, "local" or "remote". The only option is to submit the request to the JAX-RS application and see whether a quick "404" flag comes back, or not.This method uses this strategy to differentiate between admin requests that don't require a
SolrCore, but whose path happen to contain a core/collection name (e.g. ADDREPLICAPROP's path of /collections/collName/shards/shardName/replicas/replicaName/properties), and "REMOTEPROXY" requests which do require a local SolrCore to process.- Overrides:
handleAdminOrRemoteRequestin classHttpSolrCall- Throws:
IOException- See Also:
-
handleAdmin
- Overrides:
handleAdminin classHttpSolrCall
-
executeCoreRequest
Executes the API or Jersey resource corresponding to a core-level request.Api-based endpoints do this by invokingApi.call(SolrQueryRequest, SolrQueryResponse).JAX-RS-based endpoints must check both the core-level and container-level JAX-RS applications as the resource for a given "core-level request" might be registered in either place, depending on various legacy factors like the request handler it is associated with. In support of this, the JAX-RS codepath sets a flag to suppress the normal 404 error response when checking the first of the two JAX-RS applications.
- Overrides:
executeCoreRequestin classHttpSolrCall- See Also:
-
populateTracingSpan
protected void populateTracingSpan(io.opentelemetry.api.trace.Span span) - Overrides:
populateTracingSpanin classHttpSolrCall
-
writeResponse
protected void writeResponse(SolrQueryResponse solrRsp, QueryResponseWriter responseWriter, Method reqMethod) throws IOException - Overrides:
writeResponsein classHttpSolrCall- Throws:
IOException
-
_getHandler
- Overrides:
_getHandlerin classHttpSolrCall
-
getUrlParts
-
getSpec
protected org.apache.solr.common.util.ValidatingJsonMap getSpec()- Overrides:
getSpecin classHttpSolrCall
-
getValidators
- Overrides:
getValidatorsin classHttpSolrCall
-