private Schema createAvroSchema ( final Configuration configuration , final MetadataFilter filter ) throws IOException { final ParquetMetadata footer = ParquetFileReader . readFooter ( configuration , parquetFilePath , filter ) ; final AvroSchemaConverter converter = new AvroSchemaConverter ( ) ; final MessageType schema = footer . getFileMetaData ( ) . getSchema ( ) ; return converter . convert ( schema ) ; }
Retrieve avro schema from parquet file .