Package org.apache.parquet.avro
Class AvroParquetReader<T>
- java.lang.Object
-
- org.apache.parquet.hadoop.ParquetReader<T>
-
- org.apache.parquet.avro.AvroParquetReader<T>
-
- Type Parameters:
T- the Java type of records created by this reader
- All Implemented Interfaces:
Closeable,AutoCloseable
public class AvroParquetReader<T> extends org.apache.parquet.hadoop.ParquetReader<T>Read Avro records from a Parquet file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAvroParquetReader.Builder<T>
-
Constructor Summary
Constructors Constructor Description AvroParquetReader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path file)Deprecated.will be removed in 2.0.0; usebuilder(InputFile)instead.AvroParquetReader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path file, org.apache.parquet.filter.UnboundRecordFilter unboundRecordFilter)Deprecated.will be removed in 2.0.0; usebuilder(InputFile)instead.AvroParquetReader(org.apache.hadoop.fs.Path file)Deprecated.will be removed in 2.0.0; usebuilder(InputFile)instead.AvroParquetReader(org.apache.hadoop.fs.Path file, org.apache.parquet.filter.UnboundRecordFilter unboundRecordFilter)Deprecated.will be removed in 2.0.0; usebuilder(InputFile)instead.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> AvroParquetReader.Builder<T>builder(org.apache.hadoop.fs.Path file)Deprecated.will be removed in 2.0.0; usebuilder(InputFile)instead.static <T> AvroParquetReader.Builder<T>builder(org.apache.parquet.io.InputFile file)static org.apache.parquet.hadoop.ParquetReader<org.apache.avro.generic.GenericRecord>genericRecordReader(org.apache.hadoop.fs.Path file)Deprecated.will be removed in 2.0.0; usegenericRecordReader(InputFile)instead.static org.apache.parquet.hadoop.ParquetReader<org.apache.avro.generic.GenericRecord>genericRecordReader(org.apache.parquet.io.InputFile file)Convenience method for creating a ParquetReader which uses AvroGenericDataobjects to store data from reads.
-
-
-
Constructor Detail
-
AvroParquetReader
@Deprecated public AvroParquetReader(org.apache.hadoop.fs.Path file) throws IOException
Deprecated.will be removed in 2.0.0; usebuilder(InputFile)instead.- Parameters:
file- a file path- Throws:
IOException- if there is an error while reading
-
AvroParquetReader
@Deprecated public AvroParquetReader(org.apache.hadoop.fs.Path file, org.apache.parquet.filter.UnboundRecordFilter unboundRecordFilter) throws IOException
Deprecated.will be removed in 2.0.0; usebuilder(InputFile)instead.- Parameters:
file- a file pathunboundRecordFilter- an unbound record filter (from the old filter API)- Throws:
IOException- if there is an error while reading
-
AvroParquetReader
@Deprecated public AvroParquetReader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path file) throws IOException
Deprecated.will be removed in 2.0.0; usebuilder(InputFile)instead.- Parameters:
conf- a configurationfile- a file path- Throws:
IOException- if there is an error while reading
-
AvroParquetReader
@Deprecated public AvroParquetReader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path file, org.apache.parquet.filter.UnboundRecordFilter unboundRecordFilter) throws IOException
Deprecated.will be removed in 2.0.0; usebuilder(InputFile)instead.- Parameters:
conf- a configurationfile- a file pathunboundRecordFilter- an unbound record filter (from the old filter API)- Throws:
IOException- if there is an error while reading
-
-
Method Detail
-
builder
@Deprecated public static <T> AvroParquetReader.Builder<T> builder(org.apache.hadoop.fs.Path file)
Deprecated.will be removed in 2.0.0; usebuilder(InputFile)instead.- Type Parameters:
T- the Java type of records to read from the file- Parameters:
file- a file path- Returns:
- an Avro reader builder
-
builder
public static <T> AvroParquetReader.Builder<T> builder(org.apache.parquet.io.InputFile file)
-
genericRecordReader
public static org.apache.parquet.hadoop.ParquetReader<org.apache.avro.generic.GenericRecord> genericRecordReader(org.apache.parquet.io.InputFile file) throws IOExceptionConvenience method for creating a ParquetReader which uses AvroGenericDataobjects to store data from reads.- Parameters:
file- The location to read data from- Returns:
- A
ParquetReaderwhich reads data as AvroGenericData - Throws:
IOException- if the InputFile has been closed, or if some other I/O error occurs
-
genericRecordReader
@Deprecated public static org.apache.parquet.hadoop.ParquetReader<org.apache.avro.generic.GenericRecord> genericRecordReader(org.apache.hadoop.fs.Path file) throws IOException
Deprecated.will be removed in 2.0.0; usegenericRecordReader(InputFile)instead.Convenience method for creating a ParquetReader which uses AvroGenericDataobjects to store data from reads.- Parameters:
file- The location to read data from- Returns:
- A
ParquetReaderwhich reads data as AvroGenericData - Throws:
IOException- if the InputFile has been closed, or if some other I/O error occurs
-
-