Class QueryResultPusher.StreamingHttpResponseAccumulator

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.druid.java.util.common.guava.Accumulator<javax.ws.rs.core.Response,​Object>
    Enclosing class:
    QueryResultPusher

    public class QueryResultPusher.StreamingHttpResponseAccumulator
    extends Object
    implements org.apache.druid.java.util.common.guava.Accumulator<javax.ws.rs.core.Response,​Object>, Closeable
    • Constructor Detail

      • StreamingHttpResponseAccumulator

        public StreamingHttpResponseAccumulator​(org.apache.druid.query.context.ResponseContext responseContext,
                                                QueryResultPusher.ResultsWriter resultsWriter)
    • Method Detail

      • getNumBytesSent

        public long getNumBytesSent()
      • isInitialized

        public boolean isInitialized()
      • initialize

        public void initialize()
        Initializes the response. This is done lazily so that we can put various metadata that we only get once we have some of the response stream into the result.

        It is okay for this to be called multiple times.

      • accumulate

        @Nullable
        public javax.ws.rs.core.Response accumulate​(javax.ws.rs.core.Response retVal,
                                                    Object in)
        Specified by:
        accumulate in interface org.apache.druid.java.util.common.guava.Accumulator<javax.ws.rs.core.Response,​Object>