org.apache.hadoop.hive.ql.io.avro
Class AvroContainerOutputFormat

java.lang.Object
  extended by org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat
All Implemented Interfaces:
HiveOutputFormat<org.apache.hadoop.io.LongWritable,AvroGenericRecordWritable>, org.apache.hadoop.mapred.OutputFormat<org.apache.hadoop.io.LongWritable,AvroGenericRecordWritable>

public class AvroContainerOutputFormat
extends Object
implements HiveOutputFormat<org.apache.hadoop.io.LongWritable,AvroGenericRecordWritable>

Write to an Avro file from a Hive process.


Constructor Summary
AvroContainerOutputFormat()
           
 
Method Summary
 void checkOutputSpecs(org.apache.hadoop.fs.FileSystem ignored, org.apache.hadoop.mapred.JobConf job)
           
 FileSinkOperator.RecordWriter getHiveRecordWriter(org.apache.hadoop.mapred.JobConf jobConf, org.apache.hadoop.fs.Path path, Class<? extends org.apache.hadoop.io.Writable> valueClass, boolean isCompressed, Properties properties, org.apache.hadoop.util.Progressable progressable)
          create the final out file and get some specific settings.
 org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.LongWritable,AvroGenericRecordWritable> getRecordWriter(org.apache.hadoop.fs.FileSystem ignored, org.apache.hadoop.mapred.JobConf job, String name, org.apache.hadoop.util.Progressable progress)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroContainerOutputFormat

public AvroContainerOutputFormat()
Method Detail

getHiveRecordWriter

public FileSinkOperator.RecordWriter getHiveRecordWriter(org.apache.hadoop.mapred.JobConf jobConf,
                                                         org.apache.hadoop.fs.Path path,
                                                         Class<? extends org.apache.hadoop.io.Writable> valueClass,
                                                         boolean isCompressed,
                                                         Properties properties,
                                                         org.apache.hadoop.util.Progressable progressable)
                                                  throws IOException
Description copied from interface: HiveOutputFormat
create the final out file and get some specific settings.

Specified by:
getHiveRecordWriter in interface HiveOutputFormat<org.apache.hadoop.io.LongWritable,AvroGenericRecordWritable>
Parameters:
jobConf - the job configuration file
path - the final output file to be created
valueClass - the value class used for create
isCompressed - whether the content is compressed or not
properties - the table properties of this file's corresponding table
progressable - progress used for status report
Returns:
the RecordWriter for the output file
Throws:
IOException

getRecordWriter

public org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.LongWritable,AvroGenericRecordWritable> getRecordWriter(org.apache.hadoop.fs.FileSystem ignored,
                                                                                                                          org.apache.hadoop.mapred.JobConf job,
                                                                                                                          String name,
                                                                                                                          org.apache.hadoop.util.Progressable progress)
Specified by:
getRecordWriter in interface org.apache.hadoop.mapred.OutputFormat<org.apache.hadoop.io.LongWritable,AvroGenericRecordWritable>

checkOutputSpecs

public void checkOutputSpecs(org.apache.hadoop.fs.FileSystem ignored,
                             org.apache.hadoop.mapred.JobConf job)
                      throws IOException
Specified by:
checkOutputSpecs in interface org.apache.hadoop.mapred.OutputFormat<org.apache.hadoop.io.LongWritable,AvroGenericRecordWritable>
Throws:
IOException


Copyright © 2014 The Apache Software Foundation. All rights reserved.