public class ArrowFileReader extends ArrowReader
ArrowReader that reads the standard arrow binary
file format.DictionaryProvider.MapDictionaryProviderallocator, dictionaries| Constructor and Description |
|---|
ArrowFileReader(SeekableByteChannel in,
BufferAllocator allocator) |
ArrowFileReader(SeekableByteChannel in,
BufferAllocator allocator,
CompressionCodec.Factory compressionFactory) |
ArrowFileReader(SeekableReadChannel in,
BufferAllocator allocator) |
ArrowFileReader(SeekableReadChannel in,
BufferAllocator allocator,
CompressionCodec.Factory compressionFactory) |
| Modifier and Type | Method and Description |
|---|---|
long |
bytesRead()
Return the number of bytes read from the ReadChannel.
|
protected void |
closeReadSource()
Close the underlying read source.
|
List<ArrowBlock> |
getDictionaryBlocks() |
Map<String,String> |
getMetaData()
Get custom metadata.
|
List<ArrowBlock> |
getRecordBlocks()
Returns the
ArrowBlock metadata from the file. |
void |
initialize()
Reads the schema and initializes the vectors.
|
boolean |
loadNextBatch()
Returns true if a batch was read, false if no more batches.
|
boolean |
loadRecordBatch(ArrowBlock block)
Loads record batch for the given block.
|
ArrowDictionaryBatch |
readDictionary()
Read a dictionary batch from the source, will be invoked after the schema has been read and
called N times, where N is the number of dictionaries indicated by the schema Fields.
|
protected Schema |
readSchema()
Read the Schema from the source, will be invoked at the beginning the initialization.
|
close, close, ensureInitialized, getDictionaryIds, getDictionaryVectors, getVectorSchemaRoot, loadDictionary, loadRecordBatch, lookup, prepareLoadNextBatchpublic ArrowFileReader(SeekableReadChannel in, BufferAllocator allocator, CompressionCodec.Factory compressionFactory)
public ArrowFileReader(SeekableByteChannel in, BufferAllocator allocator, CompressionCodec.Factory compressionFactory)
public ArrowFileReader(SeekableReadChannel in, BufferAllocator allocator)
public ArrowFileReader(SeekableByteChannel in, BufferAllocator allocator)
public long bytesRead()
ArrowReaderbytesRead in class ArrowReaderprotected void closeReadSource()
throws IOException
ArrowReadercloseReadSource in class ArrowReaderIOException - on errorprotected Schema readSchema() throws IOException
ArrowReaderreadSchema in class ArrowReaderIOException - on errorpublic void initialize()
throws IOException
ArrowReaderinitialize in class ArrowReaderIOExceptionpublic ArrowDictionaryBatch readDictionary() throws IOException
IOException - on errorpublic boolean loadNextBatch()
throws IOException
loadNextBatch in class ArrowReaderIOException - on errorpublic List<ArrowBlock> getDictionaryBlocks() throws IOException
IOExceptionpublic List<ArrowBlock> getRecordBlocks() throws IOException
ArrowBlock metadata from the file.IOExceptionpublic boolean loadRecordBatch(ArrowBlock block) throws IOException
IOExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.