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(int compressedPageSize,
long rowCount,
Optional<Long> unencodedDataBytes)
Adds the specified parameters to this builder.
|
void |
add(long offset,
int compressedPageSize,
long firstRowIndex)
Adds the specified parameters to this builder.
|
void |
add(long offset,
int compressedPageSize,
long firstRowIndex,
Optional<Long> unencodedDataBytes)
Adds the specified parameters to this builder.
|
OffsetIndex |
build()
Builds the offset index.
|
OffsetIndex |
build(long shift)
Builds the offset index.
|
OffsetIndexBuilder |
fromOffsetIndex(OffsetIndex offsetIndex) |
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(int compressedPageSize,
long rowCount,
Optional<Long> unencodedDataBytes)
OffsetIndex objects to be
written to the Parquet file.compressedPageSize - the size of the page (including header)rowCount - the number of rows in the pageunencodedDataBytes - the number of bytes of unencoded data of BYTE_ARRAY typepublic 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 void add(long offset,
int compressedPageSize,
long firstRowIndex,
Optional<Long> unencodedDataBytes)
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)unencodedDataBytes - the number of bytes of unencoded data of BYTE_ARRAY typepublic OffsetIndex build()
OffsetIndex
objects read from the Parquet file.null if the OffsetIndex object would be emptypublic OffsetIndexBuilder fromOffsetIndex(OffsetIndex offsetIndex)
public OffsetIndex build(long shift)
OffsetIndex objects to be
written to the Parquet file.shift - how much to be shifted awaynull if the OffsetIndex object would be emptyCopyright © 2024 The Apache Software Foundation. All rights reserved.