sqoop - 为什么我的 sqoop 导入不适用于 hadoop 加密密码方法?
问题描述
根据一些要求,我使用了 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
查看错误的性质,我尝试了 sqoop 开关的所有可能排列组合,但它们都不起作用。
有人可以帮我找出我的错误吗?
谢谢
解决方案
sqoop 调用命令中不需要凭据提供程序 api。您只需要指定密码别名就可以了。还要记住这一点,在 sqoop 中使用之前,您必须保存密码别名。hadoop 凭证提供程序 api 仅在 hadoop 2.6 之后可用。
推荐阅读
- python - 在为扫描的 PDF 创建文本层时编辑文本而不弄乱页面外观?
- javascript - 单击单元格内的图标时,Ag-Grid 防止 onRowClicked 事件
- python - Python 获取请求只是返回 []
- python - 如何确定正确的异常类
- java - JavaFX TreeTableView 披露节点箭头停止行选择
- swiftui - 在 SwiftUI 中将 SF 符号调整为相同大小看起来不正确
- reactjs - 即使我编写了外部文件,也将我的反应库汇总到包中
- flutter - 如何在 Flutter 中的列表中添加溢出?
- oracle - Oracle - 不一致的数据类型:预期的 CHAR 得到了 REF
- javascript - 图像采集器空 url