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
Hadoop 在Amazon Elastic MapReduce中运行自定义jar时如何访问s3n中的文件_Hadoop_Amazon S3_Amazon Ec2 - Fatal编程技术网

Hadoop 在Amazon Elastic MapReduce中运行自定义jar时如何访问s3n中的文件

Hadoop 在Amazon Elastic MapReduce中运行自定义jar时如何访问s3n中的文件,hadoop,amazon-s3,amazon-ec2,Hadoop,Amazon S3,Amazon Ec2,我正在EMR集群中运行以下步骤: ./elasticmapreduce-j CLUSTERID-jars3n://mybucket/somejar --main-class SomeClass --arg -conf --arg 's3n://mybucket/configuration.xml' SomeClass是Hadoop作业,实现可运行接口。它读取configuration.xml以获取参数,但在上面的命令中,Som

我正在EMR集群中运行以下步骤:

./elasticmapreduce-j CLUSTERID-jars3n://mybucket/somejar

                --main-class  SomeClass 
                --arg -conf --arg 's3n://mybucket/configuration.xml'
SomeClass是Hadoop作业,实现可运行接口。它读取configuration.xml以获取参数,但在上面的命令中,SomeClass无法访问“s3n://mybucket/configuration.xml”(未报告错误)。我尝试了“s3://mybucket/configuration.xml”,但它也不起作用。我确信该文件存在,因为我可以通过“hadoop fs-ls s3n://mybucket/configuration.xml”看到它。对这个问题有什么建议吗


谢谢,

以下是您可以尝试的选项

  • 使用s3而不是s3n

  • 检查s3 bucket的访问权限

  • 您可以指定日志位置,并可以在作业后检查日志 失败。您可以创建如下作业

    弹性mapreduce--创建--名称“j_flow_name”--日志uri“s3://您的_s3_bucket”

  • 它提供了更多的调试信息

    三,

    有关更多详细信息,请参见

    ./elastic-mapreduce -j JobFlowId -jar s3://your_bucket --arg "s3://your_conf_file_bucket_name" --arg "second parameter"