使用 sqoop 将 mysql table 导入 hdfs 时出错

Error when import a mysql table to hdfs using sqoop

我开始学习 hadoop 并正在自己练习,当我尝试使用 sqoop 将 mysql table 导入 hdfs 时出现问题:

sqoop import --connect jdbc:mysql://localhost/employees --username=root -P --table=dept_emp --warehouse-dir=dept_emp -where dept_no='d001' --m 1;

dept_emp大概有20k条记录。

输出结果如下:

2016-09-26 16:42:26,467 INFO [main] ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8032. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

2016-09-26 16:42:27,470 INFO [main] ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8032. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

"Already tried x time(s)"从0增加到9,然后又从0循环到9,挂在那里。

有人能给我一些启示吗?

非常感谢。

请更正语法:

--where "dept_no='d001'" 
-m 1;