Package org.apache.parquet.column.page
Interface PageWriter
-
public interface PageWritera writer for all the pages of a given column chunk
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description longallocatedSize()longgetMemSize()StringmemUsageString(String prefix)voidwriteDictionaryPage(DictionaryPage dictionaryPage)writes a dictionary pagevoidwritePage(org.apache.parquet.bytes.BytesInput bytesInput, int valueCount, int rowCount, Statistics<?> statistics, Encoding rlEncoding, Encoding dlEncoding, Encoding valuesEncoding)writes a single pagevoidwritePage(org.apache.parquet.bytes.BytesInput bytesInput, int valueCount, Statistics<?> statistics, Encoding rlEncoding, Encoding dlEncoding, Encoding valuesEncoding)Deprecated.will be removed in 2.0.0.voidwritePageV2(int rowCount, int nullCount, int valueCount, org.apache.parquet.bytes.BytesInput repetitionLevels, org.apache.parquet.bytes.BytesInput definitionLevels, Encoding dataEncoding, org.apache.parquet.bytes.BytesInput data, Statistics<?> statistics)writes a single page in the new format
-
-
-
Method Detail
-
writePage
@Deprecated void writePage(org.apache.parquet.bytes.BytesInput bytesInput, int valueCount, Statistics<?> statistics, Encoding rlEncoding, Encoding dlEncoding, Encoding valuesEncoding) throws IOException
Deprecated.will be removed in 2.0.0. This method does not support writing column indexes; UsewritePage(BytesInput, int, int, Statistics, Encoding, Encoding, Encoding)insteadwrites a single page- Parameters:
bytesInput- the bytes for the pagevalueCount- the number of values in that pagestatistics- the statistics for that pagerlEncoding- repetition level encodingdlEncoding- definition level encodingvaluesEncoding- values encoding- Throws:
IOException- if there is an exception while writing page data
-
writePage
void writePage(org.apache.parquet.bytes.BytesInput bytesInput, int valueCount, int rowCount, Statistics<?> statistics, Encoding rlEncoding, Encoding dlEncoding, Encoding valuesEncoding) throws IOExceptionwrites a single page- Parameters:
bytesInput- the bytes for the pagevalueCount- the number of values in that pagerowCount- the number of rows in that pagestatistics- the statistics for that pagerlEncoding- repetition level encodingdlEncoding- definition level encodingvaluesEncoding- values encoding- Throws:
IOException
-
writePageV2
void writePageV2(int rowCount, int nullCount, int valueCount, org.apache.parquet.bytes.BytesInput repetitionLevels, org.apache.parquet.bytes.BytesInput definitionLevels, Encoding dataEncoding, org.apache.parquet.bytes.BytesInput data, Statistics<?> statistics) throws IOExceptionwrites a single page in the new format- Parameters:
rowCount- the number of rows in this pagenullCount- the number of null values (out of valueCount)valueCount- the number of values in that page (there could be multiple values per row for repeated fields)repetitionLevels- the repetition levels encoded in RLE without any size headerdefinitionLevels- the definition levels encoded in RLE without any size headerdataEncoding- the encoding for the datadata- the data encoded with dataEncodingstatistics- optional stats for this page- Throws:
IOException- if there is an exception while writing page data
-
getMemSize
long getMemSize()
- Returns:
- the current size used in the memory buffer for that column chunk
-
allocatedSize
long allocatedSize()
- Returns:
- the allocated size for the buffer ( > getMemSize() )
-
writeDictionaryPage
void writeDictionaryPage(DictionaryPage dictionaryPage) throws IOException
writes a dictionary page- Parameters:
dictionaryPage- the dictionary page containing the dictionary data- Throws:
IOException- if there was an exception while writing
-
-