Package org.apache.parquet.avro
Class AvroSchemaConverter
java.lang.Object
org.apache.parquet.avro.AvroSchemaConverter
Converts an Avro schema into a Parquet schema, or vice versa. See package documentation for details of the mapping.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAvroSchemaConverter(org.apache.hadoop.conf.Configuration conf) AvroSchemaConverter(org.apache.parquet.conf.ParquetConfiguration conf) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.parquet.schema.MessageTypeconvert(org.apache.avro.Schema avroSchema) org.apache.avro.Schemaconvert(org.apache.parquet.schema.MessageType parquetSchema) static org.apache.avro.SchemagetNonNull(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 Details
-
ADD_LIST_ELEMENT_RECORDS
- See Also:
-
-
Constructor Details
-
AvroSchemaConverter
public AvroSchemaConverter() -
AvroSchemaConverter
public AvroSchemaConverter(org.apache.hadoop.conf.Configuration conf) -
AvroSchemaConverter
public AvroSchemaConverter(org.apache.parquet.conf.ParquetConfiguration conf)
-
-
Method Details
-
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 org.apache.parquet.schema.MessageType convert(org.apache.avro.Schema avroSchema) -
convert
public org.apache.avro.Schema convert(org.apache.parquet.schema.MessageType parquetSchema)
-