org.apache.pig.piggybank.storage.avro
Class AvroSchema2Pig

java.lang.Object
  extended by org.apache.pig.piggybank.storage.avro.AvroSchema2Pig

public class AvroSchema2Pig
extends Object

This class converts Avro schema to Pig schema


Field Summary
static String ARRAY_FIELD
           
static String FIELD
           
static String MAP_VALUE_FIELD
           
static String RECORD
           
 
Constructor Summary
AvroSchema2Pig()
           
 
Method Summary
protected static void add2BagSchema(ResourceSchema.ResourceFieldSchema fieldSchema, ResourceSchema.ResourceFieldSchema subFieldSchema)
          Add a field schema to a bag schema
static ResourceSchema convert(org.apache.avro.Schema schema)
          Convert an Avro schema to a Pig schema
static ResourceSchema.ResourceFieldSchema getPigSchema(byte pigType, String fieldName)
          Wrap a pig type to a field schema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

AvroSchema2Pig

public AvroSchema2Pig()
Method Detail

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 © ${year} The Apache Software Foundation