public class HttpBatchReader extends Object implements ManagedReader<SchemaNegotiator>
Modifier and Type | Field and Description |
---|---|
protected String |
baseUrl |
protected ImplicitColumnUtils.ImplicitColumns |
implicitColumns |
protected Paginator |
paginator |
Constructor and Description |
---|
HttpBatchReader(HttpSubScan subScan) |
HttpBatchReader(HttpSubScan subScan,
Paginator paginator) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFilters(okhttp3.HttpUrl.Builder urlBuilder,
List<String> params,
Map<String,String> filters)
Convert equality filter conditions into HTTP query parameters
Parameters must appear in the order defined in the config.
|
protected void |
buildImplicitColumns() |
protected okhttp3.HttpUrl |
buildUrl() |
void |
close()
Release resources.
|
protected boolean |
implicitColumnsAreProjected() |
boolean |
next()
Read the next batch.
|
boolean |
open(SchemaNegotiator negotiator)
Setup the record reader.
|
protected void |
populateImplicitFieldMap(SimpleHttp http) |
protected HttpProxyConfig |
proxySettings(com.typesafe.config.Config drillConfig,
okhttp3.HttpUrl url) |
protected final Paginator paginator
protected String baseUrl
protected ImplicitColumnUtils.ImplicitColumns implicitColumns
public HttpBatchReader(HttpSubScan subScan)
public HttpBatchReader(HttpSubScan subScan, Paginator paginator)
public boolean open(SchemaNegotiator negotiator)
ManagedReader
open
in interface ManagedReader<SchemaNegotiator>
negotiator
- mechanism to negotiate select and table
schemas, then create the row set reader used to load data into
value vectorsprotected void buildImplicitColumns()
protected void populateImplicitFieldMap(SimpleHttp http)
protected boolean implicitColumnsAreProjected()
protected okhttp3.HttpUrl buildUrl()
protected void addFilters(okhttp3.HttpUrl.Builder urlBuilder, List<String> params, Map<String,String> filters)
protected HttpProxyConfig proxySettings(com.typesafe.config.Config drillConfig, okhttp3.HttpUrl url)
public boolean next()
ManagedReader
This somewhat complex protocol avoids the need to allocate a final batch just to find out that no more data is available; it allows EOF to be returned along with the final batch.
next
in interface ManagedReader<SchemaNegotiator>
public void close()
ManagedReader
close
in interface ManagedReader<SchemaNegotiator>
Copyright © 1970 The Apache Software Foundation. All rights reserved.