S3 作为 Sqoop 导入中的目标目录 [英] S3 as Target Dir in Sqoop Import

查看:46
本文介绍了S3 作为 Sqoop 导入中的目标目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用 sqoop import 命令导入数据库表,目标目录指定为 Amazon S3 存储桶名称.命令如下

Trying to import database table using sqoop import command with target directory specified as Amazon S3 bucket name. The command is as below

sqoop import --connect jdbc:mysql://hostname/mytable --username myuser --password mypassword --table mytable --target-dir s3://<secret_code>:<secret_key>@s3-us-west-2.amazonaws.com/mybucket/

它一直给我拒绝访问 S3Exception.密钥/代码凭证有效并且为每个人设置了存储桶权限.

It keeps giving me Access Denied S3Exception. The secret key/code credentials are valid and bucket permissions are set for everyone.

感谢您的帮助.

推荐答案

您是否尝试过以下链接?根据博客,它应该是 s3a.

did you try out this below link? it should be s3a as per the blog.

https://www.cloudera.com/documentation/enterprise/latest/topics/admin_sqoop_s3_import.html

sqoop -Dfs.s3a.access.key=xxxxx -Dfs.s3a.secret.key=xxxxx -Dfs.s3a.endpoint="s3.amazonaws.com" \
import --connect jdbc:mysql://hostname/mytable --username myuser --password mypassword --table mytable \
--target-dir s3a://mybucket/

这篇关于S3 作为 Sqoop 导入中的目标目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