From commits-return-825-apmail-sqoop-commits-archive=sqoop.apache.org@sqoop.apache.org Thu Mar 7 17:27:58 2013 Return-Path: X-Original-To: apmail-sqoop-commits-archive@www.apache.org Delivered-To: apmail-sqoop-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7824FECAE for ; Thu, 7 Mar 2013 17:27:58 +0000 (UTC) Received: (qmail 82736 invoked by uid 500); 7 Mar 2013 17:27:58 -0000 Delivered-To: apmail-sqoop-commits-archive@sqoop.apache.org Received: (qmail 82705 invoked by uid 500); 7 Mar 2013 17:27:58 -0000 Mailing-List: contact commits-help@sqoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sqoop.apache.org Delivered-To: mailing list commits@sqoop.apache.org Received: (qmail 82641 invoked by uid 99); 7 Mar 2013 17:27:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Mar 2013 17:27:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Mar 2013 17:27:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C2B982388C54; Thu, 7 Mar 2013 17:27:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1453973 [12/17] - in /sqoop/site/trunk/content/resources/docs/1.4.3: ./ api/ api/com/ api/com/cloudera/ api/com/cloudera/sqoop/ api/com/cloudera/sqoop/lib/ api/com/cloudera/sqoop/lib/class-use/ api/org/ api/org/apache/ api/org/apache/sqoop... Date: Thu, 07 Mar 2013 17:26:57 -0000 To: commits@sqoop.apache.org From: jarcec@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130307172702.C2B982388C54@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/JdbcWritableBridge.html URL: http://svn.apache.org/viewvc/sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/JdbcWritableBridge.html?rev=1453973&view=auto ============================================================================== --- sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/JdbcWritableBridge.html (added) +++ sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/JdbcWritableBridge.html Thu Mar 7 17:26:54 2013 @@ -0,0 +1,937 @@ + + + + + + +JdbcWritableBridge (Sqoop 1.4.3 API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.apache.sqoop.lib +
+Class JdbcWritableBridge

+
+java.lang.Object
+  extended by org.apache.sqoop.lib.JdbcWritableBridge
+
+
+
+
public final class JdbcWritableBridge
extends java.lang.Object
+ + +

+Contains a set of methods which can read db columns from a ResultSet into + Java types, and do serialization of these types to/from DataInput/DataOutput + for use with Hadoop's Writable implementation. This supports null values + for all types. +

