Package org.apache.parquet.hadoop
Class ParquetRecordReader<T>
- java.lang.Object
-
- org.apache.hadoop.mapreduce.RecordReader<Void,T>
-
- org.apache.parquet.hadoop.ParquetRecordReader<T>
-
- Type Parameters:
T
- type of the materialized records
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class ParquetRecordReader<T> extends org.apache.hadoop.mapreduce.RecordReader<Void,T>
Reads the records from a block of a Parquet file- See Also:
ParquetInputFormat
-
-
Constructor Summary
Constructors Constructor Description ParquetRecordReader(ReadSupport<T> readSupport)
ParquetRecordReader(ReadSupport<T> readSupport, UnboundRecordFilter filter)
Deprecated.will be removed in 2.0.0.ParquetRecordReader(ReadSupport<T> readSupport, FilterCompat.Filter filter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Void
getCurrentKey()
always returns nullT
getCurrentValue()
float
getProgress()
void
initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.mapred.Reporter reporter)
void
initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext context)
boolean
nextKeyValue()
-
-
-
Constructor Detail
-
ParquetRecordReader
public ParquetRecordReader(ReadSupport<T> readSupport)
- Parameters:
readSupport
- Object which helps reads files of the given type, e.g. Thrift, Avro.
-
ParquetRecordReader
public ParquetRecordReader(ReadSupport<T> readSupport, FilterCompat.Filter filter)
- Parameters:
readSupport
- Object which helps reads files of the given type, e.g. Thrift, Avro.filter
- for filtering individual records
-
ParquetRecordReader
@Deprecated public ParquetRecordReader(ReadSupport<T> readSupport, UnboundRecordFilter filter)
Deprecated.will be removed in 2.0.0.- Parameters:
readSupport
- Object which helps reads files of the given type, e.g. Thrift, Avro.filter
- for filtering individual records
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classorg.apache.hadoop.mapreduce.RecordReader<Void,T>
- Throws:
IOException
-
getCurrentKey
public Void getCurrentKey() throws IOException, InterruptedException
always returns null- Specified by:
getCurrentKey
in classorg.apache.hadoop.mapreduce.RecordReader<Void,T>
- Throws:
IOException
InterruptedException
-
getCurrentValue
public T getCurrentValue() throws IOException, InterruptedException
- Specified by:
getCurrentValue
in classorg.apache.hadoop.mapreduce.RecordReader<Void,T>
- Throws:
IOException
InterruptedException
-
getProgress
public float getProgress() throws IOException, InterruptedException
- Specified by:
getProgress
in classorg.apache.hadoop.mapreduce.RecordReader<Void,T>
- Throws:
IOException
InterruptedException
-
initialize
public void initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
- Specified by:
initialize
in classorg.apache.hadoop.mapreduce.RecordReader<Void,T>
- Throws:
IOException
InterruptedException
-
initialize
public void initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.mapred.Reporter reporter) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
nextKeyValue
public boolean nextKeyValue() throws IOException, InterruptedException
- Specified by:
nextKeyValue
in classorg.apache.hadoop.mapreduce.RecordReader<Void,T>
- Throws:
IOException
InterruptedException
-
-