根据某些要求,我使用了hadoop安全密码加密方法来加密密码,并将其与sqoop导入一起使用。下面是讨论加密方法的链接。
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
考虑到错误的性质,我尝试了所有可能的静噪开关组合,但是它们都没有起作用。
请帮助我找出我的错误吗?
谢谢
答案 0 :(得分:0)
在sqoop invoke命令中不需要凭据提供程序api。您只需要指定密码别名即可使用。另外请记住,在sqoop中使用密码别名之前,必须保存密码别名。 hadoop凭据提供程序api仅在hadoop 2.6之后可用。