<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to use s3a with HDP in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172439#M45905</link>
    <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/311/rbalamohan.html" nodeid="311"&gt;@Rajesh Balamohan&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I see that I only had aws-java-sdk-s3*.jar under /usr/hdp/current/zeppelin/lib/lib, so I copied it to /usr/hdp/current/hadoop/lib and /usr/hdp/current/hadoop-mapreduce/lib, but when I try to run with the -Dfs.s3a.impl argument, I get the error below.&lt;/P&gt;&lt;P&gt;I have the proper AWS credentials in my config and I don't have credential-related issues if I try a s3n: URL, so I think this is really an issue finding the right jars.&lt;/P&gt;&lt;P&gt;Do I need to add that jar to a path somewhere?&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;PRE&gt;16/11/11 06:25:41 ERROR tools.DistCp: Invalid arguments:
com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain
        at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:117)
        at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3521)
        at com.amazonaws.services.s3.AmazonS3Client.headBucket(AmazonS3Client.java:1031)
        at com.amazonaws.services.s3.AmazonS3Client.doesBucketExist(AmazonS3Client.java:994)
        at org.apache.hadoop.fs.s3a.S3AFileSystem.initialize(S3AFileSystem.java:228)
        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2653)
        at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:92)
        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2687)
        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2669)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:371)
        at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295)
        at org.apache.hadoop.tools.DistCp.setTargetPathExists(DistCp.java:216)
        at org.apache.hadoop.tools.DistCp.run(DistCp.java:116)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.hadoop.tools.DistCp.main(DistCp.java:430)
Invalid arguments: Unable to load AWS credentials from any provider in the chain&lt;/PRE&gt;</description>
    <pubDate>Fri, 11 Nov 2016 19:29:31 GMT</pubDate>
    <dc:creator>zack_riesland</dc:creator>
    <dc:date>2016-11-11T19:29:31Z</dc:date>
    <item>
      <title>How to use s3a with HDP</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172437#M45903</link>
      <description>&lt;P&gt;
	I'm trying to use distcp to copy data to an S3 bucket, and experiencing nothing but pain.&lt;/P&gt;&lt;P&gt;
	I've tried something like this:&lt;/P&gt;&lt;PRE&gt;sudo -u hdfs hadoop distcp -Dhadoop.root.logger="DEBUG,console" -Dmapreduce.job.maxtaskfailures.per.tracker=1 -bandwidth 10 -i -log /user/hdfs/s3_staging/logging/distcp.log hdfs:///apps/hive/warehouse/my_db/my_table s3n://my_bucket/my_path&lt;/PRE&gt;&lt;P&gt;But I encounter this error:&lt;/P&gt;&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/37868404/distcp-from-hadoop-to-s3-fails-with-no-space-available-in-any-of-the-local-dire" target="_blank"&gt;http://stackoverflow.com/questions/37868404/distcp-from-hadoop-to-s3-fails-with-no-space-available-in-any-of-the-local-dire&lt;/A&gt;&lt;/P&gt;&lt;P&gt;From what I've read, I might have more luck trying s3a instead of s3n, but when I try the same command above using "s3a" in the URL, I get this error:&lt;/P&gt;&lt;P&gt;"No FileSystem for scheme: S3a"&lt;/P&gt;&lt;P&gt;Can someone please give me some insight to get this working with either file system&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 05:07:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172437#M45903</guid>
      <dc:creator>zack_riesland</dc:creator>
      <dc:date>2016-11-11T05:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use s3a with HDP</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172438#M45904</link>
      <description>&lt;P&gt;s3n is pretty much deprecated. Please use "s3a".  Which version of HDP are you using? Check if you have relevant s3a libraries (aws-java-sdk-s3*.jar) in hadoop and add "-Dfs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem"&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 11:26:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172438#M45904</guid>
      <dc:creator>rbalamohan</dc:creator>
      <dc:date>2016-11-11T11:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use s3a with HDP</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172439#M45905</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/311/rbalamohan.html" nodeid="311"&gt;@Rajesh Balamohan&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I see that I only had aws-java-sdk-s3*.jar under /usr/hdp/current/zeppelin/lib/lib, so I copied it to /usr/hdp/current/hadoop/lib and /usr/hdp/current/hadoop-mapreduce/lib, but when I try to run with the -Dfs.s3a.impl argument, I get the error below.&lt;/P&gt;&lt;P&gt;I have the proper AWS credentials in my config and I don't have credential-related issues if I try a s3n: URL, so I think this is really an issue finding the right jars.&lt;/P&gt;&lt;P&gt;Do I need to add that jar to a path somewhere?&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;PRE&gt;16/11/11 06:25:41 ERROR tools.DistCp: Invalid arguments:
