public class BlobRef extends LobRef<byte[],org.apache.hadoop.io.BytesWritable,java.io.InputStream>
Modifier and Type | Field and Description |
---|---|
static org.apache.commons.logging.Log |
LOG |
EXTERNAL_MATCHER
Constructor and Description |
---|
BlobRef() |
BlobRef(byte[] bytes) |
BlobRef(java.lang.String file,
long offset,
long length)
Initialize a BlobRef to an external BLOB.
|
Modifier and Type | Method and Description |
---|---|
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(org.apache.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.
|
clone, close, finalize, getData, getDataObj, getDataStream, getDataStream, isExternal, readFields, setDataObj, toString, write
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.protected java.io.InputStream getExternalSource(org.apache.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.IOException
protected 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.IOException
public static BlobRef parse(java.lang.String inputString)
inputString
- the text-based input data to parse.Copyright © 2019 The Apache Software Foundation