org.apache.pig.piggybank.storage.avro
Class PigAvroOutputFormat

java.lang.Object
  extended by org.apache.hadoop.mapreduce.OutputFormat<K,V>
      extended by org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<org.apache.hadoop.io.NullWritable,Object>
          extended by org.apache.pig.piggybank.storage.avro.PigAvroOutputFormat

public class PigAvroOutputFormat
extends org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<org.apache.hadoop.io.NullWritable,Object>

The OutputFormat for avro data.


Field Summary
static int DEFAULT_DEFLATE_LEVEL
          The default deflate level.
static String DEFLATE_LEVEL_KEY
          The configuration key for Avro deflate level.
static String EXT
          The file name extension for avro data files.
 
Constructor Summary
PigAvroOutputFormat()
          default constructor
PigAvroOutputFormat(org.apache.avro.Schema s)
          construct with specified output schema
 
Method Summary
 org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.NullWritable,Object> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
           
static void setDeflateLevel(org.apache.hadoop.mapreduce.Job job, int level)
          Enable output compression using the deflate codec and specify its level.
 
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
 

Field Detail

EXT

public static final String EXT
The file name extension for avro data files.

See Also:
Constant Field Values

DEFLATE_LEVEL_KEY

public static final String DEFLATE_LEVEL_KEY
The configuration key for Avro deflate level.

See Also:
Constant Field Values

DEFAULT_DEFLATE_LEVEL

public static final int DEFAULT_DEFLATE_LEVEL
The default deflate level.

See Also:
Constant Field Values
Constructor Detail

PigAvroOutputFormat

public PigAvroOutputFormat()
default constructor


PigAvroOutputFormat

public PigAvroOutputFormat(org.apache.avro.Schema s)
construct with specified output schema

Parameters:
s - output schema
Method Detail

setDeflateLevel

public static void setDeflateLevel(org.apache.hadoop.mapreduce.Job job,
                                   int level)
Enable output compression using the deflate codec and specify its level.


getRecordWriter

public org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.NullWritable,Object> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                                                                   throws IOException,
                                                                                                          InterruptedException
Specified by:
getRecordWriter in class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<org.apache.hadoop.io.NullWritable,Object>
Throws:
IOException
InterruptedException


Copyright © ${year} The Apache Software Foundation