Apache Sqoop导入错误

时间:2014-12-08 20:22:52

标签: hadoop import cloudera sqoop cloudera-cdh

尝试将表从MySql导入HDFS时出现以下错误。我正在使用cloudera CDH 4 VM。

[cloudera@localhost ~]$ sqoop import --connect jdbc:mysql://localhost/mydatabase\
> --user root\
> --password aaaaaaaa\
> --table bike
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
14/12/08 11:44:40 INFO sqoop.Sqoop: Running Sqoop version: 1.4.3-cdh4.7.0
14/12/08 11:44:41 ERROR tool.BaseSqoopTool: Error parsing arguments for import:
14/12/08 11:44:41 ERROR tool.BaseSqoopTool: Unrecognized argument: root--password
14/12/08 11:44:41 ERROR tool.BaseSqoopTool: Unrecognized argument: aaaaaaaa--table
14/12/08 11:44:41 ERROR tool.BaseSqoopTool: Unrecognized argument: bike

Try --help for usage instructions.
usage: sqoop import [GENERIC-ARGS] [TOOL-ARGS] 

1 个答案:

答案 0 :(得分:0)

尝试使用此

sqoop import --connect jdbc:mysql://mysql_server:3306/mydatabase --username root --password aaaaaaaa --table bike ;


您应该使用 - 用户名而不是--user