|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sqoop.lib.LobRef<DATATYPE,CONTAINERTYPE,ACCESSORTYPE>
com.cloudera.sqoop.lib.LobRef<byte[],org.apache.hadoop.io.BytesWritable,java.io.InputStream>
org.apache.sqoop.lib.BlobRef
public class BlobRef
BlobRef is a wrapper that holds a BLOB either directly, or a reference to a file that holds the BLOB data.
| Field Summary | |
|---|---|
static org.apache.commons.logging.Log |
LOG
|
| Fields inherited from class com.cloudera.sqoop.lib.LobRef |
|---|
EXTERNAL_MATCHER |
| Constructor Summary | |
|---|---|
BlobRef()
|
|
BlobRef(byte[] bytes)
|
|
BlobRef(java.lang.String file,
long offset,
long length)
Initialize a BlobRef to an external BLOB. |
|
| Method Summary | |
|---|---|
protected org.apache.hadoop.io.BytesWritable |
deepCopyData(org.apache.hadoop.io.BytesWritable data)
Make a copy of the materialized data. |
protected java.io.InputStream |
getExternalSource(com.cloudera.sqoop.io.LobFile.Reader reader)
Using the LobFile reader, get an accessor InputStream or Reader to the underlying data. |
protected byte[] |
getInternalData(org.apache.hadoop.io.BytesWritable data)
|
protected java.io.InputStream |
getInternalSource(org.apache.hadoop.io.BytesWritable data)
Wrap the materialized data in an InputStream or Reader. |
static BlobRef |
parse(java.lang.String inputString)
Create a BlobRef based on parsed data from a line of text. |
void |
readFieldsInternal(java.io.DataInput in)
Perform the readFields() operation on a fully-materializable record. |
void |
writeInternal(java.io.DataOutput out)
Perform the write() operation on a fully-materializable record. |
| Methods inherited from class org.apache.sqoop.lib.LobRef |
|---|
clone, close, finalize, getData, getDataObj, getDataStream, getDataStream, isExternal, readFields, setDataObj, toString, write |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public BlobRef()
public BlobRef(byte[] bytes)
public BlobRef(java.lang.String file,
long offset,
long length)
file - the filename to the BLOB. May be relative to the job dir.offset - the offset (in bytes) into the LobFile for this record.length - the length of the record in bytes.| Method Detail |
|---|
protected java.io.InputStream getExternalSource(com.cloudera.sqoop.io.LobFile.Reader reader)
throws java.io.IOException
LobRef
getExternalSource in class LobRef<byte[],org.apache.hadoop.io.BytesWritable,java.io.InputStream>java.io.IOExceptionprotected java.io.InputStream getInternalSource(org.apache.hadoop.io.BytesWritable data)
LobRef
getInternalSource in class LobRef<byte[],org.apache.hadoop.io.BytesWritable,java.io.InputStream>protected byte[] getInternalData(org.apache.hadoop.io.BytesWritable data)
getInternalData in class LobRef<byte[],org.apache.hadoop.io.BytesWritable,java.io.InputStream>protected org.apache.hadoop.io.BytesWritable deepCopyData(org.apache.hadoop.io.BytesWritable data)
LobRef
deepCopyData in class LobRef<byte[],org.apache.hadoop.io.BytesWritable,java.io.InputStream>
public void readFieldsInternal(java.io.DataInput in)
throws java.io.IOException
LobRef
readFieldsInternal in class LobRef<byte[],org.apache.hadoop.io.BytesWritable,java.io.InputStream>in - the DataInput to deserialize from.
java.io.IOException
public void writeInternal(java.io.DataOutput out)
throws java.io.IOException
LobRef
writeInternal in class LobRef<byte[],org.apache.hadoop.io.BytesWritable,java.io.InputStream>out - the DataOutput to deserialize to.
java.io.IOExceptionpublic static BlobRef parse(java.lang.String inputString)
inputString - the text-based input data to parse.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||