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 class 
     
  • 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; use builder(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; use builder(InputFile) instead.
    AvroParquetReader(org.apache.hadoop.fs.Path file)
    Deprecated.
    will be removed in 2.0.0; use builder(InputFile) instead.
    AvroParquetReader(org.apache.hadoop.fs.Path file, org.apache.parquet.filter.UnboundRecordFilter unboundRecordFilter)
    Deprecated.
    will be removed in 2.0.0; use builder(InputFile) instead.
  • Method Summary

    Modifier and Type
    Method
    Description
    builder(org.apache.hadoop.fs.Path file)
    Deprecated.
    will be removed in 2.0.0; use builder(InputFile) instead.
    builder(org.apache.parquet.io.InputFile file)
     
    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; use genericRecordReader(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 Avro GenericData objects 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 Avro GenericData objects to store data from reads.

    Methods inherited from class org.apache.parquet.hadoop.ParquetReader

    builder, builder, close, getCurrentRowGroupIndex, getCurrentRowIndex, read, read, read

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AvroParquetReader

      @Deprecated public AvroParquetReader(org.apache.hadoop.fs.Path file) throws IOException
      Deprecated.
      will be removed in 2.0.0; use builder(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; use builder(InputFile) instead.
      Parameters:
      file - a file path
      unboundRecordFilter - 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; use builder(InputFile) instead.
      Parameters:
      conf - a configuration
      file - 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; use builder(InputFile) instead.
      Parameters:
      conf - a configuration
      file - a file path
      unboundRecordFilter - an unbound record filter (from the old filter API)
      Throws:
      IOException - if there is an error while reading
  • Method Details

    • builder

      @Deprecated public static <T> AvroParquetReader.Builder<T> builder(org.apache.hadoop.fs.Path file)
      Deprecated.
      will be removed in 2.0.0; use builder(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)
    • 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 Avro GenericData objects to store data from reads.
      Parameters:
      file - The location to read data from
      Returns:
      A ParquetReader which reads data as Avro GenericData
      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 Avro GenericData objects to store data from reads.
      Parameters:
      file - The location to read data from
      conf - The configuration to use
      Returns:
      A ParquetReader which reads data as Avro GenericData
      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; use genericRecordReader(InputFile) instead.
      Convenience method for creating a ParquetReader which uses Avro GenericData objects to store data from reads.
      Parameters:
      file - The location to read data from
      Returns:
      A ParquetReader which reads data as Avro GenericData
      Throws:
      IOException - if the InputFile has been closed, or if some other I/O error occurs