public class ParquetRecordReader<T> extends Object
ParquetRecordReader
that support start read from particular position.Constructor and Description |
---|
ParquetRecordReader(org.apache.parquet.hadoop.api.ReadSupport<T> readSupport,
org.apache.parquet.schema.MessageType readSchema) |
ParquetRecordReader(org.apache.parquet.hadoop.api.ReadSupport<T> readSupport,
org.apache.parquet.schema.MessageType readSchema,
org.apache.parquet.filter2.compat.FilterCompat.Filter filter) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Tuple2<Long,Long> |
getCurrentReadPosition()
Returns the current read position in the split, i.e., the current block and
the number of records that were returned from that block.
|
void |
initialize(org.apache.parquet.hadoop.ParquetFileReader reader,
Configuration configuration) |
T |
nextRecord()
Returns the next record.
|
boolean |
reachEnd()
Checks if the record reader returned all records.
|
void |
seek(long block,
long recordInBlock)
Moves the reading position to the given block and seeks to and reads the given record.
|
void |
setSkipCorruptedRecord(boolean skipCorruptedRecord) |
public ParquetRecordReader(org.apache.parquet.hadoop.api.ReadSupport<T> readSupport, org.apache.parquet.schema.MessageType readSchema, org.apache.parquet.filter2.compat.FilterCompat.Filter filter)
public ParquetRecordReader(org.apache.parquet.hadoop.api.ReadSupport<T> readSupport, org.apache.parquet.schema.MessageType readSchema)
public void setSkipCorruptedRecord(boolean skipCorruptedRecord)
public void initialize(org.apache.parquet.hadoop.ParquetFileReader reader, Configuration configuration)
public void seek(long block, long recordInBlock) throws IOException
block
- The block to seek to.recordInBlock
- The number of the record in the block to return next.IOException
public Tuple2<Long,Long> getCurrentReadPosition()
public boolean reachEnd() throws IOException
IOException
@CheckReturnValue(when=NEVER) public T nextRecord()
public void close() throws IOException
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.