Class ParquetUtils


  • public class ParquetUtils
    extends Object
    • Method Detail

      • getParquetAvroReader

        public static org.apache.parquet.hadoop.ParquetReader<org.apache.avro.generic.GenericRecord> getParquetAvroReader​(org.apache.hadoop.fs.Path path)
                                                                                                                   throws IOException
        Returns a ParquetReader with the given path.
        Throws:
        IOException
      • getParquetAvroWriter

        public static org.apache.parquet.hadoop.ParquetWriter<org.apache.avro.generic.GenericRecord> getParquetAvroWriter​(org.apache.hadoop.fs.Path path,
                                                                                                                          org.apache.avro.Schema schema)
                                                                                                                   throws IOException
        Returns a ParquetWriter with the given path and schema.
        Throws:
        IOException
      • getParquetAvroSchema

        public static org.apache.avro.Schema getParquetAvroSchema​(org.apache.hadoop.fs.Path path)
                                                           throws IOException
        Returns the schema for the given Parquet file path.
        Throws:
        IOException
      • hasAvroSchemaInFileMetadata

        public static boolean hasAvroSchemaInFileMetadata​(org.apache.hadoop.fs.Path path)
                                                   throws IOException
        Throws:
        IOException
      • getParquetHadoopConfiguration

        public static org.apache.hadoop.conf.Configuration getParquetHadoopConfiguration()