Class BaseFlightReader
- java.lang.Object
-
- org.apache.arrow.vector.ipc.ArrowReader
-
- org.apache.arrow.adbc.driver.flightsql.BaseFlightReader
-
- All Implemented Interfaces:
AutoCloseable,org.apache.arrow.vector.dictionary.DictionaryProvider
- Direct Known Subclasses:
FlightInfoReader
public abstract class BaseFlightReader extends org.apache.arrow.vector.ipc.ArrowReaderBase class for ArrowReaders based on consuming data from FlightEndpoints.
-
-
Field Summary
Fields Modifier and Type Field Description protected FlightSqlClientWithCallOptionsclientprotected com.github.benmanes.caffeine.cache.LoadingCache<org.apache.arrow.flight.Location,FlightSqlClientWithCallOptions>clientCache
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseFlightReader(org.apache.arrow.memory.BufferAllocator allocator, FlightSqlClientWithCallOptions client, com.github.benmanes.caffeine.cache.LoadingCache<org.apache.arrow.flight.Location,FlightSqlClientWithCallOptions> clientCache, Supplier<List<org.apache.arrow.flight.FlightEndpoint>> rpcCall)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddBytesRead(long bytes)longbytesRead()protected voidcloseReadSource()booleanloadNextBatch()protected voidloadRoot(org.apache.arrow.vector.VectorSchemaRoot root)protected voidpopulateEndpointData()protected abstract voidprocessRootFromStream(org.apache.arrow.vector.VectorSchemaRoot root)protected org.apache.arrow.vector.types.pojo.SchemareadSchema()
-
-
-
Field Detail
-
client
protected final FlightSqlClientWithCallOptions client
-
clientCache
protected final com.github.benmanes.caffeine.cache.LoadingCache<org.apache.arrow.flight.Location,FlightSqlClientWithCallOptions> clientCache
-
-
Constructor Detail
-
BaseFlightReader
protected BaseFlightReader(org.apache.arrow.memory.BufferAllocator allocator, FlightSqlClientWithCallOptions client, com.github.benmanes.caffeine.cache.LoadingCache<org.apache.arrow.flight.Location,FlightSqlClientWithCallOptions> clientCache, Supplier<List<org.apache.arrow.flight.FlightEndpoint>> rpcCall)
-
-
Method Detail
-
loadNextBatch
public boolean loadNextBatch() throws IOException- Specified by:
loadNextBatchin classorg.apache.arrow.vector.ipc.ArrowReader- Throws:
IOException
-
readSchema
protected org.apache.arrow.vector.types.pojo.Schema readSchema() throws IOException- Specified by:
readSchemain classorg.apache.arrow.vector.ipc.ArrowReader- Throws:
IOException
-
bytesRead
public long bytesRead()
- Specified by:
bytesReadin classorg.apache.arrow.vector.ipc.ArrowReader
-
closeReadSource
protected void closeReadSource() throws IOException- Specified by:
closeReadSourcein classorg.apache.arrow.vector.ipc.ArrowReader- Throws:
IOException
-
processRootFromStream
protected abstract void processRootFromStream(org.apache.arrow.vector.VectorSchemaRoot root)
-
addBytesRead
protected void addBytesRead(long bytes)
-
populateEndpointData
protected void populateEndpointData() throws AdbcException- Throws:
AdbcException
-
loadRoot
protected void loadRoot(org.apache.arrow.vector.VectorSchemaRoot root)
-
-