Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Sqoop Export HDFS to MySQL Fails


Sqoop Export HDFS to MySQL Fails


I don't know where I am going wrong, but my Sqoop export command from HDFS to MySQL fails everytime.

sqoop export --connect "jdbc:mysql://quickstart.cloudera:3306/streaming" --username root --password cloudera --table pd_count --update-key id --update-mode allowinsert  --export-dir /user/cloudera/input/* -m 1 --batch
sqoop export --connect "jdbc:mysql://quickstart.cloudera:3306/streaming" --username root --password cloudera --table pd_count_cp --export-dir /user/cloudera/input/pedestrian_count --update-key sensor_id --update-mode updateonly --input-fields-terminated-by ',' --input-lines-terminated-by '\n' --direct -m 1 --verbose

There is only 1 folder in the export directory, and it contains 2 files namely,

  1. part-m-00000
  2. part-m-00001

I have updated last file so as to learn about --update argument. But, the job fails, no matter how many permutations I try.

  1. I export data into MySQL table 1 without incremental update and data gets exported successfully.
  2. I import the data from table 2 into HDFS with "incremental append", it's a sucess.
  3. But when I try to export same data into MySQL table 1 with "update-key", and "update mode", it doesn't transfer and fails.

Above mentioned command was the last used command.

Following is the recent error log at this link, and extended error log at this link. Please do help me.

Thanks in advance.