+ +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+static longMAX_BLOB_LENGTH + +
+           
+static longMAX_CLOB_LENGTH + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static java.math.BigDecimalreadBigDecimal(int colNum, + java.sql.ResultSet r) + +
+           
+static BlobRefreadBlobRef(int colNum, + java.sql.ResultSet r) + +
+           
+static java.lang.BooleanreadBoolean(int colNum, + java.sql.ResultSet r) + +
+           
+static org.apache.hadoop.io.BytesWritablereadBytesWritable(int colNum, + java.sql.ResultSet r) + +
+           
+static ClobRefreadClobRef(int colNum, + java.sql.ResultSet r) + +
+           
+static java.sql.DatereadDate(int colNum, + java.sql.ResultSet r) + +
+           
+static java.lang.DoublereadDouble(int colNum, + java.sql.ResultSet r) + +
+           
+static java.lang.FloatreadFloat(int colNum, + java.sql.ResultSet r) + +
+           
+static java.lang.IntegerreadInteger(int colNum, + java.sql.ResultSet r) + +
+           
+static java.lang.LongreadLong(int colNum, + java.sql.ResultSet r) + +
+           
+static java.lang.StringreadString(int colNum, + java.sql.ResultSet r) + +
+           
+static java.sql.TimereadTime(int colNum, + java.sql.ResultSet r) + +
+           
+static java.sql.TimestampreadTimestamp(int colNum, + java.sql.ResultSet r) + +
+           
+static voidwriteBigDecimal(java.math.BigDecimal val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteBlobRef(BlobRef val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteBoolean(java.lang.Boolean val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteBytesWritable(org.apache.hadoop.io.BytesWritable val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteClobRef(ClobRef val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteDate(java.sql.Date val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteDouble(java.lang.Double val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteFloat(java.lang.Float val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteInteger(java.lang.Integer val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteLong(java.lang.Long val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteString(java.lang.String val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteTime(java.sql.Time val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+static voidwriteTimestamp(java.sql.Timestamp val, + int paramIdx, + int sqlType, + java.sql.PreparedStatement s) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+MAX_BLOB_LENGTH

+
+public static final long MAX_BLOB_LENGTH
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MAX_CLOB_LENGTH

+
+public static final long MAX_CLOB_LENGTH
+
+
+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Method Detail
+ +

+readInteger

+
+public static java.lang.Integer readInteger(int colNum,
+                                            java.sql.ResultSet r)
+                                     throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readLong

+
+public static java.lang.Long readLong(int colNum,
+                                      java.sql.ResultSet r)
+                               throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readString

+
+public static java.lang.String readString(int colNum,
+                                          java.sql.ResultSet r)
+                                   throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readFloat

+
+public static java.lang.Float readFloat(int colNum,
+                                        java.sql.ResultSet r)
+                                 throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readDouble

+
+public static java.lang.Double readDouble(int colNum,
+                                          java.sql.ResultSet r)
+                                   throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readBoolean

+
+public static java.lang.Boolean readBoolean(int colNum,
+                                            java.sql.ResultSet r)
+                                     throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readTime

+
+public static java.sql.Time readTime(int colNum,
+                                     java.sql.ResultSet r)
+                              throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readTimestamp

+
+public static java.sql.Timestamp readTimestamp(int colNum,
+                                               java.sql.ResultSet r)
+                                        throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readDate

+
+public static java.sql.Date readDate(int colNum,
+                                     java.sql.ResultSet r)
+                              throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readBytesWritable

+
+public static org.apache.hadoop.io.BytesWritable readBytesWritable(int colNum,
+                                                                   java.sql.ResultSet r)
+                                                            throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readBigDecimal

+
+public static java.math.BigDecimal readBigDecimal(int colNum,
+                                                  java.sql.ResultSet r)
+                                           throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readBlobRef

+
+public static BlobRef readBlobRef(int colNum,
+                                  java.sql.ResultSet r)
+                           throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+readClobRef

+
+public static ClobRef readClobRef(int colNum,
+                                  java.sql.ResultSet r)
+                           throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeInteger

+
+public static void writeInteger(java.lang.Integer val,
+                                int paramIdx,
+                                int sqlType,
+                                java.sql.PreparedStatement s)
+                         throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeLong

+
+public static void writeLong(java.lang.Long val,
+                             int paramIdx,
+                             int sqlType,
+                             java.sql.PreparedStatement s)
+                      throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeDouble

+
+public static void writeDouble(java.lang.Double val,
+                               int paramIdx,
+                               int sqlType,
+                               java.sql.PreparedStatement s)
+                        throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeBoolean

+
+public static void writeBoolean(java.lang.Boolean val,
+                                int paramIdx,
+                                int sqlType,
+                                java.sql.PreparedStatement s)
+                         throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeFloat

+
+public static void writeFloat(java.lang.Float val,
+                              int paramIdx,
+                              int sqlType,
+                              java.sql.PreparedStatement s)
+                       throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeString

+
+public static void writeString(java.lang.String val,
+                               int paramIdx,
+                               int sqlType,
+                               java.sql.PreparedStatement s)
+                        throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeTimestamp

+
+public static void writeTimestamp(java.sql.Timestamp val,
+                                  int paramIdx,
+                                  int sqlType,
+                                  java.sql.PreparedStatement s)
+                           throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeTime

+
+public static void writeTime(java.sql.Time val,
+                             int paramIdx,
+                             int sqlType,
+                             java.sql.PreparedStatement s)
+                      throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeDate

+
+public static void writeDate(java.sql.Date val,
+                             int paramIdx,
+                             int sqlType,
+                             java.sql.PreparedStatement s)
+                      throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeBytesWritable

+
+public static void writeBytesWritable(org.apache.hadoop.io.BytesWritable val,
+                                      int paramIdx,
+                                      int sqlType,
+                                      java.sql.PreparedStatement s)
+                               throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeBigDecimal

+
+public static void writeBigDecimal(java.math.BigDecimal val,
+                                   int paramIdx,
+                                   int sqlType,
+                                   java.sql.PreparedStatement s)
+                            throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeBlobRef

+
+public static void writeBlobRef(BlobRef val,
+                                int paramIdx,
+                                int sqlType,
+                                java.sql.PreparedStatement s)
+                         throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+
+ +

+writeClobRef

+
+public static void writeClobRef(ClobRef val,
+                                int paramIdx,
+                                int sqlType,
+                                java.sql.PreparedStatement s)
+                         throws java.sql.SQLException
+
+
+ +
Throws: +
java.sql.SQLException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © 2013 The Apache Software Foundation + + Added: sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/LargeObjectLoader.html URL: http://svn.apache.org/viewvc/sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/LargeObjectLoader.html?rev=1453973&view=auto ============================================================================== --- sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/LargeObjectLoader.html (added) +++ sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/LargeObjectLoader.html Thu Mar 7 17:26:54 2013 @@ -0,0 +1,435 @@ + + + + + + +LargeObjectLoader (Sqoop 1.4.3 API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.apache.sqoop.lib +
+Class LargeObjectLoader

+
+java.lang.Object
+  extended by org.apache.sqoop.lib.LargeObjectLoader
+
+
+
All Implemented Interfaces:
java.io.Closeable
+
+
+
Direct Known Subclasses:
LargeObjectLoader
+
+
+
+
public class LargeObjectLoader
extends java.lang.Object
implements java.io.Closeable
+ + +

+Contains a set of methods which can read db columns from a ResultSet into + Java types, and do serialization of these types to/from DataInput/DataOutput + for use with Hadoop's Writable implementation. This supports null values + for all types. + + This is a singleton instance class; only one may exist at a time. + However, its lifetime is limited to the current TaskInputOutputContext's + life. +

+ +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+static longDEFAULT_MAX_LOB_LENGTH + +
+           
+static java.lang.StringMAX_INLINE_LOB_LEN_KEY + +
+           
+  + + + + + + + + + + +
+Constructor Summary
LargeObjectLoader(org.apache.hadoop.conf.Configuration conf, + org.apache.hadoop.fs.Path workPath) + +
+          Create a new LargeObjectLoader.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidclose() + +
+           
+protected  voidfinalize() + +
+           
+ BlobRefreadBlobRef(int colNum, + java.sql.ResultSet r) + +
+          Actually read a BlobRef instance from the ResultSet and materialize + the data either inline or to a file.
+ ClobRefreadClobRef(int colNum, + java.sql.ResultSet r) + +
+          Actually read a ClobRef instance from the ResultSet and materialize + the data either inline or to a file.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+DEFAULT_MAX_LOB_LENGTH

+
+public static final long DEFAULT_MAX_LOB_LENGTH
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MAX_INLINE_LOB_LEN_KEY

+
+public static final java.lang.String MAX_INLINE_LOB_LEN_KEY
+
+
+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Constructor Detail
+ +

+LargeObjectLoader

+
+public LargeObjectLoader(org.apache.hadoop.conf.Configuration conf,
+                         org.apache.hadoop.fs.Path workPath)
+                  throws java.io.IOException
+
+
Create a new LargeObjectLoader. +

+

+
Parameters:
conf - the Configuration to use
workPath - the HDFS working directory for this task. +
Throws: +
java.io.IOException
+
+ + + + + + + + +
+Method Detail
+ +

+finalize

+
+protected void finalize()
+                 throws java.lang.Throwable
+
+
+
Overrides:
finalize in class java.lang.Object
+
+
+ +
Throws: +
java.lang.Throwable
+
+
+
+ +

+close

+
+public void close()
+           throws java.io.IOException
+
+
+
Specified by:
close in interface java.io.Closeable
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+readBlobRef

+
+public BlobRef readBlobRef(int colNum,
+                           java.sql.ResultSet r)
+                    throws java.io.IOException,
+                           java.lang.InterruptedException,
+                           java.sql.SQLException
+
+
Actually read a BlobRef instance from the ResultSet and materialize + the data either inline or to a file. +

+

+
+
+
+
Parameters:
colNum - the column of the ResultSet's current row to read.
r - the ResultSet to read from. +
Returns:
a BlobRef encapsulating the data in this field. +
Throws: +
java.io.IOException - if an error occurs writing to the FileSystem. +
java.sql.SQLException - if an error occurs reading from the database. +
java.lang.InterruptedException
+
+
+
+ +

+readClobRef

+
+public ClobRef readClobRef(int colNum,
+                           java.sql.ResultSet r)
+                    throws java.io.IOException,
+                           java.lang.InterruptedException,
+                           java.sql.SQLException
+
+
Actually read a ClobRef instance from the ResultSet and materialize + the data either inline or to a file. +

+

+
+
+
+
Parameters:
colNum - the column of the ResultSet's current row to read.
r - the ResultSet to read from. +
Returns:
a ClobRef encapsulating the data in this field. +
Throws: +
java.io.IOException - if an error occurs writing to the FileSystem. +
java.sql.SQLException - if an error occurs reading from the database. +
java.lang.InterruptedException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © 2013 The Apache Software Foundation + + Added: sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/LobRef.html URL: http://svn.apache.org/viewvc/sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/LobRef.html?rev=1453973&view=auto ============================================================================== --- sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/LobRef.html (added) +++ sqoop/site/trunk/content/resources/docs/1.4.3/api/org/apache/sqoop/lib/LobRef.html Thu Mar 7 17:26:54 2013 @@ -0,0 +1,802 @@ + + + + + + +LobRef (Sqoop 1.4.3 API) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.apache.sqoop.lib +
+Class LobRef<DATATYPE,CONTAINERTYPE,ACCESSORTYPE>

+
+java.lang.Object
+  extended by org.apache.sqoop.lib.LobRef<DATATYPE,CONTAINERTYPE,ACCESSORTYPE>
+
+
+
All Implemented Interfaces:
java.io.Closeable, org.apache.hadoop.io.Writable
+
+
+
Direct Known Subclasses:
LobRef
+
+
+
+
public abstract class LobRef<DATATYPE,CONTAINERTYPE,ACCESSORTYPE>
extends java.lang.Object
implements java.io.Closeable, org.apache.hadoop.io.Writable
+ + +

+Abstract base class that holds a reference to a Blob or a Clob. + DATATYPE is the type being held (e.g., a byte array). + CONTAINERTYPE is the type used to hold this data (e.g., BytesWritable). + ACCESSORTYPE is the type used to access this data in a streaming fashion + (either an InputStream or a Reader). +

+ +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+protected static java.lang.ThreadLocal<java.util.regex.Matcher>EXTERNAL_MATCHER + +
+           
+static org.apache.commons.logging.LogLOG + +
+           
+  + + + + + + + + + + + + + + + + + + + +
+Constructor Summary
+protected LobRef() + +
+           
+protected LobRef(CONTAINERTYPE container) + +
+           
+protected LobRef(java.lang.String file, + long offset, + long length) + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ java.lang.Objectclone() + +
+           
+ voidclose() + +
+           
+protected abstract  CONTAINERTYPEdeepCopyData(CONTAINERTYPE data) + +
+          Make a copy of the materialized data.
+protected  voidfinalize() + +
+           
+ DATATYPEgetData() + +
+           
+protected  CONTAINERTYPEgetDataObj() + +
+          Internal API to retrieve the data object.
+ ACCESSORTYPEgetDataStream(org.apache.hadoop.conf.Configuration conf, + org.apache.hadoop.fs.Path basePath) + +
+          Get access to the LOB data itself.
+ ACCESSORTYPEgetDataStream(org.apache.hadoop.mapreduce.Mapper.Context mapContext) + +
+          Convenience method to access #getDataStream(Configuration, Path) + from within a map task that read this LobRef from a file-based + InputSplit.
+protected abstract  ACCESSORTYPEgetExternalSource(com.cloudera.sqoop.io.LobFile.Reader reader) + +
+          Using the LobFile reader, get an accessor InputStream or Reader to the + underlying data.
+protected abstract  DATATYPEgetInternalData(CONTAINERTYPE data) + +
+           
+protected abstract  ACCESSORTYPEgetInternalSource(CONTAINERTYPE data) + +
+          Wrap the materialized data in an InputStream or Reader.
+ booleanisExternal() + +
+           
+ voidreadFields(java.io.DataInput in) + +
+           
+protected abstract  voidreadFieldsInternal(java.io.DataInput in) + +
+          Perform the readFields() operation on a fully-materializable record.
+protected  voidsetDataObj(CONTAINERTYPE data) + +
+          Internal API to set the data object.
+ java.lang.StringtoString() + +
+           
+ voidwrite(java.io.DataOutput out) + +
+           
+protected abstract  voidwriteInternal(java.io.DataOutput out) + +
+          Perform the write() operation on a fully-materializable record.
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+LOG

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

+EXTERNAL_MATCHER

+
+protected static final java.lang.ThreadLocal<java.util.regex.Matcher> EXTERNAL_MATCHER
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+LobRef

+
+protected LobRef()
+
+
+
+ +

+LobRef

+
+protected LobRef(CONTAINERTYPE container)
+
+
+
+ +

+LobRef

+
+protected LobRef(java.lang.String file,
+                 long offset,
+                 long length)
+
+
+ + + + + + + + +
+Method Detail
+ +

+getDataObj

+
+protected CONTAINERTYPE getDataObj()
+
+
Internal API to retrieve the data object. +

+

+
+
+
+
+
+
+
+ +

+setDataObj

+
+protected void setDataObj(CONTAINERTYPE data)
+
+
Internal API to set the data object. +

+

+
+
+
+
+
+
+
+ +

+clone

+
+public java.lang.Object clone()
+                       throws java.lang.CloneNotSupportedException
+
+
+
Overrides:
clone in class java.lang.Object
+
+
+ +
Throws: +
java.lang.CloneNotSupportedException
+
+
+
+ +

+finalize

+
+protected void finalize()
+                 throws java.lang.Throwable
+
+
+
Overrides:
finalize in class java.lang.Object
+
+
+ +
Throws: +
java.lang.Throwable
+
+
+
+ +

+close

+
+public void close()
+           throws java.io.IOException
+
+
+
Specified by:
close in interface java.io.Closeable
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+isExternal

+
+public boolean isExternal()
+
+
+
+
+
+ +
Returns:
true if the LOB data is in an external file; false if + it materialized inline.
+
+
+
+ +

+getDataStream

+
+public ACCESSORTYPE getDataStream(org.apache.hadoop.mapreduce.Mapper.Context mapContext)
+                           throws java.io.IOException
+
+
Convenience method to access #getDataStream(Configuration, Path) + from within a map task that read this LobRef from a file-based + InputSplit. +

+

+
+
+
+
Parameters:
mapContext - the Mapper.Context instance that encapsulates + the current map task. +
Returns:
an object that lazily streams the record to the client. +
Throws: +
java.lang.IllegalArgumentException - if it cannot find the source + path for this LOB based on the MapContext. +
java.io.IOException - if it could not read the LOB from external storage.
+
+
+
+ +

+getDataStream

+
+public ACCESSORTYPE getDataStream(org.apache.hadoop.conf.Configuration conf,
+                                  org.apache.hadoop.fs.Path basePath)
+                           throws java.io.IOException
+
+
Get access to the LOB data itself. + This method returns a lazy reader of the LOB data, accessing the + filesystem for external LOB storage as necessary. +

+

+
+
+
+
Parameters:
conf - the Configuration used to access the filesystem
basePath - the base directory where the table records are + stored. +
Returns:
an object that lazily streams the record to the client. +
Throws: +
java.io.IOException - if it could not read the LOB from external storage.
+
+
+
+ +

+getExternalSource

+
+protected abstract ACCESSORTYPE getExternalSource(com.cloudera.sqoop.io.LobFile.Reader reader)
+                                           throws java.io.IOException
+
+
Using the LobFile reader, get an accessor InputStream or Reader to the + underlying data. +

+

+
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+getInternalSource

+
+protected abstract ACCESSORTYPE getInternalSource(CONTAINERTYPE data)
+
+
Wrap the materialized data in an InputStream or Reader. +

+

+
+
+
+
+
+
+
+ +

+getInternalData

+
+protected abstract DATATYPE getInternalData(CONTAINERTYPE data)
+
+
+
+
+
+ +
Returns:
the materialized data itself.
+
+
+
+ +

+deepCopyData

+
+protected abstract CONTAINERTYPE deepCopyData(CONTAINERTYPE data)
+
+
Make a copy of the materialized data. +

+

+
+
+
+
+
+
+
+ +

+getData

+
+public DATATYPE getData()
+
+
+
+
+
+
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Object
+
+
+
+
+
+
+ +

+readFields

+
+public void readFields(java.io.DataInput in)
+                throws java.io.IOException
+
+
+
Specified by:
readFields in interface org.apache.hadoop.io.Writable
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+readFieldsInternal

+
+protected abstract void readFieldsInternal(java.io.DataInput in)
+                                    throws java.io.IOException
+
+
Perform the readFields() operation on a fully-materializable record. +

+

+
+
+
+
Parameters:
in - the DataInput to deserialize from. +
Throws: +
java.io.IOException
+
+
+
+ +

+write

+
+public void write(java.io.DataOutput out)
+           throws java.io.IOException
+
+
+
Specified by:
write in interface org.apache.hadoop.io.Writable
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+writeInternal

+
+protected abstract void writeInternal(java.io.DataOutput out)
+                               throws java.io.IOException
+
+
Perform the write() operation on a fully-materializable record. +

+

+
+
+
+
Parameters:
out - the DataOutput to deserialize to. +
Throws: +
java.io.IOException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © 2013 The Apache Software Foundation + +