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

java.lang.Object
  extended by org.apache.hadoop.hive.ql.io.orc.OrcFile

public final class OrcFile
extends Object

Contains factory methods to read or write ORC files.


Nested Class Summary
static class OrcFile.OrcTableProperties
          Enum container for all orc table properties.
static class OrcFile.ReaderOptions
           
static class OrcFile.Version
          Create a version number for the ORC file format, so that we can add non-forward compatible changes in the future.
static interface OrcFile.WriterCallback
           
static interface OrcFile.WriterContext
           
static class OrcFile.WriterOptions
          Options for creating ORC file writers.
 
Field Summary
static String BLOCK_PADDING
          Deprecated. 
static String COMPRESSION
          Deprecated. 
static String COMPRESSION_BLOCK_SIZE
          Deprecated. 
static String ENABLE_INDEXES
          Deprecated. 
static String MAGIC
           
static String ROW_INDEX_STRIDE
          Deprecated. 
static String STRIPE_SIZE
          Deprecated. 
 
Method Summary
static Reader createReader(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path)
          Create an ORC file reader.
static Reader createReader(org.apache.hadoop.fs.Path path, OrcFile.ReaderOptions options)
           
static Writer createWriter(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.conf.Configuration conf, ObjectInspector inspector, long stripeSize, CompressionKind compress, int bufferSize, int rowIndexStride)
          Create an ORC file writer.
static Writer createWriter(org.apache.hadoop.fs.Path path, OrcFile.WriterOptions opts)
          Create an ORC file writer.
static OrcFile.ReaderOptions readerOptions(org.apache.hadoop.conf.Configuration conf)
           
static OrcFile.WriterOptions writerOptions(org.apache.hadoop.conf.Configuration conf)
          Create a default set of write options that can be modified.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAGIC

public static final String MAGIC
See Also:
Constant Field Values

COMPRESSION

@Deprecated
public static final String COMPRESSION
Deprecated. 
See Also:
Constant Field Values

COMPRESSION_BLOCK_SIZE

@Deprecated
public static final String COMPRESSION_BLOCK_SIZE
Deprecated. 
See Also:
Constant Field Values

STRIPE_SIZE

@Deprecated
public static final String STRIPE_SIZE
Deprecated. 
See Also:
Constant Field Values

ROW_INDEX_STRIDE

@Deprecated
public static final String ROW_INDEX_STRIDE
Deprecated. 
See Also:
Constant Field Values

ENABLE_INDEXES

@Deprecated
public static final String ENABLE_INDEXES
Deprecated. 
See Also:
Constant Field Values

BLOCK_PADDING

@Deprecated
public static final String BLOCK_PADDING
Deprecated. 
See Also:
Constant Field Values
Method Detail

createReader

public static Reader createReader(org.apache.hadoop.fs.FileSystem fs,
                                  org.apache.hadoop.fs.Path path)
                           throws IOException
Create an ORC file reader.

Parameters:
fs - file system
path - file name to read from
Returns:
a new ORC file reader.
Throws:
IOException

readerOptions

public static OrcFile.ReaderOptions readerOptions(org.apache.hadoop.conf.Configuration conf)

createReader

public static Reader createReader(org.apache.hadoop.fs.Path path,
                                  OrcFile.ReaderOptions options)
                           throws IOException
Throws:
IOException

writerOptions

public static OrcFile.WriterOptions writerOptions(org.apache.hadoop.conf.Configuration conf)
Create a default set of write options that can be modified.


createWriter

public static Writer createWriter(org.apache.hadoop.fs.Path path,
                                  OrcFile.WriterOptions opts)
                           throws IOException
Create an ORC file writer. This is the public interface for creating writers going forward and new options will only be added to this method.

Parameters:
path - filename to write to
opts - the options
Returns:
a new ORC file writer
Throws:
IOException

createWriter

public static Writer createWriter(org.apache.hadoop.fs.FileSystem fs,
                                  org.apache.hadoop.fs.Path path,
                                  org.apache.hadoop.conf.Configuration conf,
                                  ObjectInspector inspector,
                                  long stripeSize,
                                  CompressionKind compress,
                                  int bufferSize,
                                  int rowIndexStride)
                           throws IOException
Create an ORC file writer. This method is provided for API backward compatability with Hive 0.11.

Parameters:
fs - file system
path - filename to write to
inspector - the ObjectInspector that inspects the rows
stripeSize - the number of bytes in a stripe
compress - how to compress the file
bufferSize - the number of bytes to compress at once
rowIndexStride - the number of rows between row index entries or 0 to suppress all indexes
Returns:
a new ORC file writer
Throws:
IOException


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