public class SplitQueryResponseProcessor extends Object implements ResponseProcessor
Modifier and Type | Field and Description |
---|---|
static String |
EXTRA_RETURN_FORMAT |
static String |
UNEXPECTED_INTERVAL_FORMAT |
Constructor and Description |
---|
SplitQueryResponseProcessor(ResponseProcessor next,
DataApiRequest request,
DruidAggregationQuery<?> druidQuery,
Map<org.joda.time.Interval,AtomicInteger> expectedIntervals,
RequestLog logCtx)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
HttpErrorCallback |
getErrorCallback(DruidAggregationQuery<?> druidQuery)
Callback for handling http errors.
|
FailureCallback |
getFailureCallback(DruidAggregationQuery<?> druidQuery)
Callback handler for unexpected failures.
|
ResponseContext |
getResponseContext()
The response context allows state to be injected from construction and visible across response processor
layers as necessary.
|
void |
processResponse(com.fasterxml.jackson.databind.JsonNode json,
DruidAggregationQuery<?> druidQuery,
LoggingContext metadata)
Process the response json and respond to the original web request.
|
public static final String EXTRA_RETURN_FORMAT
public static final String UNEXPECTED_INTERVAL_FORMAT
public SplitQueryResponseProcessor(ResponseProcessor next, DataApiRequest request, DruidAggregationQuery<?> druidQuery, Map<org.joda.time.Interval,AtomicInteger> expectedIntervals, RequestLog logCtx)
next
- The next delegate response processorrequest
- The request for this responsedruidQuery
- The unmodified druid query for this responseexpectedIntervals
- A map of expected interval status flagslogCtx
- The request log logging contextpublic ResponseContext getResponseContext()
ResponseProcessor
getResponseContext
in interface ResponseProcessor
public FailureCallback getFailureCallback(DruidAggregationQuery<?> druidQuery)
ResponseProcessor
getFailureCallback
in interface ResponseProcessor
druidQuery
- The query associated with this failurepublic HttpErrorCallback getErrorCallback(DruidAggregationQuery<?> druidQuery)
ResponseProcessor
getErrorCallback
in interface ResponseProcessor
druidQuery
- The query associated with this errorpublic void processResponse(com.fasterxml.jackson.databind.JsonNode json, DruidAggregationQuery<?> druidQuery, LoggingContext metadata)
ResponseProcessor
processResponse
in interface ResponseProcessor
json
- The json representing a druid data responsedruidQuery
- The query with the schema for processing this responsemetadata
- The LoggingContext to useCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.