【发布时间】:2021-10-22 13:33:17
【问题描述】:
目前我们需要使用 Sqoop 建立基于 SSL 的连接,以将数据从 MySQL 提取到 HDFS。根据AWS和Sqoop的相关文档,我们完成了以下命令的拼接:
sqoop-import \
--connect "jdbc:mysql://remote-db.amazonaws.com.cn:3306/TSTWOWDB?verifyServerCertificate=false&useSSL=true&requireSSL=true&sslMode=VERIFY_IDENTITY&trustCertificateKeyStoreUrl=/home/etl/ivan/ssl/clientkeystore.jks&trustCertificateKeyStorePassword=xxxxxx" \
--username "TEST_USER" --password "xxxxxx" \
--table "t_wrong_qrcodes" \
--target-dir /tmp/ivan/t_wrong_qrcodes \
-m 1
属性中,'/home/etl/ivan/ssl/clientkeystore.jks'为提交服务器的本地文件路径。
任务启动后报如下错误:Caused by: java.io.FileNotFoundException: /mnt/home/etl/ivan/ssl/clientkeystore.jks (No such file or directory),好像是因为Sqoop启动了Map-Reduce任务,但是没有这个文件路径'/mnt/home/etl/ivan/ssl/ clientkeystore.jks' 在每个计算节点上。
如何设置准确的属性,是否有操作损失?
Sqoop 版本 - 1.4.7
参考资料:
【问题讨论】: