public class ParquetChunkedReader extends Object implements AutoCloseable
Constructor and Description |
---|
ParquetChunkedReader(long chunkSizeByteLimit,
File filePath)
Construct the reader instance from a read limit and a file path.
|
ParquetChunkedReader(long chunkSizeByteLimit,
long passReadLimit,
ParquetOptions opts,
File filePath)
Construct the reader instance from a read limit, a ParquetOptions object, and a file path.
|
ParquetChunkedReader(long chunkSizeByteLimit,
long passReadLimit,
ParquetOptions opts,
HostMemoryBuffer buffer,
long offset,
long len)
Construct the reader instance from a read limit and a file already read in a memory buffer.
|
ParquetChunkedReader(long chunkSizeByteLimit,
ParquetOptions opts,
DataSource ds)
Construct a reader instance from a DataSource
|
ParquetChunkedReader(long chunkSizeByteLimit,
ParquetOptions opts,
File filePath)
Construct the reader instance from a read limit, a ParquetOptions object, and a file path.
|
ParquetChunkedReader(long chunkSizeByteLimit,
ParquetOptions opts,
HostMemoryBuffer buffer,
long offset,
long len)
Construct the reader instance from a read limit and a file already read in a memory buffer.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
hasNext()
Check if the given file has anything left to read.
|
Table |
readChunk()
Read a chunk of rows in the given Parquet file such that the returning data has total size
does not exceed the given read limit.
|
public ParquetChunkedReader(long chunkSizeByteLimit, File filePath)
chunkSizeByteLimit
- Limit on total number of bytes to be returned per read,
or 0 if there is no limit.filePath
- Full path of the input Parquet file to read.public ParquetChunkedReader(long chunkSizeByteLimit, ParquetOptions opts, File filePath)
chunkSizeByteLimit
- Limit on total number of bytes to be returned per read,
or 0 if there is no limit.opts
- The options for Parquet reading.filePath
- Full path of the input Parquet file to read.public ParquetChunkedReader(long chunkSizeByteLimit, long passReadLimit, ParquetOptions opts, File filePath)
chunkSizeByteLimit
- Limit on total number of bytes to be returned per read,
or 0 if there is no limit.passReadLimit
- Limit on the amount of memory used for reading and decompressing data or
0 if there is no limitopts
- The options for Parquet reading.filePath
- Full path of the input Parquet file to read.public ParquetChunkedReader(long chunkSizeByteLimit, ParquetOptions opts, HostMemoryBuffer buffer, long offset, long len)
chunkSizeByteLimit
- Limit on total number of bytes to be returned per read,
or 0 if there is no limit.opts
- The options for Parquet reading.buffer
- Raw Parquet file content.offset
- The starting offset into buffer.len
- The number of bytes to parse the given buffer.public ParquetChunkedReader(long chunkSizeByteLimit, long passReadLimit, ParquetOptions opts, HostMemoryBuffer buffer, long offset, long len)
chunkSizeByteLimit
- Limit on total number of bytes to be returned per read,
or 0 if there is no limit.passReadLimit
- Limit on the amount of memory used for reading and decompressing data or
0 if there is no limitopts
- The options for Parquet reading.buffer
- Raw Parquet file content.offset
- The starting offset into buffer.len
- The number of bytes to parse the given buffer.public ParquetChunkedReader(long chunkSizeByteLimit, ParquetOptions opts, DataSource ds)
chunkSizeByteLimit
- Limit on total number of bytes to be returned per read,
or 0 if there is no limit.opts
- The options for Parquet reading.ds
- the data source to read frompublic boolean hasNext()
public Table readChunk()
public void close()
close
in interface AutoCloseable
Copyright © 2024. All rights reserved.