public class SearchHandler
extends com.yahoo.container.jdisc.LoggingRequestHandler
Modifier and Type | Class and Description |
---|---|
private class |
SearchHandler.MeanConnections |
Modifier and Type | Field and Description |
---|---|
static String |
defaultSearchChainName |
private static com.yahoo.processing.request.CompoundName |
DETAILED_TIMING_LOGGING |
private static String |
fallbackSearchChain |
private static com.yahoo.processing.request.CompoundName |
FORCE_TIMESTAMPS |
private Optional<String> |
hostResponseHeaderKey
If present, responses from this will set the HTTP response header with this key to the host name of this
|
private IndexFacts |
indexFacts |
private com.yahoo.language.Linguistics |
linguistics |
private static Logger |
log |
private int |
maxThreads |
private CompiledQueryProfileRegistry |
queryProfileRegistry |
private RendererRegistry |
rendererRegistry |
private AtomicInteger |
requestsInFlight |
private static String |
SEARCH_CONNECTIONS
Event name for number of connections to the search subsystem
|
private SearchChainRegistry |
searchChainRegistry |
private com.yahoo.statistics.Value |
searchConnections |
private String |
selfHostname |
private SpecialTokenRegistry |
specialTokens |
Constructor and Description |
---|
SearchHandler(com.yahoo.container.core.ChainsConfig chainsConfig,
IndexInfoConfig indexInfo,
com.yahoo.container.QrSearchersConfig clusters,
com.yahoo.vespa.configdefinition.SpecialtokensConfig specialTokens,
com.yahoo.container.core.QrTemplatesConfig ignored,
com.yahoo.container.protect.FreezeDetector ignored2,
com.yahoo.statistics.Statistics statistics,
com.yahoo.language.Linguistics linguistics,
com.yahoo.jdisc.Metric metric,
com.yahoo.component.provider.ComponentRegistry<com.yahoo.processing.rendering.Renderer> renderers,
Executor executor,
com.yahoo.container.logging.AccessLog accessLog,
QueryProfilesConfig queryProfileConfig,
com.yahoo.component.provider.ComponentRegistry<Searcher> searchers)
Deprecated.
use the constructor without deprecated parameters
|
SearchHandler(com.yahoo.container.core.ChainsConfig chainsConfig,
IndexInfoConfig indexInfo,
com.yahoo.container.QrSearchersConfig clusters,
com.yahoo.vespa.configdefinition.SpecialtokensConfig specialtokens,
com.yahoo.statistics.Statistics statistics,
com.yahoo.language.Linguistics linguistics,
com.yahoo.jdisc.Metric metric,
com.yahoo.component.provider.ComponentRegistry<com.yahoo.processing.rendering.Renderer> renderers,
Executor executor,
com.yahoo.container.logging.AccessLog accessLog,
QueryProfilesConfig queryProfileConfig,
com.yahoo.component.provider.ComponentRegistry<Searcher> searchers)
Deprecated.
use the constructor with ContainerHttpConfig
|
SearchHandler(com.yahoo.container.core.ChainsConfig chainsConfig,
IndexInfoConfig indexInfo,
com.yahoo.container.QrSearchersConfig clusters,
com.yahoo.vespa.configdefinition.SpecialtokensConfig specialtokens,
com.yahoo.statistics.Statistics statistics,
com.yahoo.language.Linguistics linguistics,
com.yahoo.jdisc.Metric metric,
com.yahoo.component.provider.ComponentRegistry<com.yahoo.processing.rendering.Renderer> renderers,
Executor executor,
com.yahoo.container.logging.AccessLog accessLog,
QueryProfilesConfig queryProfileConfig,
com.yahoo.component.provider.ComponentRegistry<Searcher> searchers,
com.yahoo.container.core.ContainerHttpConfig containerHttpConfig) |
Modifier and Type | Method and Description |
---|---|
private void |
connectionStatistics() |
protected void |
destroy() |
private void |
ensureQuerySet(Result result,
Query fallbackQuery) |
private com.yahoo.container.jdisc.HttpResponse |
errorResponse(com.yahoo.container.jdisc.HttpRequest request,
ErrorMessage errorMessage) |
private static int |
examineExecutor(Executor executor) |
private static int |
getErrors(Result result) |
private int |
getHttpResponseStatus(com.yahoo.container.jdisc.HttpRequest httpRequest,
Result result) |
com.yahoo.processing.rendering.Renderer<Result> |
getRendererCopy(com.yahoo.component.ComponentSpecification spec)
Deprecated.
remove on Vespa 7
|
SearchChainRegistry |
getSearchChainRegistry() |
com.yahoo.container.jdisc.HttpResponse |
handle(com.yahoo.container.jdisc.HttpRequest request) |
private HttpSearchResponse |
handleBody(com.yahoo.container.jdisc.HttpRequest request) |
private com.yahoo.container.jdisc.HttpResponse |
illegalQueryResponse(com.yahoo.container.jdisc.HttpRequest request,
RuntimeException e) |
private com.yahoo.container.jdisc.HttpResponse |
internalServerErrorResponse(com.yahoo.container.jdisc.HttpRequest request,
RuntimeException e) |
private com.yahoo.container.jdisc.HttpResponse |
invalidParameterResponse(com.yahoo.container.jdisc.HttpRequest request,
RuntimeException e) |
private void |
log(String request,
Query query,
Throwable e) |
private com.yahoo.processing.rendering.Renderer<Result> |
perRenderingCopy(com.yahoo.processing.rendering.Renderer<Result> renderer) |
private com.yahoo.collections.Tuple2<String,com.yahoo.component.chain.Chain<Searcher>> |
resolveChain(String explicitChainName) |
private Result |
search(String request,
Query query,
com.yahoo.component.chain.Chain<Searcher> searchChain,
SearchChainRegistry registry) |
Result |
searchAndFill(Query query,
com.yahoo.component.chain.Chain<? extends Searcher> searchChain,
SearchChainRegistry registry)
Used from container SDK, for internal use only
|
private void |
setupSearchChainRegistry(com.yahoo.component.provider.ComponentRegistry<Searcher> searchers,
com.yahoo.container.core.ChainsConfig chainsConfig) |
private String |
threadConsumptionMessage(int connections,
int maxThreads,
String percentage) |
private com.yahoo.processing.rendering.Renderer<Result> |
toRendererCopy(com.yahoo.component.ComponentSpecification format) |
private void |
traceExecutionTimes(Query query,
Result result) |
private void |
traceRequestAttributes(Query query) |
private void |
traceVespaVersion(Query query) |
private Result |
validateQuery(Query query) |
createLoggingCompletionHandler
addDateHeader, asHttpRequest, handle, handleRequest
getTimeout, handleRequest
currentState, refer, release, retainCount
private final AtomicInteger requestsInFlight
private final int maxThreads
private static final com.yahoo.processing.request.CompoundName DETAILED_TIMING_LOGGING
private static final String SEARCH_CONNECTIONS
private static Logger log
private com.yahoo.statistics.Value searchConnections
private final SearchChainRegistry searchChainRegistry
private final RendererRegistry rendererRegistry
private final IndexFacts indexFacts
private final SpecialTokenRegistry specialTokens
public static final String defaultSearchChainName
private static final String fallbackSearchChain
private static final com.yahoo.processing.request.CompoundName FORCE_TIMESTAMPS
private final com.yahoo.language.Linguistics linguistics
private final CompiledQueryProfileRegistry queryProfileRegistry
private final Optional<String> hostResponseHeaderKey
private final String selfHostname
@Inject public SearchHandler(com.yahoo.container.core.ChainsConfig chainsConfig, IndexInfoConfig indexInfo, com.yahoo.container.QrSearchersConfig clusters, com.yahoo.vespa.configdefinition.SpecialtokensConfig specialtokens, com.yahoo.statistics.Statistics statistics, com.yahoo.language.Linguistics linguistics, com.yahoo.jdisc.Metric metric, com.yahoo.component.provider.ComponentRegistry<com.yahoo.processing.rendering.Renderer> renderers, Executor executor, com.yahoo.container.logging.AccessLog accessLog, QueryProfilesConfig queryProfileConfig, com.yahoo.component.provider.ComponentRegistry<Searcher> searchers, com.yahoo.container.core.ContainerHttpConfig containerHttpConfig)
@Deprecated public SearchHandler(com.yahoo.container.core.ChainsConfig chainsConfig, IndexInfoConfig indexInfo, com.yahoo.container.QrSearchersConfig clusters, com.yahoo.vespa.configdefinition.SpecialtokensConfig specialtokens, com.yahoo.statistics.Statistics statistics, com.yahoo.language.Linguistics linguistics, com.yahoo.jdisc.Metric metric, com.yahoo.component.provider.ComponentRegistry<com.yahoo.processing.rendering.Renderer> renderers, Executor executor, com.yahoo.container.logging.AccessLog accessLog, QueryProfilesConfig queryProfileConfig, com.yahoo.component.provider.ComponentRegistry<Searcher> searchers)
@Deprecated public SearchHandler(com.yahoo.container.core.ChainsConfig chainsConfig, IndexInfoConfig indexInfo, com.yahoo.container.QrSearchersConfig clusters, com.yahoo.vespa.configdefinition.SpecialtokensConfig specialTokens, com.yahoo.container.core.QrTemplatesConfig ignored, com.yahoo.container.protect.FreezeDetector ignored2, com.yahoo.statistics.Statistics statistics, com.yahoo.language.Linguistics linguistics, com.yahoo.jdisc.Metric metric, com.yahoo.component.provider.ComponentRegistry<com.yahoo.processing.rendering.Renderer> renderers, Executor executor, com.yahoo.container.logging.AccessLog accessLog, QueryProfilesConfig queryProfileConfig, com.yahoo.component.provider.ComponentRegistry<Searcher> searchers)
protected void destroy()
destroy
in class com.yahoo.jdisc.AbstractResource
private void setupSearchChainRegistry(com.yahoo.component.provider.ComponentRegistry<Searcher> searchers, com.yahoo.container.core.ChainsConfig chainsConfig)
private static int examineExecutor(Executor executor)
public final com.yahoo.container.jdisc.HttpResponse handle(com.yahoo.container.jdisc.HttpRequest request)
handle
in class com.yahoo.container.jdisc.ThreadedHttpRequestHandler
private int getHttpResponseStatus(com.yahoo.container.jdisc.HttpRequest httpRequest, Result result)
private com.yahoo.container.jdisc.HttpResponse errorResponse(com.yahoo.container.jdisc.HttpRequest request, ErrorMessage errorMessage)
private com.yahoo.container.jdisc.HttpResponse invalidParameterResponse(com.yahoo.container.jdisc.HttpRequest request, RuntimeException e)
private com.yahoo.container.jdisc.HttpResponse illegalQueryResponse(com.yahoo.container.jdisc.HttpRequest request, RuntimeException e)
private com.yahoo.container.jdisc.HttpResponse internalServerErrorResponse(com.yahoo.container.jdisc.HttpRequest request, RuntimeException e)
private HttpSearchResponse handleBody(com.yahoo.container.jdisc.HttpRequest request)
private static int getErrors(Result result)
@NonNull private com.yahoo.processing.rendering.Renderer<Result> toRendererCopy(com.yahoo.component.ComponentSpecification format)
private com.yahoo.collections.Tuple2<String,com.yahoo.component.chain.Chain<Searcher>> resolveChain(String explicitChainName)
public Result searchAndFill(Query query, com.yahoo.component.chain.Chain<? extends Searcher> searchChain, SearchChainRegistry registry)
private void traceRequestAttributes(Query query)
@Deprecated public com.yahoo.processing.rendering.Renderer<Result> getRendererCopy(com.yahoo.component.ComponentSpecification spec)
@NonNull private com.yahoo.processing.rendering.Renderer<Result> perRenderingCopy(com.yahoo.processing.rendering.Renderer<Result> renderer)
private Result search(String request, Query query, com.yahoo.component.chain.Chain<Searcher> searchChain, SearchChainRegistry registry)
private void connectionStatistics()
private String threadConsumptionMessage(int connections, int maxThreads, String percentage)
private void traceVespaVersion(Query query)
public SearchChainRegistry getSearchChainRegistry()
Copyright © 2017. All rights reserved.