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 voidclose()VoidgetCurrentKey()always returns nullTgetCurrentValue()floatgetProgress()voidinitialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.mapred.Reporter reporter)voidinitialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext context)booleannextKeyValue()
-
-
-
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.hadoop.mapreduce.RecordReader<Void,T>- Throws:
IOException
-
getCurrentKey
public Void getCurrentKey() throws IOException, InterruptedException
always returns null- Specified by:
getCurrentKeyin classorg.apache.hadoop.mapreduce.RecordReader<Void,T>- Throws:
IOExceptionInterruptedException
-
getCurrentValue
public T getCurrentValue() throws IOException, InterruptedException
- Specified by:
getCurrentValuein classorg.apache.hadoop.mapreduce.RecordReader<Void,T>- Throws:
IOExceptionInterruptedException
-
getProgress
public float getProgress() throws IOException, InterruptedException- Specified by:
getProgressin classorg.apache.hadoop.mapreduce.RecordReader<Void,T>- Throws:
IOExceptionInterruptedException
-
initialize
public void initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException- Specified by:
initializein classorg.apache.hadoop.mapreduce.RecordReader<Void,T>- Throws:
IOExceptionInterruptedException
-
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:
IOExceptionInterruptedException
-
nextKeyValue
public boolean nextKeyValue() throws IOException, InterruptedException- Specified by:
nextKeyValuein classorg.apache.hadoop.mapreduce.RecordReader<Void,T>- Throws:
IOExceptionInterruptedException
-
-