org.apache.avro.mapred
Class AvroWrapper<T>

java.lang.Object
  extended by org.apache.avro.mapred.AvroWrapper<T>
Direct Known Subclasses:
AvroKey, AvroValue

public class AvroWrapper<T>
extends Object

The wrapper of data for jobs configured with AvroJob .


Constructor Summary
AvroWrapper()
          Wrap null.
AvroWrapper(T datum)
          Wrap a datum.
 
Method Summary
 T datum()
          Return the wrapped datum.
 void datum(T datum)
          Set the wrapped datum.
 boolean equals(Object obj)
           
 int hashCode()
           
 String toString()
          Get the wrapped datum as JSON.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AvroWrapper

public AvroWrapper()
Wrap null. Construct AvroWrapper wrapping no datum.


AvroWrapper

public AvroWrapper(T datum)
Wrap a datum.

Method Detail

datum

public T datum()
Return the wrapped datum.


datum

public void datum(T datum)
Set the wrapped datum.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Get the wrapped datum as JSON.

Overrides:
toString in class Object


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.