org.apache.hadoop.hive.ql.io.orc
Class OrcOutputFormat

java.lang.Object
  extended by org.apache.hadoop.mapred.FileOutputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>
      extended by org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat
All Implemented Interfaces:
AcidOutputFormat<org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>, HiveOutputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>, org.apache.hadoop.mapred.OutputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>

public class OrcOutputFormat
extends org.apache.hadoop.mapred.FileOutputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>
implements AcidOutputFormat<org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>

A Hive OutputFormat for ORC files.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapred.FileOutputFormat
org.apache.hadoop.mapred.FileOutputFormat.Counter
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.ql.io.AcidOutputFormat
AcidOutputFormat.Options
 
Constructor Summary
OrcOutputFormat()
           
 
Method Summary
 StatsProvidingRecordWriter getHiveRecordWriter(org.apache.hadoop.mapred.JobConf conf, org.apache.hadoop.fs.Path path, Class<? extends org.apache.hadoop.io.Writable> valueClass, boolean isCompressed, Properties tableProperties, org.apache.hadoop.util.Progressable reporter)
          create the final out file and get some specific settings.
 FileSinkOperator.RecordWriter getRawRecordWriter(org.apache.hadoop.fs.Path path, AcidOutputFormat.Options options)
          Create a raw writer for ACID events.
 RecordUpdater getRecordUpdater(org.apache.hadoop.fs.Path path, AcidOutputFormat.Options options)
          Create a RecordUpdater for inserting, updating, or deleting records.
 org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.NullWritable,org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow> getRecordWriter(org.apache.hadoop.fs.FileSystem fileSystem, org.apache.hadoop.mapred.JobConf conf, String name, org.apache.hadoop.util.Progressable reporter)
           
 
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

OrcOutputFormat

public OrcOutputFormat()
Method Detail

getRecordWriter

public org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.NullWritable,org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow> getRecordWriter(org.apache.hadoop.fs.FileSystem fileSystem,
                                                                                                                                                      org.apache.hadoop.mapred.JobConf conf,
                                                                                                                                                      String name,
                                                                                                                                                      org.apache.hadoop.util.Progressable reporter)
                                                                                                                                               throws IOException
Specified by:
getRecordWriter in interface org.apache.hadoop.mapred.OutputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>
Specified by:
getRecordWriter in class org.apache.hadoop.mapred.FileOutputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>
Throws:
IOException

getHiveRecordWriter

public StatsProvidingRecordWriter getHiveRecordWriter(org.apache.hadoop.mapred.JobConf conf,
                                                      org.apache.hadoop.fs.Path path,
                                                      Class<? extends org.apache.hadoop.io.Writable> valueClass,
                                                      boolean isCompressed,
                                                      Properties tableProperties,
                                                      org.apache.hadoop.util.Progressable reporter)
                                               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.NullWritable,org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>
Parameters:
conf - 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
tableProperties - the table properties of this file's corresponding table
reporter - progress used for status report
Returns:
the RecordWriter for the output file
Throws:
IOException

getRecordUpdater

public RecordUpdater getRecordUpdater(org.apache.hadoop.fs.Path path,
                                      AcidOutputFormat.Options options)
                               throws IOException
Description copied from interface: AcidOutputFormat
Create a RecordUpdater for inserting, updating, or deleting records.

Specified by:
getRecordUpdater in interface AcidOutputFormat<org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>
Parameters:
path - the partition directory name
options - the options for the writer
Returns:
the RecordUpdater for the output file
Throws:
IOException

getRawRecordWriter

public FileSinkOperator.RecordWriter getRawRecordWriter(org.apache.hadoop.fs.Path path,
                                                        AcidOutputFormat.Options options)
                                                 throws IOException
Description copied from interface: AcidOutputFormat
Create a raw writer for ACID events. This is only intended for the compactor.

Specified by:
getRawRecordWriter in interface AcidOutputFormat<org.apache.hadoop.hive.ql.io.orc.OrcSerde.OrcSerdeRow>
Parameters:
path - the root directory
options - options for writing the file
Returns:
a record writer
Throws:
IOException


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