Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 在EMR作业流中指定其他用户拥有的S3存储桶_Amazon Web Services_Amazon S3_Elastic Map Reduce_Amazon Emr - Fatal编程技术网

Amazon web services 在EMR作业流中指定其他用户拥有的S3存储桶

Amazon web services 在EMR作业流中指定其他用户拥有的S3存储桶,amazon-web-services,amazon-s3,elastic-map-reduce,amazon-emr,Amazon Web Services,Amazon S3,Elastic Map Reduce,Amazon Emr,我试图使用S3存储桶作为我的弹性Map Reduce工作流程的输入数据。S3 bucket与EMR作业流不属于同一帐户。我应该如何以及在何处指定S3 bucket凭据以访问相应的S3 bucket。我尝试了以下格式: s3n://:@ 但它给了我以下错误: Exception in thread "main" java.lang.IllegalArgumentException: The bucket name parameter must be specified when listing o

我试图使用S3存储桶作为我的弹性Map Reduce工作流程的输入数据。S3 bucket与EMR作业流不属于同一帐户。我应该如何以及在何处指定S3 bucket凭据以访问相应的S3 bucket。我尝试了以下格式:

s3n://:@

但它给了我以下错误:

Exception in thread "main" java.lang.IllegalArgumentException: The bucket name parameter must be specified when listing objects in a bucket
at com.amazonaws.services.s3.AmazonS3Client.assertParameterNotNull(AmazonS3Client.java:2381)
at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:444)
at com.amazonaws.services.s3.AmazonS3Client.doesBucketExist(AmazonS3Client.java:785)
at org.apache.hadoop.fs.s3native.Jets3tNativeFileSystemStore.ensureBucketExists(Jets3tNativeFileSystemStore.java:80)
at org.apache.hadoop.fs.s3native.Jets3tNativeFileSystemStore.initialize(Jets3tNativeFileSystemStore.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:83)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:59)
at org.apache.hadoop.fs.s3native.$Proxy1.initialize(Unknown Source)
at org.apache.hadoop.fs.s3native.NativeS3FileSystem.initialize(NativeS3FileSystem.java:512)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1413)
at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:68)
at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1431)
at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:256)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:187)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.setInputPaths(FileInputFormat.java:352)
at org.apache.hadoop.mapreduce.lib.input.FileInputFormat.setInputPaths(FileInputFormat.java:321)
at com.inmobi.appengage.emr.mapreduce.TestSession.main(TestSession.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:187)

如何指定相同的凭据?

您应该尝试将这些凭据添加到core-site.xml文件中。您可以在节点中手动添加s3凭据,也可以在启动集群时使用boostrap操作

您可以通过以下方式启动群集:

ruby elastic mapreduce--创建--活动--普通输出 --主实例类型m1.xlarge--从实例类型m1.xlarge--num instances 11--名称“我的超级集群”--引导操作s3://elasticmapreduce/bootstrap actions/configure hadoop--args -c、 fs.s3.awsAccessKeyId=,-c,fs.s3.awsSecretAccessKey=


这将覆盖EMR根据启动集群的帐户设置的默认值。

以args方式对我不起作用。它表示尝试在引导程序日志中执行/mnt/var/lib/bootstrap actions/2/配置hadoop--args-c,fs.s3n.awsAccessKeyId=,-c,fs.s3n.awsSecretAccessKey=,失败,出现以下错误:2013-08-26T08:47:22.715Z信息执行以ret val 255结束2013-08-26T08:47:22.716Z错误执行失败,代码为“255”。还有一件事,我正在从JobFlow GUI配置引导操作的“可选参数”中设置S3键选项。是否有其他方法可以使其工作?登录任何从属节点,查看其中的core-site.xml文件是否有这些更改?还尝试使用Amazon提供的ruby cli启动群集。我可以使用ruby cli并按照您上面的建议运行它,但我现在收到一个新错误:线程“main”状态代码中的异常:403,AWS服务:Amazon S3,AWS请求ID:0504CE5FDBFC1D8B,AWS错误代码:null,AWS错误消息:禁止,S3扩展请求ID:。你能帮忙吗?谢谢你的帮助。这是因为IAM证书在其他地方被篡改了,你的建议本可以奏效。