public class PaimonRecordReader extends Object implements org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>
RecordReader
for paimon. Reads KeyValue
s 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 readIOException
public boolean next(Void key, RowDataContainer value) throws IOException
next
in interface org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>
IOException
public 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>
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>
IOException
public float getProgress() throws IOException
getProgress
in interface org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer>
IOException
public static org.apache.hadoop.mapred.RecordReader<Void,RowDataContainer> createRecordReader(PaimonInputSplit split, org.apache.hadoop.mapred.JobConf jobConf) throws IOException
IOException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.