You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Chiwan Park (JIRA)" <ji...@apache.org> on 2014/11/09 17:11:33 UTC
[jira] [Commented] (SQOOP-991) Not able to export blob datatype
from HDFS to MySQL
[ https://issues.apache.org/jira/browse/SQOOP-991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14203974#comment-14203974 ]
Chiwan Park commented on SQOOP-991:
-----------------------------------
I have a same problem with following situation and want to submit patch solving this problem.
MySQL version: 5.6.21
Hadoop version: Apache Hadoop 2.5.1
Sqoop branch: trunk (Sqoop1)
Database table:
{code}
CREATE TABLE sqoop_test2
(
ID INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
DATA LONGBLOB NOT NULL
);
{code}
Export command: sqoop export --connect jdbc:mysql://localhost/test --table sqoop_test2 --export-dir /sqoop-test --username root
Exception got:
{code}
Caused by: java.lang.CloneNotSupportedException: com.cloudera.sqoop.lib.BlobRef
at java.lang.Object.clone(Native Method)
at org.apache.sqoop.lib.LobRef.clone(LobRef.java:110)
at sqoop_test2.clone(sqoop_test2.java:270)
at org.apache.sqoop.mapreduce.AsyncSqlRecordWriter.write(AsyncSqlRecordWriter.java:213)
... 15 more
{code}
> Not able to export blob datatype from HDFS to MySQL
> ---------------------------------------------------
>
> Key: SQOOP-991
> URL: https://issues.apache.org/jira/browse/SQOOP-991
> Project: Sqoop
> Issue Type: Bug
> Reporter: prashanthi
>
> Inserted a .txt/pdf/jpg/jpeg file to blob column and trying to import it to HDFS. and it is fine. while exporting the same to MySql it is giving
> java.io.IOException: Could not buffer record Caused by: java.lang.CloneNotSupportedException: com.cloudera.sqoop.lib.BlobRef
> Ifi import the file as sequence file to HDFS then also import is fine but when exporting same to MySQL it says that java.lang.RuntimeException: java.io.IOException: WritableName can't load class: pdffile
> Please help me on resolving the issue.
> Commands which i am using to import and export are
> sqoop import --connect jdbc:mysql://localhost/test --table Image --fields-terminated-by '\t' --username root --password naveen@123 -m 1
> sqoop export --connect jdbc:mysql://localhost/test --table Image_new --export-dir /user/naveen/Image --fields-terminated-by '\t' --username root --password naveen@123 -m 1
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)