com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain
        at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:117)
        at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3521)
        at com.amazonaws.services.s3.AmazonS3Client.headBucket(AmazonS3Client.java:1031)
        at com.amazonaws.services.s3.AmazonS3Client.doesBucketExist(AmazonS3Client.java:994)
        at org.apache.hadoop.fs.s3a.S3AFileSystem.initialize(S3AFileSystem.java:228)
        at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2653)
        at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:92)
        at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2687)
        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2669)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:371)
        at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295)
        at org.apache.hadoop.tools.DistCp.setTargetPathExists(DistCp.java:216)
        at org.apache.hadoop.tools.DistCp.run(DistCp.java:116)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.hadoop.tools.DistCp.main(DistCp.java:430)
Invalid arguments: Unable to load AWS credentials from any provider in the chain&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Nov 2016 19:29:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172439#M45905</guid>
      <dc:creator>zack_riesland</dc:creator>
      <dc:date>2016-11-11T19:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use s3a with HDP</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172440#M45906</link>
      <description>&lt;P&gt;I figured it out - I needed to add fs.s3a.access.key and fs.s3a.secret.key values to my HDFS config in Ambari.&lt;/P&gt;&lt;P&gt;I already had fs.s3.awsAccessKeyId and fs.s3.awsSecretKeyId, but those are just for s3:// urls, apparently.&lt;/P&gt;&lt;P&gt;So I had to do the following to get distcp to work on HDP 2.4.2:&lt;/P&gt;&lt;P&gt;Add aws-java-sdk-s3-1.10.62.jar to hadoop/lib on the node running the command&lt;/P&gt;&lt;P&gt;Add hadoop/lib* to the classpath for MapReduce and Yarn&lt;/P&gt;&lt;P&gt;Add fs.s3a.access.key and fs.s3a.secret.key properties to HDFS config in Ambari.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 21:11:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172440#M45906</guid>
      <dc:creator>zack_riesland</dc:creator>
      <dc:date>2016-11-11T21:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use s3a with HDP</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172441#M45907</link>
      <description>&lt;P&gt;Oh. Also need this in HDFS configs:&lt;/P&gt;&lt;P&gt;fs.s3a.impl=org.apache.hadoop.fs.s3a.S3AFileSystem&lt;/P&gt;</description>
      <pubDate>Fri, 11 Nov 2016 21:13:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172441#M45907</guid>
      <dc:creator>zack_riesland</dc:creator>
      <dc:date>2016-11-11T21:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use s3a with HDP</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172442#M45908</link>
      <description>&lt;P&gt;you need to set the s3a properties to log in; these are separate from the s3n ones&lt;/P&gt;&lt;P&gt;see: &lt;A href="https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md" target="_blank"&gt;https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md&lt;/A&gt;&lt;/P&gt;&lt;P&gt;see also: &lt;A href="http://docs.hortonworks.com/HDPDocuments/HDCloudAWS/HDCloudAWS-1.8.0/bk_hdcloud-aws/content/s3-trouble/index.html" target="_blank"&gt;http://docs.hortonworks.com/HDPDocuments/HDCloudAWS/HDCloudAWS-1.8.0/bk_hdcloud-aws/content/s3-trouble/index.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2016 20:30:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-s3a-with-HDP/m-p/172442#M45908</guid>
      <dc:creator>stevel</dc:creator>
      <dc:date>2016-11-29T20:30:56Z</dc:date>
    </item>
  </channel>
</rss>

