org.apache.hadoop.hive.ql.io
Class HivePassThroughOutputFormat<K,V>

java.lang.Object
  extended by org.apache.hadoop.hive.ql.io.HivePassThroughOutputFormat<K,V>
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, HiveOutputFormat<K,V>, org.apache.hadoop.mapred.OutputFormat<K,V>

public class HivePassThroughOutputFormat<K,V>
extends Object
implements org.apache.hadoop.conf.Configurable, HiveOutputFormat<K,V>

This pass through class is used to wrap OutputFormat implementations such that new OutputFormats not derived from HiveOutputFormat gets through the checker


Field Summary
static String HIVE_PASSTHROUGH_OF_CLASSNAME
           
static String HIVE_PASSTHROUGH_STORAGEHANDLER_OF_JOBCONFKEY
           
 
Constructor Summary
HivePassThroughOutputFormat()
           
 
Method Summary
 void checkOutputSpecs(org.apache.hadoop.fs.FileSystem ignored, org.apache.hadoop.mapred.JobConf job)
           
 org.apache.hadoop.conf.Configuration getConf()
           
 FileSinkOperator.RecordWriter getHiveRecordWriter(org.apache.hadoop.mapred.JobConf jc, org.apache.hadoop.fs.Path finalOutPath, Class<? extends org.apache.hadoop.io.Writable> valueClass, boolean isCompressed, Properties tableProperties, org.apache.hadoop.util.Progressable progress)
          create the final out file and get some specific settings.
 org.apache.hadoop.mapred.RecordWriter<K,V> getRecordWriter(org.apache.hadoop.fs.FileSystem ignored, org.apache.hadoop.mapred.JobConf job, String name, org.apache.hadoop.util.Progressable progress)
           
 void setConf(org.apache.hadoop.conf.Configuration config)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HIVE_PASSTHROUGH_OF_CLASSNAME

public static final String HIVE_PASSTHROUGH_OF_CLASSNAME
See Also:
Constant Field Values

HIVE_PASSTHROUGH_STORAGEHANDLER_OF_JOBCONFKEY

public static final String HIVE_PASSTHROUGH_STORAGEHANDLER_OF_JOBCONFKEY
See Also:
Constant Field Values
Constructor Detail

HivePassThroughOutputFormat

public HivePassThroughOutputFormat()
Method Detail

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<K,V>
Throws:
IOException

getRecordWriter

public org.apache.hadoop.mapred.RecordWriter<K,V> getRecordWriter(org.apache.hadoop.fs.FileSystem ignored,
                                                                  org.apache.hadoop.mapred.JobConf job,
                                                                  String name,
                                                                  org.apache.hadoop.util.Progressable progress)
                                                           throws IOException
Specified by:
getRecordWriter in interface org.apache.hadoop.mapred.OutputFormat<K,V>
Throws:
IOException

getHiveRecordWriter

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

Specified by:
getHiveRecordWriter in interface HiveOutputFormat<K,V>
Parameters:
jc - the job configuration file
finalOutPath - the final output file to be created
valueClass - the value class used for create
isCompressed - whether the content is compressed or not
tableProperties - the table properties of this file's corresponding table
progress - progress used for status report
Returns:
the RecordWriter for the output file
Throws:
IOException

getConf

public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable

setConf

public void setConf(org.apache.hadoop.conf.Configuration config)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable


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