sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject svn commit: r1369193 - /sqoop/trunk/src/java/org/apache/sqoop/mapreduce/AvroImportMapper.java
Date Fri, 03 Aug 2012 20:20:02 GMT
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");
     }



Mime
View raw message