Package io.trino.parquet.reader
Class ChunkedInputStream
java.lang.Object
java.io.InputStream
io.trino.parquet.reader.ChunkedInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
A single continuous
InputStream over multiple Slices read on demand using given collection of ChunkReaders.
It is used to read parquet column chunk in limited (small) byte chunks (8MB by default, controlled by ParquetReaderOptions.getMaxReadBlockSize()).
Column chunks consists of multiple pages.
This abstraction is used because the page size is unknown until the page header is read
and page header and page data can be split between two or more byte chunks.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
ChunkedInputStream
-
-
Method Details
-
getSlice
- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-