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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.Counter
 
Field Summary
static int DEFAULT_DEFLATE_LEVEL
          The default deflate level.
static String DEFLATE_CODEC
          The deflate codec
static String DEFLATE_LEVEL_KEY
          The configuration key for Avro deflate level.
static String EXT
          The file name extension for avro data files.
static String OUTPUT_CODEC
          The configuration key for the Avro codec.
static String SYNC_INTERVAL_KEY
          The configuration key for Avro sync interval.
 
Fields inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
BASE_OUTPUT_NAME, PART
 
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, 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
 

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

OUTPUT_CODEC

public static final String OUTPUT_CODEC
The configuration key for the Avro codec.

See Also:
Constant Field Values

DEFLATE_CODEC

public static final String DEFLATE_CODEC
The deflate codec

See Also:
Constant Field Values

SYNC_INTERVAL_KEY

public static final String SYNC_INTERVAL_KEY
The configuration key for Avro sync interval.

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 © 2007-2012 The Apache Software Foundation