org.apache.pig.piggybank.storage.avro
Class AvroSchema2Pig
java.lang.Object
org.apache.pig.piggybank.storage.avro.AvroSchema2Pig
public class AvroSchema2Pig
- extends Object
This class converts Avro schema to Pig schema
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RECORD
public static String RECORD
FIELD
public static String FIELD
ARRAY_FIELD
public static String ARRAY_FIELD
MAP_VALUE_FIELD
public static String MAP_VALUE_FIELD
AvroSchema2Pig
public AvroSchema2Pig()
getPigSchema
public static ResourceSchema.ResourceFieldSchema getPigSchema(byte pigType,
String fieldName)
- Wrap a pig type to a field schema
convert
public static ResourceSchema convert(org.apache.avro.Schema schema)
throws IOException
- Convert an Avro schema to a Pig schema
- Throws:
IOException
add2BagSchema
protected static void add2BagSchema(ResourceSchema.ResourceFieldSchema fieldSchema,
ResourceSchema.ResourceFieldSchema subFieldSchema)
throws IOException
- Add a field schema to a bag schema
- Throws:
IOException
Copyright © 2007-2012 The Apache Software Foundation