为什么我的sqoop导入不能使用hadoop加密密码方法?

问题描述 投票:0回答:1

根据某些要求,我使用了hadoop安全密码加密方法来加密密码并将其与sqoop import一起使用。以下是谈论加密方法的链接。

http://www.hadoopadmin.co.in/tag/hadoop-security-credential-provider-path/

但是,当我执行下面的sqoop导入时: -

sqoop import -Dhadoop.security.credentials.provider.path=jceks://<hdfs path to file>/encrypt.jceks --connect 'jdbc:sqlserver://IP:PORT/DB' -–username abd -–password-alias alias_pwd -–table Table_name --hive-import --create-hive-table --hive-table amitesh_db.hive_tbl --target-dir /<path>/hive_test -m 2

我收到以下错误: -

18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Error parsing arguments for import:
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: -–username
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: abd
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: -–password-alias
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: alias_pwd
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: -–table
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: Table_name 
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: --hive-import
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: --create-hive-table
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: --hive-table
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: amitesh_db.hive_tbl 
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: --target-dir
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: /<path>/hive_test
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: -m
18/08/27 08:17:42 ERROR tool.BaseSqoopTool: Unrecognized argument: 2

看看错误的本质,我已经尝试了sqoop交换机的所有可能的排列组合,但它们都没有工作。

有人可以帮我弄清楚我的错吗?

谢谢

sqoop
1个回答
0
投票

sqoop invoke命令中不需要凭证提供程序api。您只需指定密码别名即可。另外请记住,在sqoop中使用密码别名之前必须先保存密码别名。 hadoop凭证提供程序api仅在hadoop 2.6之后可用。

© www.soinside.com 2019 - 2024. All rights reserved.