5
我想运行EC2上的Spark代码来对照存储在S3存储桶中的数据。根据Spark EC2 documentation和Amazon S3 documentation,我必须将我的AWS_ACCESS_KEY_ID和AWS_SECRET_ACCESS_KEY添加到core-site.xml文件。但是,当我进入我的主EC2节点时,会看到几个core-site.xml文件。哪个core-site.xml添加我的AWS访问密钥?
$ find . -name core-site.xml
./mapreduce/conf/core-site.xml
./persistent-hdfs/share/hadoop/templates/conf/core-site.xml
./persistent-hdfs/src/packages/templates/conf/core-site.xml
./persistent-hdfs/src/contrib/test/core-site.xml
./persistent-hdfs/src/test/core-site.xml
./persistent-hdfs/src/c++/libhdfs/tests/conf/core-site.xml
./persistent-hdfs/conf/core-site.xml
./ephemeral-hdfs/share/hadoop/templates/conf/core-site.xml
./ephemeral-hdfs/src/packages/templates/conf/core-site.xml
./ephemeral-hdfs/src/contrib/test/core-site.xml
./ephemeral-hdfs/src/test/core-site.xml
./ephemeral-hdfs/src/c++/libhdfs/tests/conf/core-site.xml
./ephemeral-hdfs/conf/core-site.xml
./spark-ec2/templates/root/mapreduce/conf/core-site.xml
./spark-ec2/templates/root/persistent-hdfs/conf/core-site.xml
./spark-ec2/templates/root/ephemeral-hdfs/conf/core-site.xml
./spark-ec2/templates/root/spark/conf/core-site.xml
./spark/conf/core-site.xml
一些实验后,我决定,我只能从当添加我的凭据两者的MapReduce/conf目录/核心的site.xml和火花/ conf目录/核心现场星火访问S3N URL像s3n://mcneill-scratch/GR.txt
。 XML。
这对我来说似乎是错误的。这不是DRY,我在文档中找不到任何说你必须将凭证添加到多个文件的任何内容。
修改多个文件是通过core-site.xml设置s3凭证的正确方法吗?是否有文档解释这个问题?