org.apache.hadoop.hive.serde2.avro
Class AvroGenericRecordWritable

java.lang.Object
  extended by org.apache.hadoop.hive.serde2.avro.AvroGenericRecordWritable
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class AvroGenericRecordWritable
extends Object
implements org.apache.hadoop.io.Writable

Wrapper around an Avro GenericRecord. Necessary because Hive's deserializer will happily deserialize any object - as long as it's a writable.


Constructor Summary
AvroGenericRecordWritable()
           
AvroGenericRecordWritable(org.apache.avro.generic.GenericRecord record)
           
 
Method Summary
 org.apache.avro.generic.GenericRecord getRecord()
           
 void readFields(DataInput in)
           
 void setRecord(org.apache.avro.generic.GenericRecord record)
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroGenericRecordWritable

public AvroGenericRecordWritable()

AvroGenericRecordWritable

public AvroGenericRecordWritable(org.apache.avro.generic.GenericRecord record)
Method Detail

getRecord

public org.apache.avro.generic.GenericRecord getRecord()

setRecord

public void setRecord(org.apache.avro.generic.GenericRecord record)

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2011 The Apache Software Foundation