Package org.apache.druid.server
Class QueryResourceQueryResultPusherFactory.QueryResourceQueryResultPusher
java.lang.Object
org.apache.druid.server.QueryResultPusher
org.apache.druid.server.QueryResourceQueryResultPusherFactory.QueryResourceQueryResultPusher
- Enclosing class:
- QueryResourceQueryResultPusherFactory
public static class QueryResourceQueryResultPusherFactory.QueryResourceQueryResultPusher
extends QueryResultPusher
Handles query results for
QueryResource, pushing the results to the client.
It uses the provided QueryLifecycle to execute the query and writes the results via QueryResource.NativeQueryWriter.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.druid.server.QueryResultPusher
QueryResultPusher.ResultsWriter, QueryResultPusher.StreamingHttpResponseAccumulator, QueryResultPusher.Writer -
Field Summary
Fields inherited from class org.apache.druid.server.QueryResultPusher
RESULT_TRAILER_HEADERS -
Constructor Summary
ConstructorsConstructorDescriptionQueryResourceQueryResultPusher(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, ResponseContextConfig responseContextConfig, DruidNode selfNode, QueryResource.QueryMetricCounter counter, javax.servlet.http.HttpServletRequest req, QueryLifecycle queryLifecycle, ResourceIOReaderWriterFactory.ResourceIOReaderWriter io) -
Method Summary
Modifier and TypeMethodDescriptionstart()Builds a ResultsWriter to start the lifecycle of the QueryResultPusher.voidwriteException(Exception e, OutputStream out) Methods inherited from class org.apache.druid.server.QueryResultPusher
handleDruidExceptionBeforeResponseStarted, push
-
Constructor Details
-
QueryResourceQueryResultPusher
public QueryResourceQueryResultPusher(com.fasterxml.jackson.databind.ObjectMapper jsonMapper, ResponseContextConfig responseContextConfig, DruidNode selfNode, QueryResource.QueryMetricCounter counter, javax.servlet.http.HttpServletRequest req, QueryLifecycle queryLifecycle, ResourceIOReaderWriterFactory.ResourceIOReaderWriter io)
-
-
Method Details
-
start
Description copied from class:QueryResultPusherBuilds a ResultsWriter to start the lifecycle of the QueryResultPusher. The ResultsWriter encapsulates the logic to run the query, serialize it and also report success/failure.This response must not be null. The job of this ResultsWriter is largely to provide lifecycle management to the query running and reporting, so this object must never be null.
This start() method should do as little work as possible, it should really just make the ResultsWriter and return.
- Specified by:
startin classQueryResultPusher- Returns:
- a new ResultsWriter
-
writeException
- Specified by:
writeExceptionin classQueryResultPusher- Throws:
IOException
-