sqoop import 自动增量导入 报错

来源:互联网 发布:java源代码下载 编辑:程序博客网 时间:2024/06/05 04:57

报错:
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Error parsing arguments for job:
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: job_1
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: –connect
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: jdbc:mysql://sunchen11/hadoopguide
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: –username
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: root
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: –password
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: root
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: –table
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: widgets
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: -m
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: 1
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: –append
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: –check-column
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: id
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: –incremental
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: append
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: –list-value
17/04/12 09:49:18 ERROR tool.BaseSqoopTool: Unrecognized argument: 1

这里写图片描述

原因:参数输入错误。漏了– import。

sqoop job --create job_2 -- import --connect 'jdbc:mysql://sunchen11/hadoopguide' --username root --password root --table widgets -m 1 --target-dir --target-dir /sqoop/test/djt_user --append --check-column 'id' --incremental append --last-value 1

0 0