<?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: Spark Scala : S3native.NativeS3Filesystem Not found in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206669#M84001</link>
    <description>&lt;P&gt;Hi Lakshmi,&lt;/P&gt;&lt;P&gt;I am having the same issue. Did you ever resolved this?&lt;/P&gt;,&lt;P&gt;Hi Lakshmi,&lt;BR /&gt;I am having the same issue, did you ever resovled this? &lt;/P&gt;</description>
    <pubDate>Fri, 18 Jan 2019 08:47:39 GMT</pubDate>
    <dc:creator>derekyang742</dc:creator>
    <dc:date>2019-01-18T08:47:39Z</dc:date>
    <item>
      <title>Spark Scala : S3native.NativeS3Filesystem Not found</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206666#M83998</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am new to Scala coding and trying to access AWS S3 bucket but it is failed.  Please find the below error.&lt;/P&gt;&lt;H4&gt;Exception in thread "main" java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.s3native.NativeS3FileSystem not found&lt;/H4&gt;&lt;P&gt;I want to read multiple files(*.gz)  from S3 bucket and make a single CSV file (merge all gz files)  but unable to read the data and getting exception as shown above.&lt;/P&gt;&lt;P&gt;Here is my code :&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;import org.apache.spark.SparkConf&lt;BR /&gt;import org.apache.spark.sql.SparkSession&lt;BR /&gt;&lt;BR /&gt;object ReadS3Files {&lt;BR /&gt;  def main(args: Array[String]) {&lt;BR /&gt;    val spark = SparkSession.builder.master("local[*]").appName("ReadS3Files").getOrCreate()&lt;BR /&gt;    val sc = spark.sparkContext&lt;BR /&gt;    val conf = new SparkConf().setAppName("ReadS3Files").setMaster("local[*]")&lt;BR /&gt;    val sqlContext = spark.sqlContextspark.sparkContext.hadoopConfiguration.set("fs.s3n.impl", "org.apache.hadoop.fs.s3native.NativeS3FileSystem")&lt;BR /&gt;    spark.sparkContext.hadoopConfiguration.set("fs.s3n.awsAccessKeyId", "AccessKey")&lt;BR /&gt;    spark.sparkContext.hadoopConfiguration.set("fs.s3n.awsSecretAccessKey", "SecretKey")&lt;BR /&gt;&lt;BR /&gt;    val df = spark.read.format("csv").option("delimiter",",").load("s3n://bucketname/201808/1034/JPR_DM2_ORG/*.gz")&lt;BR /&gt;    df.count()&lt;BR /&gt;&lt;BR /&gt;    spark.stop()&lt;BR /&gt;  }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;Please help me on this issue.&lt;/P&gt;&lt;P&gt;Many thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 00:31:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206666#M83998</guid>
      <dc:creator>klprathyusha</dc:creator>
      <dc:date>2018-10-04T00:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Scala : S3native.NativeS3Filesystem Not found</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206667#M83999</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/97368/klprathyusha.html" nodeid="97368"&gt;@Lakshmi Prathyusha&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You can download the hadoop aws jar and put it in /usr/hdp/{hdp-version}/hadoop folder and pass it while running the spark shell command&lt;/P&gt;&lt;PRE&gt;./spark-shell --master yarn --jars /usr/hdp/{hdp-version}/hadoop/hadoop-aws.jar ...&lt;/PRE&gt;&lt;P&gt;You can also try passing --packages param to download the package in run time without downloading the jar before. Example shown below&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;./spark-shell --packages org.apache.hadoop:hadoop-aws:2.7.3&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Note: Make sure to download all the dependent packages as well.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-aws/2.7.3" target="_blank"&gt;https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-aws/2.7.3&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Please "Accept" the answer if this helps&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 00:51:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206667#M83999</guid>
      <dc:creator>asirna</dc:creator>
      <dc:date>2018-10-04T00:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Scala : S3native.NativeS3Filesystem Not found</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206668#M84000</link>
      <description>&lt;P&gt;Hi Aditya,&lt;/P&gt;&lt;P&gt;Thanks for your reply. I have downloaded hadoop-aws.jar file and aws-java-sdk-1.7.4.jar also. I am using intellij and from Intellij am  trying to access S3 bucket to read the data but no luck. Even, in core-site.xml also i have configured the aws key and secret key.&lt;/P&gt;&lt;PRE&gt;

&amp;lt;configuration&amp;gt;
&amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;fs.s3n.awsAccessKeyId&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;......&amp;lt;/value&amp;gt;
  &amp;lt;/property&amp;gt;


  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;fs.s3n.awsSecretAccessKey&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;......&amp;lt;/value&amp;gt;
  &amp;lt;/property&amp;gt;
  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;fs.s3a.awsAccessKeyId&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;......&amp;lt;/value&amp;gt;
  &amp;lt;/property&amp;gt;


  &amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;fs.s3a.awsSecretAccessKey&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;......&amp;lt;/value&amp;gt;
  &amp;lt;/property&amp;gt;
&amp;lt;/configuration&amp;gt;
&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Many thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 10:11:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206668#M84000</guid>
      <dc:creator>klprathyusha</dc:creator>
      <dc:date>2018-10-04T10:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Scala : S3native.NativeS3Filesystem Not found</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206669#M84001</link>
      <description>&lt;P&gt;Hi Lakshmi,&lt;/P&gt;&lt;P&gt;I am having the same issue. Did you ever resolved this?&lt;/P&gt;,&lt;P&gt;Hi Lakshmi,&lt;BR /&gt;I am having the same issue, did you ever resovled this? &lt;/P&gt;</description>
      <pubDate>Fri, 18 Jan 2019 08:47:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206669#M84001</guid>
      <dc:creator>derekyang742</dc:creator>
      <dc:date>2019-01-18T08:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Spark Scala : S3native.NativeS3Filesystem Not found</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206670#M84002</link>
      <description>&lt;P&gt;Im facing same issue . did anyone resolved it? please post here how it got fixed?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 12:12:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-Scala-S3native-NativeS3Filesystem-Not-found/m-p/206670#M84002</guid>
      <dc:creator>prakash_r_a</dc:creator>
      <dc:date>2019-07-22T12:12:01Z</dc:date>
    </item>
  </channel>
</rss>

