public class OffsetIndexBuilder extends Object
OffsetIndex objects during writing a parquet file.| Modifier and Type | Method and Description |
|---|---|
void |
add(int compressedPageSize,
long rowCount)
Adds the specified parameters to this builder.
|
void |
add(long offset,
int compressedPageSize,
long firstRowIndex)
Adds the specified parameters to this builder.
|
OffsetIndex |
build()
Builds the offset index.
|
OffsetIndex |
build(long firstPageOffset)
Builds the offset index.
|
static OffsetIndexBuilder |
getBuilder() |
static OffsetIndexBuilder |
getNoOpBuilder() |
public static OffsetIndexBuilder getNoOpBuilder()
null at build(long)public static OffsetIndexBuilder getBuilder()
OffsetIndexBuilder instance to build an OffsetIndex objectpublic void add(int compressedPageSize,
long rowCount)
OffsetIndex objects to be
written to the Parquet file.compressedPageSize - the size of the page (including header)rowCount - the number of rows in the pagepublic void add(long offset,
int compressedPageSize,
long firstRowIndex)
OffsetIndex
objects read from the Parquet file.offset - the offset of the page in the filecompressedPageSize - the size of the page (including header)firstRowIndex - the index of the first row in the page (within the row group)public OffsetIndex build()
OffsetIndex
objects read from the Parquet file.null if the OffsetIndex object would be emptypublic OffsetIndex build(long firstPageOffset)
OffsetIndex objects to be
written to the Parquet file.firstPageOffset - the actual offset in the file to be used to translate all the collected offsetsnull if the OffsetIndex object would be emptyCopyright © 2020 The Apache Software Foundation. All rights reserved.