mirror of
https://github.com/apache/sqoop.git
synced 2025-05-19 02:10:54 +08:00
SQOOP-536. Blob import doesn't work with avro 1.7.1.
(Cheolsoo Park via Jarek Jarcec Cecho) git-svn-id: https://svn.apache.org/repos/asf/sqoop/trunk@1369193 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1df2fb6bdf
commit
02f45c4161
@ -113,7 +113,8 @@ private Object toAvro(Object o) {
|
||||
BlobRef br = (BlobRef) o;
|
||||
// If blob data is stored in an external .lob file, save the ref file
|
||||
// as Avro bytes. If materialized inline, save blob data as Avro bytes.
|
||||
return br.isExternal() ? br.toString().getBytes() : br.getData();
|
||||
byte[] bytes = br.isExternal() ? br.toString().getBytes() : br.getData();
|
||||
return ByteBuffer.wrap(bytes);
|
||||
} else if (o instanceof ClobRef) {
|
||||
throw new UnsupportedOperationException("ClobRef not suported");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user