org.apache.hadoop.hive.ql.io
Class RCFileOutputFormat

java.lang.Object
  extended by 
      extended by org.apache.hadoop.hive.ql.io.RCFileOutputFormat
All Implemented Interfaces:
HiveOutputFormat<WritableComparable,BytesRefArrayWritable>

public class RCFileOutputFormat
extends
implements HiveOutputFormat<WritableComparable,BytesRefArrayWritable>

RCFileOutputFormat.


Constructor Summary
RCFileOutputFormat()
           
 
Method Summary
static int getColumnNumber(Configuration conf)
          Returns the number of columns set in the conf for writers.
 FileSinkOperator.RecordWriter getHiveRecordWriter(JobConf jc, Path finalOutPath, Class<? extends Writable> valueClass, boolean isCompressed, Properties tableProperties, Progressable progress)
          create the final out file.
  getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress)
          
static void setColumnNumber(Configuration conf, int columnNum)
          set number of columns into the given configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hive.ql.io.HiveOutputFormat
getHiveRecordWriter
 

Constructor Detail

RCFileOutputFormat

public RCFileOutputFormat()
Method Detail

setColumnNumber

public static void setColumnNumber(Configuration conf,
                                   int columnNum)
set number of columns into the given configuration.

Parameters:
conf - configuration instance which need to set the column number
columnNum - column number for RCFile's Writer

getColumnNumber

public static int getColumnNumber(Configuration conf)
Returns the number of columns set in the conf for writers.

Parameters:
conf -
Returns:
number of columns for RCFile's writer

getRecordWriter

public  getRecordWriter(FileSystem ignored,
                             JobConf job,
                             String name,
                             Progressable progress)
                      throws IOException

Throws:
IOException

getHiveRecordWriter

public FileSinkOperator.RecordWriter getHiveRecordWriter(JobConf jc,
                                                         Path finalOutPath,
                                                         Class<? extends Writable> valueClass,
                                                         boolean isCompressed,
                                                         Properties tableProperties,
                                                         Progressable progress)
                                                  throws IOException
create the final out file.

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 tableInfo of this file's corresponding table
progress - progress used for status report
Throws:
IOException


Copyright © 2012 The Apache Software Foundation