public class HttpBatchReader extends Object implements ManagedReader<SchemaNegotiator>
Constructor and Description |
---|
HttpBatchReader(HttpSubScan subScan) |
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 okhttp3.HttpUrl |
buildUrl() |
void |
close()
Release resources.
|
boolean |
next()
Read the next batch.
|
boolean |
open(SchemaNegotiator negotiator)
Setup the record reader.
|
protected HttpProxyConfig |
proxySettings(com.typesafe.config.Config drillConfig,
okhttp3.HttpUrl url) |
public HttpBatchReader(HttpSubScan subScan)
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 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 © 2021 The Apache Software Foundation. All rights reserved.