org.apache.avro.mapreduce
Class AvroSequenceFileOutputFormat<K,V>
java.lang.Object
org.apache.hadoop.mapreduce.OutputFormat<K,V>
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,V>
org.apache.avro.mapreduce.AvroSequenceFileOutputFormat<K,V>
- Type Parameters:
K - The job output key type (may be a Writable, AvroKey).V - The job output value type (may be a Writable, AvroValue).
public class AvroSequenceFileOutputFormat<K,V>
- extends org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,V>
A sequence file output format that knows how to write AvroKeys and AvroValues in
addition to Writables.
| Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat |
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.Counter |
|
Method Summary |
static org.apache.hadoop.io.SequenceFile.CompressionType |
getOutputCompressionType(org.apache.hadoop.conf.Configuration conf)
Gets type of compression for the output sequence file. |
org.apache.hadoop.mapreduce.RecordWriter<K,V> |
getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
|
static void |
setOutputCompressionType(org.apache.hadoop.mapreduce.Job job,
org.apache.hadoop.io.SequenceFile.CompressionType compressionType)
Sets the type of compression for the output sequence file. |
| Methods inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat |
checkOutputSpecs, getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AvroSequenceFileOutputFormat
public AvroSequenceFileOutputFormat()
getRecordWriter
public org.apache.hadoop.mapreduce.RecordWriter<K,V> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException,
InterruptedException
-
- Specified by:
getRecordWriter in class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,V>
- Throws:
IOException
InterruptedException
setOutputCompressionType
public static void setOutputCompressionType(org.apache.hadoop.mapreduce.Job job,
org.apache.hadoop.io.SequenceFile.CompressionType compressionType)
- Sets the type of compression for the output sequence file.
- Parameters:
job - The job configuration.compressionType - The compression type for the target sequence file.
getOutputCompressionType
public static org.apache.hadoop.io.SequenceFile.CompressionType getOutputCompressionType(org.apache.hadoop.conf.Configuration conf)
- Gets type of compression for the output sequence file.
- Parameters:
conf - The job configuration.
- Returns:
- The compression type.
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.