错误工具.BaseSqoopTool:解析作业的参数时出错:Sqoop我试图在sqoop中创建作业,但发生以下错误

时间:2017-02-28 03:34:34

标签: sqoop bigdata

sqoop job --create myjob --import --connect "jdbc:mysql://localhost/classicmodels" --username root --password 123 --table customers -m 1 --taget-dir /manoj280217/sqoop

错误:

17/02/28 08:56:18 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Error parsing arguments for job:
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: --import
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: --connect
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: jdbc:mysql://localhost/classicmodels
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: --username
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: root
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: --password
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: 123
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: --table
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: customers
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: -m
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: 1
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: --taget-dir
17/02/28 08:56:18 ERROR tool.BaseSqoopTool: Unrecognized argument: /manoj280217/sqoop

3 个答案:

答案 0 :(得分:8)

sqoop job的语法是

sqoop-job (generic-args) (job-args) [-- [subtool-name] (subtool-args)]

你的命令应该是

sqoop job --create myjob -- import --connect "jdbc:mysql://localhost/classicmodels" --username root --password 123 --table customers -m 1 --taget-dir /manoj280217/sqoop

查看--import

之间的空格

答案 1 :(得分:0)

这听起来很奇怪,但这就是你解决问题的方法:确保你手动输入整个命令而不是复制/粘贴它。对于jdbc

,也不需要ps“”

答案 2 :(得分:0)

大多数情况下,问题仅是由于空格和引号引起的。对于我来说,情况总是如此。重新输入命令,并注意该命令。