com.cloudera.sqoop.io
Class LobFile

java.lang.Object
  extended by com.cloudera.sqoop.io.LobFile

public final class LobFile
extends java.lang.Object

File format which stores large object records. The format allows large objects to be read through individual InputStreams to allow reading without full materialization of a single record. Each record is assigned an id and can be accessed by id efficiently by consulting an index at the end of the file. The LobFile format is specified at: http://wiki.github.com/cloudera/sqoop/sip-3


Nested Class Summary
static class LobFile.Reader
          Class that can read a LobFile.
static class LobFile.Writer
          Class that writes out a LobFile.
 
Field Summary
static int LATEST_LOB_VERSION
           
static org.apache.commons.logging.Log LOG
           
 
Method Summary
static LobFile.Writer create(org.apache.hadoop.fs.Path p, org.apache.hadoop.conf.Configuration conf)
          Creates a LobFile Writer configured for uncompressed binary data.
static LobFile.Writer create(org.apache.hadoop.fs.Path p, org.apache.hadoop.conf.Configuration conf, boolean isCharData)
          Creates a LobFile Writer configured for uncompressed data.
static LobFile.Writer create(org.apache.hadoop.fs.Path p, org.apache.hadoop.conf.Configuration conf, boolean isCharData, java.lang.String codec)
          Creates a LobFile Writer.
static LobFile.Writer create(org.apache.hadoop.fs.Path p, org.apache.hadoop.conf.Configuration conf, boolean isCharData, java.lang.String codec, int entriesPerSegment)
          Creates a LobFile Writer.
static LobFile.Reader open(org.apache.hadoop.fs.Path p, org.apache.hadoop.conf.Configuration conf)
          Creates a LobFile Reader configured to read from the specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

LATEST_LOB_VERSION

public static final int LATEST_LOB_VERSION
See Also:
Constant Field Values
Method Detail

open

public static LobFile.Reader open(org.apache.hadoop.fs.Path p,
                                  org.apache.hadoop.conf.Configuration conf)
                           throws java.io.IOException
Creates a LobFile Reader configured to read from the specified file.

Throws:
java.io.IOException

create

public static LobFile.Writer create(org.apache.hadoop.fs.Path p,
                                    org.apache.hadoop.conf.Configuration conf)
                             throws java.io.IOException
Creates a LobFile Writer configured for uncompressed binary data.

Parameters:
p - the path to create.
conf - the configuration to use to interact with the filesystem.
Throws:
java.io.IOException

create

public static LobFile.Writer create(org.apache.hadoop.fs.Path p,
                                    org.apache.hadoop.conf.Configuration conf,
                                    boolean isCharData)
                             throws java.io.IOException
Creates a LobFile Writer configured for uncompressed data.

Parameters:
p - the path to create.
conf - the configuration to use to interact with the filesystem.
isCharData - true if this is for CLOBs, false for BLOBs.
Throws:
java.io.IOException

create

public static LobFile.Writer create(org.apache.hadoop.fs.Path p,
                                    org.apache.hadoop.conf.Configuration conf,
                                    boolean isCharData,
                                    java.lang.String codec)
                             throws java.io.IOException
Creates a LobFile Writer.

Parameters:
p - the path to create.
conf - the configuration to use to interact with the filesystem.
isCharData - true if this is for CLOBs, false for BLOBs.
codec - the compression codec to use (or null for none).
Throws:
java.io.IOException

create

public static LobFile.Writer create(org.apache.hadoop.fs.Path p,
                                    org.apache.hadoop.conf.Configuration conf,
                                    boolean isCharData,
                                    java.lang.String codec,
                                    int entriesPerSegment)
                             throws java.io.IOException
Creates a LobFile Writer.

Parameters:
p - the path to create.
conf - the configuration to use to interact with the filesystem.
isCharData - true if this is for CLOBs, false for BLOBs.
codec - the compression codec to use (or null for none).
entriesPerSegment - number of entries per index segment.
Throws:
java.io.IOException


Copyright © 2010 Cloudera, Inc.