Class FrameFileHttpResponseHandler

java.lang.Object
org.apache.druid.frame.file.FrameFileHttpResponseHandler
All Implemented Interfaces:
HttpResponseHandler<FrameFilePartialFetch,FrameFilePartialFetch>

public class FrameFileHttpResponseHandler extends Object implements HttpResponseHandler<FrameFilePartialFetch,FrameFilePartialFetch>
An HttpResponseHandler that streams data into a ReadableByteChunksFrameChannel. It is not required that the request actually fetches an entire frame file. The return object for this handler, FrameFilePartialFetch, allows callers to tell how much of the file was read in a particular request. This handler implements backpressure through FrameFilePartialFetch.backpressureFuture(). This allows callers to back off from issuing the next request, if appropriate. However: the handler does not implement backpressure through the HttpResponseHandler.TrafficCop mechanism. Therefore, it is important that each request retrieve a modest amount of data. The last fetch must be empty (zero content bytes) and must have the header HEADER_LAST_FETCH_NAME set to HEADER_LAST_FETCH_VALUE. Under these conditions, FrameFilePartialFetch.isLastFetch() returns true.