public class PigAvroDatumReader
extends org.apache.avro.generic.GenericDatumReader<java.lang.Object>
Constructor and Description |
---|
PigAvroDatumReader(org.apache.avro.Schema schema)
Construct where the writer's and reader's schemas are the same.
|
PigAvroDatumReader(org.apache.avro.Schema writer,
org.apache.avro.Schema reader)
Construct given writer's and reader's schema.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addToArray(java.lang.Object array,
long pos,
java.lang.Object e)
Called by the default implementation of
GenericDatumReader.readArray(java.lang.Object, org.apache.avro.Schema, org.apache.avro.io.ResolvingDecoder) to add a
value. |
protected java.lang.Object |
createEnum(java.lang.String symbol,
org.apache.avro.Schema schema)
Called to create an enum value.
|
protected java.lang.Object |
newArray(java.lang.Object old,
int size,
org.apache.avro.Schema schema)
Called to create new array instances.
|
protected java.lang.Object |
newRecord(java.lang.Object old,
org.apache.avro.Schema schema)
Called to create new record instances.
|
protected java.lang.Object |
peekArray(java.lang.Object array)
Called by the default implementation of
GenericDatumReader.readArray(java.lang.Object, org.apache.avro.Schema, org.apache.avro.io.ResolvingDecoder) to retrieve a
value from a reused instance. |
protected java.lang.Object |
readBytes(java.lang.Object old,
org.apache.avro.io.Decoder in)
Called to read byte arrays.
|
protected java.lang.Object |
readFixed(java.lang.Object old,
org.apache.avro.Schema expected,
org.apache.avro.io.Decoder in)
Called to read a fixed value.
|
protected java.lang.Object |
readMap(java.lang.Object old,
org.apache.avro.Schema expected,
org.apache.avro.io.ResolvingDecoder in)
Called to read a map instance.
|
protected java.lang.Object |
readRecord(java.lang.Object old,
org.apache.avro.Schema expected,
org.apache.avro.io.ResolvingDecoder in)
Called to read a record instance.
|
protected java.lang.Object |
readString(java.lang.Object old,
org.apache.avro.Schema expected,
org.apache.avro.io.Decoder in)
Called to read strings.
|
addToMap, createBytes, createFixed, createFixed, createString, findStringClass, getData, getExpected, getResolver, getSchema, newInstanceFromString, newMap, read, read, readArray, readBytes, readEnum, readField, readInt, readMapKey, readString, setExpected, setSchema, skip
public PigAvroDatumReader(org.apache.avro.Schema schema)
public PigAvroDatumReader(org.apache.avro.Schema writer, org.apache.avro.Schema reader) throws java.io.IOException
java.io.IOException
protected java.lang.Object readRecord(java.lang.Object old, org.apache.avro.Schema expected, org.apache.avro.io.ResolvingDecoder in) throws java.io.IOException
readRecord
in class org.apache.avro.generic.GenericDatumReader<java.lang.Object>
java.io.IOException
protected java.lang.Object readMap(java.lang.Object old, org.apache.avro.Schema expected, org.apache.avro.io.ResolvingDecoder in) throws java.io.IOException
readMap
in class org.apache.avro.generic.GenericDatumReader<java.lang.Object>
java.io.IOException
protected java.lang.Object createEnum(java.lang.String symbol, org.apache.avro.Schema schema)
createEnum
in class org.apache.avro.generic.GenericDatumReader<java.lang.Object>
protected java.lang.Object peekArray(java.lang.Object array)
GenericDatumReader.readArray(java.lang.Object, org.apache.avro.Schema, org.apache.avro.io.ResolvingDecoder)
to retrieve a
value from a reused instance.peekArray
in class org.apache.avro.generic.GenericDatumReader<java.lang.Object>
protected void addToArray(java.lang.Object array, long pos, java.lang.Object e)
GenericDatumReader.readArray(java.lang.Object, org.apache.avro.Schema, org.apache.avro.io.ResolvingDecoder)
to add a
value. Overridden to append to pig bag.addToArray
in class org.apache.avro.generic.GenericDatumReader<java.lang.Object>
protected java.lang.Object readFixed(java.lang.Object old, org.apache.avro.Schema expected, org.apache.avro.io.Decoder in) throws java.io.IOException
readFixed
in class org.apache.avro.generic.GenericDatumReader<java.lang.Object>
java.io.IOException
protected java.lang.Object newRecord(java.lang.Object old, org.apache.avro.Schema schema)
newRecord
in class org.apache.avro.generic.GenericDatumReader<java.lang.Object>
protected java.lang.Object newArray(java.lang.Object old, int size, org.apache.avro.Schema schema)
newArray
in class org.apache.avro.generic.GenericDatumReader<java.lang.Object>
protected java.lang.Object readString(java.lang.Object old, org.apache.avro.Schema expected, org.apache.avro.io.Decoder in) throws java.io.IOException
readString
in class org.apache.avro.generic.GenericDatumReader<java.lang.Object>
java.io.IOException
protected java.lang.Object readBytes(java.lang.Object old, org.apache.avro.io.Decoder in) throws java.io.IOException
readBytes
in class org.apache.avro.generic.GenericDatumReader<java.lang.Object>
java.io.IOException
Copyright © 2007-2012 The Apache Software Foundation