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 -
Constructor Summary
ConstructorsConstructorDescriptionAvroParquetReader(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path file) Deprecated.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
Modifier and TypeMethodDescriptionstatic <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 <T> AvroParquetReader.Builder<T>builder(org.apache.parquet.io.InputFile file, org.apache.parquet.conf.ParquetConfiguration conf) 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.static org.apache.parquet.hadoop.ParquetReader<org.apache.avro.generic.GenericRecord>genericRecordReader(org.apache.parquet.io.InputFile file, org.apache.parquet.conf.ParquetConfiguration conf) Convenience method for creating a ParquetReader which uses AvroGenericDataobjects to store data from reads.Methods inherited from class org.apache.parquet.hadoop.ParquetReader
builder, builder, close, getCurrentRowGroupIndex, getCurrentRowIndex, read, read, read
-
Constructor Details
-
AvroParquetReader
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 Details
-
builder
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
-
builder
public static <T> AvroParquetReader.Builder<T> builder(org.apache.parquet.io.InputFile file, org.apache.parquet.conf.ParquetConfiguration conf) -
genericRecordReader
public static org.apache.parquet.hadoop.ParquetReader<org.apache.avro.generic.GenericRecord> genericRecordReader(org.apache.parquet.io.InputFile file) throws IOException 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
-
genericRecordReader
public static org.apache.parquet.hadoop.ParquetReader<org.apache.avro.generic.GenericRecord> genericRecordReader(org.apache.parquet.io.InputFile file, org.apache.parquet.conf.ParquetConfiguration conf) throws IOException Convenience method for creating a ParquetReader which uses AvroGenericDataobjects to store data from reads.- Parameters:
file- The location to read data fromconf- The configuration to use- 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
-
builder(InputFile)instead.