Package org.apache.parquet.avro
Class AvroSchemaConverter
- java.lang.Object
-
- org.apache.parquet.avro.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.
-
-
Field Summary
Fields Modifier and Type Field Description static String
ADD_LIST_ELEMENT_RECORDS
-
Constructor Summary
Constructors Constructor Description AvroSchemaConverter()
AvroSchemaConverter(org.apache.hadoop.conf.Configuration conf)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageType
convert(org.apache.avro.Schema avroSchema)
org.apache.avro.Schema
convert(MessageType parquetSchema)
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.
-
-
-
Field Detail
-
ADD_LIST_ELEMENT_RECORDS
public static final String ADD_LIST_ELEMENT_RECORDS
- See Also:
- Constant Field Values
-
-
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)
-
-