Package org.apache.druid.server
Class QueryResource
java.lang.Object
org.apache.druid.server.QueryResource
- All Implemented Interfaces:
QueryCountStatsProvider
- Direct Known Subclasses:
BrokerQueryResource
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringDeprecated.protected final AuthorizerMapperstatic final Stringstatic final Stringstatic final Stringstatic final StringHTTP response header name containingResponseContextserialized stringprotected final com.fasterxml.jackson.databind.ObjectMapperprotected static final EmittingLoggerstatic final EmittingLoggerstatic final Stringprotected final QueryLifecycleFactoryprotected final QuerySchedulerprotected final ResourceIOReaderWriterFactorystatic final String -
Constructor Summary
ConstructorsConstructorDescriptionQueryResource(QueryLifecycleFactory queryLifecycleFactory, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, QueryScheduler queryScheduler, AuthorizerMapper authorizerMapper, QueryResourceQueryResultPusherFactory queryResultPusherFactory, ResourceIOReaderWriterFactory resourceIOReaderWriterFactory) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsecancelQuery(String queryId, javax.servlet.http.HttpServletRequest req) javax.ws.rs.core.ResponsedoPost(InputStream in, String pretty, javax.servlet.http.HttpServletRequest req) longReturns the number of failed queries during the emission period.longReturns the number of queries interrupted due to cancellation during the emission period.longReturns the number of successful queries processed during the emission period.longReturns the number of timed out queries during the emission period.static voidtransferEntityTag(ResponseContext context, javax.ws.rs.core.Response.ResponseBuilder builder)
-
Field Details
-
log
-
NO_STACK_LOGGER
-
APPLICATION_SMILE
Deprecated.- See Also:
-
HEADER_RESPONSE_CONTEXT
HTTP response header name containingResponseContextserialized string- See Also:
-
HEADER_IF_NONE_MATCH
- See Also:
-
QUERY_ID_RESPONSE_HEADER
- See Also:
-
ERROR_MESSAGE_TRAILER_HEADER
- See Also:
-
RESPONSE_COMPLETE_TRAILER_HEADER
- See Also:
-
HEADER_ETAG
- See Also:
-
queryLifecycleFactory
-
jsonMapper
protected final com.fasterxml.jackson.databind.ObjectMapper jsonMapper -
queryScheduler
-
authorizerMapper
-
resourceIOReaderWriterFactory
-
-
Constructor Details
-
QueryResource
@Inject public QueryResource(QueryLifecycleFactory queryLifecycleFactory, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, QueryScheduler queryScheduler, AuthorizerMapper authorizerMapper, QueryResourceQueryResultPusherFactory queryResultPusherFactory, ResourceIOReaderWriterFactory resourceIOReaderWriterFactory)
-
-
Method Details
-
cancelQuery
public javax.ws.rs.core.Response cancelQuery(String queryId, @Context javax.servlet.http.HttpServletRequest req) -
doPost
@Nullable public javax.ws.rs.core.Response doPost(InputStream in, String pretty, @Context javax.servlet.http.HttpServletRequest req) throws IOException - Throws:
IOException
-
getSuccessfulQueryCount
public long getSuccessfulQueryCount()Description copied from interface:QueryCountStatsProviderReturns the number of successful queries processed during the emission period.- Specified by:
getSuccessfulQueryCountin interfaceQueryCountStatsProvider
-
getFailedQueryCount
public long getFailedQueryCount()Description copied from interface:QueryCountStatsProviderReturns the number of failed queries during the emission period.- Specified by:
getFailedQueryCountin interfaceQueryCountStatsProvider
-
getInterruptedQueryCount
public long getInterruptedQueryCount()Description copied from interface:QueryCountStatsProviderReturns the number of queries interrupted due to cancellation during the emission period.- Specified by:
getInterruptedQueryCountin interfaceQueryCountStatsProvider
-
getTimedOutQueryCount
public long getTimedOutQueryCount()Description copied from interface:QueryCountStatsProviderReturns the number of timed out queries during the emission period.- Specified by:
getTimedOutQueryCountin interfaceQueryCountStatsProvider
-
transferEntityTag
public static void transferEntityTag(ResponseContext context, javax.ws.rs.core.Response.ResponseBuilder builder)
-