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.ArrowReader
Base class for ArrowReaders based on consuming data from FlightEndpoints.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.arrow.vector.dictionary.DictionaryProvider
org.apache.arrow.vector.dictionary.DictionaryProvider.MapDictionaryProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final FlightSqlClientWithCallOptionsprotected final com.github.benmanes.caffeine.cache.LoadingCache<org.apache.arrow.flight.Location, FlightSqlClientWithCallOptions> Fields inherited from class org.apache.arrow.vector.ipc.ArrowReader
allocator, dictionaries -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseFlightReader(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
Modifier and TypeMethodDescriptionprotected voidaddBytesRead(long bytes) longprotected voidbooleanprotected voidloadRoot(org.apache.arrow.vector.VectorSchemaRoot root) protected voidprotected abstract voidprocessRootFromStream(org.apache.arrow.vector.VectorSchemaRoot root) protected org.apache.arrow.vector.types.pojo.SchemaMethods inherited from class org.apache.arrow.vector.ipc.ArrowReader
close, close, ensureInitialized, getDictionaryIds, getDictionaryVectors, getVectorSchemaRoot, initialize, loadDictionary, loadRecordBatch, lookup, prepareLoadNextBatch
-
Field Details
-
client
-
clientCache
protected final com.github.benmanes.caffeine.cache.LoadingCache<org.apache.arrow.flight.Location,FlightSqlClientWithCallOptions> clientCache
-
-
Constructor Details
-
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 Details
-
loadNextBatch
- Specified by:
loadNextBatchin classorg.apache.arrow.vector.ipc.ArrowReader- Throws:
IOException
-
readSchema
- 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
- 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
- Throws:
AdbcException
-
loadRoot
protected void loadRoot(org.apache.arrow.vector.VectorSchemaRoot root)
-