Package org.apache.parquet.hadoop
Class ParquetReader<T>
- java.lang.Object
-
- org.apache.parquet.hadoop.ParquetReader<T>
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ParquetReader<T> extends Object implements Closeable
Read records from a Parquet file. TODO: too many constructors (https://issues.apache.org/jira/browse/PARQUET-39)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParquetReader.Builder<T>
-
Constructor Summary
Constructors Constructor Description ParquetReader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path file, ReadSupport<T> readSupport)Deprecated.ParquetReader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path file, ReadSupport<T> readSupport, UnboundRecordFilter unboundRecordFilter)Deprecated.ParquetReader(org.apache.hadoop.fs.Path file, ReadSupport<T> readSupport)Deprecated.ParquetReader(org.apache.hadoop.fs.Path file, ReadSupport<T> readSupport, UnboundRecordFilter unboundRecordFilter)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> ParquetReader.Builder<T>builder(ReadSupport<T> readSupport, org.apache.hadoop.fs.Path path)voidclose()Tread()static <T> ParquetReader.Builder<T>read(InputFile file)
-
-
-
Constructor Detail
-
ParquetReader
@Deprecated public ParquetReader(org.apache.hadoop.fs.Path file, ReadSupport<T> readSupport) throws IOException
Deprecated.- Parameters:
file- the file to readreadSupport- to materialize records- Throws:
IOException- if there is an error while reading
-
ParquetReader
@Deprecated public ParquetReader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path file, ReadSupport<T> readSupport) throws IOException
Deprecated.- Parameters:
conf- the configurationfile- the file to readreadSupport- to materialize records- Throws:
IOException- if there is an error while reading
-
ParquetReader
@Deprecated public ParquetReader(org.apache.hadoop.fs.Path file, ReadSupport<T> readSupport, UnboundRecordFilter unboundRecordFilter) throws IOException
Deprecated.- Parameters:
file- the file to readreadSupport- to materialize recordsunboundRecordFilter- the filter to use to filter records- Throws:
IOException- if there is an error while reading
-
ParquetReader
@Deprecated public ParquetReader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path file, ReadSupport<T> readSupport, UnboundRecordFilter unboundRecordFilter) throws IOException
Deprecated.- Parameters:
conf- the configurationfile- the file to readreadSupport- to materialize recordsunboundRecordFilter- the filter to use to filter records- Throws:
IOException- if there is an error while reading
-
-
Method Detail
-
read
public T read() throws IOException
- Returns:
- the next record or null if finished
- Throws:
IOException- if there is an error while reading
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
read
public static <T> ParquetReader.Builder<T> read(InputFile file) throws IOException
- Throws:
IOException
-
builder
public static <T> ParquetReader.Builder<T> builder(ReadSupport<T> readSupport, org.apache.hadoop.fs.Path path)
-
-