datafu.hourglass.avro
Class AvroKeyWithMetadataOutputFormat<T>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.OutputFormat<K,V>
      extended by org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,V>
          extended by org.apache.avro.mapreduce.AvroOutputFormatBase<org.apache.avro.mapred.AvroKey<T>,org.apache.hadoop.io.NullWritable>
              extended by datafu.hourglass.avro.AvroKeyWithMetadataOutputFormat<T>
Type Parameters:
T - The (java) type of the Avro data to write.

public class AvroKeyWithMetadataOutputFormat<T>
extends org.apache.avro.mapreduce.AvroOutputFormatBase<org.apache.avro.mapred.AvroKey<T>,org.apache.hadoop.io.NullWritable>

FileOutputFormat for writing Avro container files.

Since Avro container files only contain records (not key/value pairs), this output format ignores the value.


Nested Class Summary
protected static class AvroKeyWithMetadataOutputFormat.RecordWriterFactory<T>
          A factory for creating record writers.
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.Counter
 
Field Summary
 
Fields inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
BASE_OUTPUT_NAME, PART
 
Constructor Summary
  AvroKeyWithMetadataOutputFormat()
          Constructor.
protected AvroKeyWithMetadataOutputFormat(AvroKeyWithMetadataOutputFormat.RecordWriterFactory recordWriterFactory)
          Constructor.
 
Method Summary
 org.apache.hadoop.mapreduce.RecordWriter<org.apache.avro.mapred.AvroKey<T>,org.apache.hadoop.io.NullWritable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
          
 
Methods inherited from class org.apache.avro.mapreduce.AvroOutputFormatBase
getAvroFileOutputStream, getCompressionCodec
 
Methods inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
checkOutputSpecs, getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroKeyWithMetadataOutputFormat

public AvroKeyWithMetadataOutputFormat()
Constructor.


AvroKeyWithMetadataOutputFormat

protected AvroKeyWithMetadataOutputFormat(AvroKeyWithMetadataOutputFormat.RecordWriterFactory recordWriterFactory)
Constructor.

Parameters:
recordWriterFactory - A factory for creating record writers.
Method Detail

getRecordWriter

public org.apache.hadoop.mapreduce.RecordWriter<org.apache.avro.mapred.AvroKey<T>,org.apache.hadoop.io.NullWritable> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                                                                                              throws java.io.IOException

Specified by:
getRecordWriter in class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<org.apache.avro.mapred.AvroKey<T>,org.apache.hadoop.io.NullWritable>
Throws:
java.io.IOException


Matthew Hayes