org.apache.pig.impl.util.avro
Class AvroRecordWriter
java.lang.Object
org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.NullWritable,Object>
org.apache.pig.impl.util.avro.AvroRecordWriter
public class AvroRecordWriter
- extends org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.NullWritable,Object>
RecordWriter for Avro objects.
Constructor Summary |
AvroRecordWriter(org.apache.hadoop.fs.Path o,
org.apache.hadoop.conf.Configuration c)
Creates new AvroRecordWriter. |
Method Summary |
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext arg0)
|
void |
prepareToWrite(org.apache.avro.Schema s)
|
void |
write(org.apache.hadoop.io.NullWritable key,
Object value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AvroRecordWriter
public AvroRecordWriter(org.apache.hadoop.fs.Path o,
org.apache.hadoop.conf.Configuration c)
throws IOException
- Creates new AvroRecordWriter.
- Parameters:
s
- Schema for the files on this output patho
- Output pathc
- Hadoop configuration
- Throws:
IOException
close
public void close(org.apache.hadoop.mapreduce.TaskAttemptContext arg0)
throws IOException,
InterruptedException
- Specified by:
close
in class org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.NullWritable,Object>
- Throws:
IOException
InterruptedException
write
public void write(org.apache.hadoop.io.NullWritable key,
Object value)
throws IOException,
InterruptedException
- Specified by:
write
in class org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.NullWritable,Object>
- Throws:
IOException
InterruptedException
prepareToWrite
public void prepareToWrite(org.apache.avro.Schema s)
throws IOException
- Throws:
IOException
Copyright © 2007-2012 The Apache Software Foundation