Class 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.
    • Constructor Detail

      • 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 Detail

      • 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
      • 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

        @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