我不知道我哪里出错了,但是每次从HDFS到MySQL的Sqoop导出命令都会失败。
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
导出目录中只有一个文件夹,它包含3个文件,即
我已更新上一个文件,以便了解--update参数。但是,无论我尝试多少排列,工作都会失败。
上面提到的命令是最后使用过的命令。
以下是此link的最新错误日志, 请帮帮我。
提前致谢。
答案 0 :(得分:0)
Ok..I was assuming something different.Could you try using the below options
--verbose
in the export once again for extended logs.yarn logs -applicationId application_1513399439223_0001 >
app_logs.txt.
--input-fields-terminated-by
.Updating the Answer as per your latest comment
I see you have killed the job.It might be related to performance.Please try tuning the below and run the sqoop again:
-m 4
--batch
sqoop.export.records.per.statement
to specify the
number of records that will be used in each insert statement
sqoop export -Dsqoop.export.records.per.statement=100 --connect
sqoop export
-Dsqoop.export.statements.per.transaction=100 --connect
Please provide the yarn logs and what is the volume of data?