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

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

public class AvroSchemaManager
extends Object

This class creates two maps out of a given Avro schema. And it supports looking up avro schemas using either type name or field name. 1. map[type name] = > avro schema 2. map[field name] => avro schema


Constructor Summary
AvroSchemaManager(org.apache.avro.Schema schema)
          Construct with a given schema
 
Method Summary
 org.apache.avro.Schema getSchema(String name)
          Look up schema using type name or field name
protected  void init(String namespace, org.apache.avro.Schema schema, boolean ignoreNameMap)
          Initialize given a schema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroSchemaManager

public AvroSchemaManager(org.apache.avro.Schema schema)
                  throws IOException
Construct with a given schema

Throws:
IOException
Method Detail

init

protected void init(String namespace,
                    org.apache.avro.Schema schema,
                    boolean ignoreNameMap)
Initialize given a schema


getSchema

public org.apache.avro.Schema getSchema(String name)
Look up schema using type name or field name



Copyright © 2007-2012 The Apache Software Foundation