public class PaimonRecordReader extends Object implements org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>
RecordReader for paimon. Reads KeyValues from data files and picks out
InternalRow for Hive to consume.
NOTE: To support projection push down, when selectedColumns does not match columnNames this reader will still produce records of the original schema. However, columns not
in selectedColumns will be null.
| Constructor and Description |
|---|
PaimonRecordReader(ReadBuilder readBuilder,
PaimonInputSplit split,
List<String> paimonColumns,
List<String> hiveColumns,
List<String> selectedColumns,
String tagToPartField) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Void |
createKey() |
static org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer> |
createRecordReader(PaimonInputSplit split,
org.apache.hadoop.mapred.JobConf jobConf) |
RowDataContainer |
createValue() |
long |
getPos() |
float |
getProgress() |
boolean |
next(Void key,
RowDataContainer value) |
public PaimonRecordReader(ReadBuilder readBuilder, PaimonInputSplit split, List<String> paimonColumns, List<String> hiveColumns, List<String> selectedColumns, @Nullable String tagToPartField) throws IOException
paimonColumns - columns stored in Paimon tablehiveColumns - columns Hive expectsselectedColumns - columns we really have to readIOExceptionpublic boolean next(Void key, RowDataContainer value) throws IOException
next in interface org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>IOExceptionpublic Void createKey()
createKey in interface org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>public RowDataContainer createValue()
createValue in interface org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>public long getPos()
throws IOException
getPos in interface org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>IOExceptionpublic float getProgress()
throws IOException
getProgress in interface org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>IOExceptionpublic static org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer> createRecordReader(PaimonInputSplit split, org.apache.hadoop.mapred.JobConf jobConf) throws IOException
IOExceptionCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.