Class AvroSchemaConverter


  • public class AvroSchemaConverter
    extends Object

    Converts an Avro schema into a Parquet schema, or vice versa. See package documentation for details of the mapping.

    • Constructor Detail

      • AvroSchemaConverter

        public AvroSchemaConverter()
      • AvroSchemaConverter

        public AvroSchemaConverter​(org.apache.hadoop.conf.Configuration conf)
    • Method Detail

      • getNonNull

        public static org.apache.avro.Schema getNonNull​(org.apache.avro.Schema schema)
        Given a schema, check to see if it is a union of a null type and a regular schema, and then return the non-null sub-schema. Otherwise, return the given schema.
        Parameters:
        schema - The schema to check
        Returns:
        The non-null portion of a union schema, or the given schema
      • convert

        public MessageType convert​(org.apache.avro.Schema avroSchema)
      • convert

        public org.apache.avro.Schema convert​(MessageType parquetSchema)