public class ArrowStreamReader extends ArrowReader
DictionaryProvider.MapDictionaryProviderallocator| Constructor and Description |
|---|
ArrowStreamReader(InputStream in,
BufferAllocator allocator)
Constructs a streaming reader from an InputStream.
|
ArrowStreamReader(MessageReader messageReader,
BufferAllocator allocator)
Constructs a streaming reader using the MessageReader interface.
|
ArrowStreamReader(ReadableByteChannel in,
BufferAllocator allocator)
Constructs a streaming reader from a ReadableByteChannel input.
|
| Modifier and Type | Method and Description |
|---|---|
long |
bytesRead()
Get the number of bytes read from the stream since constructing the reader.
|
protected void |
closeReadSource()
Closes the underlying read source.
|
boolean |
loadNextBatch()
Load the next ArrowRecordBatch to the vector schema root if available.
|
protected ArrowDictionaryBatch |
readDictionary()
Read a dictionary batch message, will be invoked after the schema and before normal record
batches are read.
|
protected Schema |
readSchema()
Reads the schema message from the beginning of the stream.
|
close, close, ensureInitialized, getDictionaryVectors, getVectorSchemaRoot, loadDictionary, loadRecordBatch, lookup, prepareLoadNextBatchpublic ArrowStreamReader(MessageReader messageReader, BufferAllocator allocator)
messageReader - interface to get read messagesallocator - to allocate new bufferspublic ArrowStreamReader(ReadableByteChannel in, BufferAllocator allocator)
in - ReadableByteChannel to read messages fromallocator - to allocate new bufferspublic ArrowStreamReader(InputStream in, BufferAllocator allocator)
in - InputStream to read messages fromallocator - to allocate new bufferspublic long bytesRead()
bytesRead in class ArrowReaderprotected void closeReadSource()
throws IOException
closeReadSource in class ArrowReaderIOExceptionpublic boolean loadNextBatch()
throws IOException
loadNextBatch in class ArrowReaderIOExceptionprotected Schema readSchema() throws IOException
readSchema in class ArrowReaderIOExceptionprotected ArrowDictionaryBatch readDictionary() throws IOException
readDictionary in class ArrowReaderIOExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.