org.apache.hadoop.hive.ql.io
Class HiveIgnoreKeyTextOutputFormat<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>

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

public class HiveIgnoreKeyTextOutputFormat<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
extends org.apache.hadoop.mapred.TextOutputFormat<K,V>
implements HiveOutputFormat<K,V>

HiveIgnoreKeyTextOutputFormat replaces key with null before feeding the to TextOutputFormat.RecordWriter.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapred.FileOutputFormat
org.apache.hadoop.mapred.FileOutputFormat.Counter
 
Constructor Summary
HiveIgnoreKeyTextOutputFormat()
           
 
Method Summary
 FileSinkOperator.RecordWriter getHiveRecordWriter(org.apache.hadoop.mapred.JobConf jc, org.apache.hadoop.fs.Path outPath, Class<? extends org.apache.hadoop.io.Writable> valueClass, boolean isCompressed, Properties tableProperties, org.apache.hadoop.util.Progressable progress)
          create the final out file, and output row by row.
 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)
           
 
Methods inherited from class org.apache.hadoop.mapred.FileOutputFormat
checkOutputSpecs, getCompressOutput, getOutputCompressorClass, getOutputPath, getPathForCustomFile, getTaskOutputPath, getUniqueName, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputPath, setWorkOutputPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.mapred.OutputFormat
checkOutputSpecs
 

Constructor Detail

HiveIgnoreKeyTextOutputFormat

public HiveIgnoreKeyTextOutputFormat()
Method Detail

getHiveRecordWriter

public FileSinkOperator.RecordWriter getHiveRecordWriter(org.apache.hadoop.mapred.JobConf jc,
                                                         org.apache.hadoop.fs.Path outPath,
                                                         Class<? extends org.apache.hadoop.io.Writable> valueClass,
                                                         boolean isCompressed,
                                                         Properties tableProperties,
                                                         org.apache.hadoop.util.Progressable progress)
                                                  throws IOException
create the final out file, and output row by row. After one row is appended, a configured row separator is appended

Specified by:
getHiveRecordWriter in interface HiveOutputFormat<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
Parameters:
jc - the job configuration file
outPath - the final output file to be created
valueClass - the value class used for create
isCompressed - whether the content is compressed or not
tableProperties - the tableProperties of this file's corresponding table
progress - progress used for status report
Returns:
the RecordWriter
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 extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
Overrides:
getRecordWriter in class org.apache.hadoop.mapred.TextOutputFormat<K extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable>
Throws:
IOException


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