You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ja...@apache.org on 2012/08/03 22:20:02 UTC
svn commit: r1369193 -
/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/AvroImportMapper.java
Author: jarcec
Date: Fri Aug 3 20:20:01 2012
New Revision: 1369193
URL: http://svn.apache.org/viewvc?rev=1369193&view=rev
Log:
SQOOP-536. Blob import doesn't work with avro 1.7.1.
(Cheolsoo Park via Jarek Jarcec Cecho)
Modified:
sqoop/trunk/src/java/org/apache/sqoop/mapreduce/AvroImportMapper.java
Modified: sqoop/trunk/src/java/org/apache/sqoop/mapreduce/AvroImportMapper.java
URL: http://svn.apache.org/viewvc/sqoop/trunk/src/java/org/apache/sqoop/mapreduce/AvroImportMapper.java?rev=1369193&r1=1369192&r2=1369193&view=diff
==============================================================================
--- sqoop/trunk/src/java/org/apache/sqoop/mapreduce/AvroImportMapper.java (original)
+++ sqoop/trunk/src/java/org/apache/sqoop/mapreduce/AvroImportMapper.java Fri Aug 3 20:20:01 2012
@@ -113,7 +113,8 @@ public class AvroImportMapper
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");
}