public class QueryResource extends Object implements QueryCountStatsProvider
| Modifier and Type | Class and Description |
|---|---|
static interface |
QueryResource.QueryMetricCounter |
protected static class |
QueryResource.ResourceIOReaderWriter |
protected static class |
QueryResource.ResourceIOWriter |
| Modifier and Type | Field and Description |
|---|---|
protected static String |
APPLICATION_SMILE
Deprecated.
|
protected AuthorizerMapper |
authorizerMapper |
static String |
HEADER_ETAG |
static String |
HEADER_IF_NONE_MATCH |
static String |
HEADER_RESPONSE_CONTEXT
HTTP response header name containing
ResponseContext serialized string |
protected com.fasterxml.jackson.databind.ObjectMapper |
jsonMapper |
protected static EmittingLogger |
log |
static EmittingLogger |
NO_STACK_LOGGER |
static String |
QUERY_ID_RESPONSE_HEADER |
protected QueryLifecycleFactory |
queryLifecycleFactory |
protected QueryScheduler |
queryScheduler |
protected com.fasterxml.jackson.databind.ObjectMapper |
serializeDateTimeAsLongJsonMapper |
protected com.fasterxml.jackson.databind.ObjectMapper |
serializeDateTimeAsLongSmileMapper |
protected com.fasterxml.jackson.databind.ObjectMapper |
smileMapper |
| Constructor and Description |
|---|
QueryResource(QueryLifecycleFactory queryLifecycleFactory,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper,
com.fasterxml.jackson.databind.ObjectMapper smileMapper,
QueryScheduler queryScheduler,
AuthConfig authConfig,
AuthorizerMapper authorizerMapper,
ResponseContextConfig responseContextConfig,
DruidNode selfNode) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
cancelQuery(String queryId,
javax.servlet.http.HttpServletRequest req) |
protected QueryResource.ResourceIOReaderWriter |
createResourceIOReaderWriter(javax.servlet.http.HttpServletRequest req,
boolean pretty) |
javax.ws.rs.core.Response |
doPost(InputStream in,
String pretty,
javax.servlet.http.HttpServletRequest req) |
long |
getFailedQueryCount()
Returns the number of failed queries during the emission period.
|
long |
getInterruptedQueryCount()
Returns the number of queries interrupted due to cancellation during the emission period.
|
long |
getSuccessfulQueryCount()
Returns the number of successful queries processed during the emission period.
|
long |
getTimedOutQueryCount()
Returns the number of timed out queries during the emission period.
|
protected com.fasterxml.jackson.databind.ObjectMapper |
serializeDataTimeAsLong(com.fasterxml.jackson.databind.ObjectMapper mapper) |
static void |
transferEntityTag(ResponseContext context,
javax.ws.rs.core.Response.ResponseBuilder builder) |
protected static final EmittingLogger log
public static final EmittingLogger NO_STACK_LOGGER
@Deprecated protected static final String APPLICATION_SMILE
public static final String HEADER_RESPONSE_CONTEXT
ResponseContext serialized stringpublic static final String HEADER_IF_NONE_MATCH
public static final String QUERY_ID_RESPONSE_HEADER
public static final String HEADER_ETAG
protected final QueryLifecycleFactory queryLifecycleFactory
protected final com.fasterxml.jackson.databind.ObjectMapper jsonMapper
protected final com.fasterxml.jackson.databind.ObjectMapper smileMapper
protected final com.fasterxml.jackson.databind.ObjectMapper serializeDateTimeAsLongJsonMapper
protected final com.fasterxml.jackson.databind.ObjectMapper serializeDateTimeAsLongSmileMapper
protected final QueryScheduler queryScheduler
protected final AuthorizerMapper authorizerMapper
@Inject public QueryResource(QueryLifecycleFactory queryLifecycleFactory, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, com.fasterxml.jackson.databind.ObjectMapper smileMapper, QueryScheduler queryScheduler, AuthConfig authConfig, AuthorizerMapper authorizerMapper, ResponseContextConfig responseContextConfig, DruidNode selfNode)
public javax.ws.rs.core.Response cancelQuery(String queryId, @Context javax.servlet.http.HttpServletRequest req)
@Nullable public javax.ws.rs.core.Response doPost(InputStream in, String pretty, @Context javax.servlet.http.HttpServletRequest req) throws IOException
IOExceptionprotected com.fasterxml.jackson.databind.ObjectMapper serializeDataTimeAsLong(com.fasterxml.jackson.databind.ObjectMapper mapper)
protected QueryResource.ResourceIOReaderWriter createResourceIOReaderWriter(javax.servlet.http.HttpServletRequest req, boolean pretty)
public long getSuccessfulQueryCount()
QueryCountStatsProvidergetSuccessfulQueryCount in interface QueryCountStatsProviderpublic long getFailedQueryCount()
QueryCountStatsProvidergetFailedQueryCount in interface QueryCountStatsProviderpublic long getInterruptedQueryCount()
QueryCountStatsProvidergetInterruptedQueryCount in interface QueryCountStatsProviderpublic long getTimedOutQueryCount()
QueryCountStatsProvidergetTimedOutQueryCount in interface QueryCountStatsProviderpublic static void transferEntityTag(ResponseContext context, javax.ws.rs.core.Response.ResponseBuilder builder)
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.