public interface PageWriter extends AutoCloseable
Modifier and Type | Method and Description |
---|---|
long |
allocatedSize() |
default void |
close() |
long |
getMemSize() |
String |
memUsageString(String prefix) |
void |
writeDictionaryPage(DictionaryPage dictionaryPage)
writes a dictionary page
|
void |
writePage(BytesInput bytesInput,
int valueCount,
int rowCount,
Statistics<?> statistics,
Encoding rlEncoding,
Encoding dlEncoding,
Encoding valuesEncoding)
writes a single page
|
default void |
writePage(BytesInput bytesInput,
int valueCount,
int rowCount,
Statistics<?> statistics,
SizeStatistics sizeStatistics,
Encoding rlEncoding,
Encoding dlEncoding,
Encoding valuesEncoding)
writes a single page
|
void |
writePage(BytesInput bytesInput,
int valueCount,
Statistics<?> statistics,
Encoding rlEncoding,
Encoding dlEncoding,
Encoding valuesEncoding)
Deprecated.
will be removed in 2.0.0. This method does not support writing column indexes; Use
writePage(BytesInput, int, int, Statistics, Encoding, Encoding, Encoding) instead |
void |
writePageV2(int rowCount,
int nullCount,
int valueCount,
BytesInput repetitionLevels,
BytesInput definitionLevels,
Encoding dataEncoding,
BytesInput data,
Statistics<?> statistics)
writes a single page in the new format
|
default void |
writePageV2(int rowCount,
int nullCount,
int valueCount,
BytesInput repetitionLevels,
BytesInput definitionLevels,
Encoding dataEncoding,
BytesInput data,
Statistics<?> statistics,
SizeStatistics sizeStatistics)
writes a single page in the new format
|
@Deprecated void writePage(BytesInput bytesInput, int valueCount, Statistics<?> statistics, Encoding rlEncoding, Encoding dlEncoding, Encoding valuesEncoding) throws IOException
writePage(BytesInput, int, int, Statistics, Encoding, Encoding, Encoding)
insteadbytesInput
- the bytes for the pagevalueCount
- the number of values in that pagestatistics
- the statistics for that pagerlEncoding
- repetition level encodingdlEncoding
- definition level encodingvaluesEncoding
- values encodingIOException
- if there is an exception while writing page datavoid writePage(BytesInput bytesInput, int valueCount, int rowCount, Statistics<?> statistics, Encoding rlEncoding, Encoding dlEncoding, Encoding valuesEncoding) throws IOException
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 encodingIOException
default void writePage(BytesInput bytesInput, int valueCount, int rowCount, Statistics<?> statistics, SizeStatistics sizeStatistics, Encoding rlEncoding, Encoding dlEncoding, Encoding valuesEncoding) throws IOException
bytesInput
- the bytes for the pagevalueCount
- the number of values in that pagerowCount
- the number of rows in that pagestatistics
- the statistics for that pagesizeStatistics
- the size statistics for that pagerlEncoding
- repetition level encodingdlEncoding
- definition level encodingvaluesEncoding
- values encodingIOException
void writePageV2(int rowCount, int nullCount, int valueCount, BytesInput repetitionLevels, BytesInput definitionLevels, Encoding dataEncoding, BytesInput data, Statistics<?> statistics) throws IOException
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 pageIOException
- if there is an exception while writing page datadefault void writePageV2(int rowCount, int nullCount, int valueCount, BytesInput repetitionLevels, BytesInput definitionLevels, Encoding dataEncoding, BytesInput data, Statistics<?> statistics, SizeStatistics sizeStatistics) throws IOException
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 pagesizeStatistics
- optional size stats for this pageIOException
- if there is an exception while writing page datalong getMemSize()
long allocatedSize()
void writeDictionaryPage(DictionaryPage dictionaryPage) throws IOException
dictionaryPage
- the dictionary page containing the dictionary dataIOException
- if there was an exception while writingString memUsageString(String prefix)
prefix
- a prefix header to add at every linedefault void close()
close
in interface AutoCloseable
Copyright © 2023 The Apache Software Foundation. All rights reserved.