<?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>topic Re: PySpark on Jupyterhub K8s || Unable to query data || Class org.apache.hadoop.fs.s3a.S3AFileSystem not found in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/pyspark-on-jupyterhub-k8s-unable-to-query-data-class-org-apache/m-p/17874#M11797</link>
    <description>&lt;P&gt;Based on the hadoop version, kubernetes, and AWS sdk, was clearly not using Databricks.  &lt;/P&gt;</description>
    <pubDate>Sun, 12 Jun 2022 11:32:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-06-12T11:32:14Z</dc:date>
    <item>
      <title>PySpark on Jupyterhub K8s || Unable to query data || Class org.apache.hadoop.fs.s3a.S3AFileSystem not found</title>
      <link>https://community.databricks.com/t5/data-engineering/pyspark-on-jupyterhub-k8s-unable-to-query-data-class-org-apache/m-p/17871#M11794</link>
      <description>&lt;P&gt;Pyspark Version: &lt;/P&gt;&lt;P&gt;2.4.5 &lt;/P&gt;&lt;P&gt;Hive Version: 1.2 &lt;/P&gt;&lt;P&gt;Hadoop Version: 2.7 &lt;/P&gt;&lt;P&gt;AWS-SDK Jar: 1.7.4 &lt;/P&gt;&lt;P&gt;Hadoop-AWS: 2.7.3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I am trying to show data I am getting Class org.apache.hadoop.fs.s3a.S3AFileSystem not found while I am passing all the information which all are required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with all three values for this config fs.s3.aws.credentials.provider but nothing worked&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;org.apache.hadoop.fs.s3a.BasicAWSCredentialsProvider&lt;/LI&gt;&lt;LI&gt;com.amazonaws.auth.InstanceProfileCredentialsProvider&lt;/LI&gt;&lt;LI&gt;com.amazonaws.auth.EnvironmentVariableCredentialsProvider&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If table has no data its giving count as 0, but it fails with the table having data with errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything works fine like print_schema, show tables etc but when I try to see the data using&lt;/P&gt;&lt;P&gt;.show(), toPandas(), .toJSON().collect or even saving to CSV is also not working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;from pyspark.sql import SparkSession
sc = SparkSession.builder.getOrCreate()
&amp;nbsp;
sc._jsc.hadoopConfiguration().set("fs.s3a.impl","org.apache.hadoop.fs.s3a.S3AFileSystem")
sc._jsc.hadoopConfiguration().set('fs.s3.aws.credentials.provider', 'com.amazonaws.auth.EnvironmentVariableCredentialsProvider')
 val = sc.sql("select * from customer.100_rating limit 5")
 val.show()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error 1: With .show()/ .toPandas()/ .toJSON()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Py4JJavaError: An error occurred while calling o1132.showString.
: org.apache.spark.SparkException: Job aborted due to stage failure: Task 1 in stage 26.0 failed 4 times, most recent failure: Lost task 1.3 in stage 26.0 (TID 498, 10.101.36.145, executor 2): java.lang.RuntimeException: java.lang.ClassNotFoundException: Class org.apache.hadoop.fs.s3a.S3AFileSystem not found&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Error 2: while saving data to csv:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Py4JJavaError: An error occurred while calling o531.csv.
: org.apache.spark.SparkException: Job aborted.
	at org.apache.spark.sql.execution.datasources.FileFormatWriter$.write(FileFormatWriter.scala:198)
	at org.apache.spark.sql.execution.datasources.InsertIntoHadoopFsRelationCommand.run(InsertIntoHadoopFsRelationCommand.scala:159)
	at org.apache.spark.sql.execution.command.DataWritingCommandExec.sideEffectResult$lzycompute(commands.scala:104)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error 3: While trying to count a specific column&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Py4JJavaError: An error occurred while calling o99.sql.
: org.apache.spark.sql.AnalysisException: cannot resolve '`testing`' given input columns: [dataplatform.testing.id, dataplatform.testing.name]; line 1 pos 13;
'Aggregate [name#247], [unresolvedalias('count('testing[name]), None)]
+- SubqueryAlias `dataplatform`.`testing`
   +- HiveTableRelation `dataplatform`.`testing`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, [id#246, name#247]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please help me to fix this issue its pending for a long time.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 00:39:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pyspark-on-jupyterhub-k8s-unable-to-query-data-class-org-apache/m-p/17871#M11794</guid>
      <dc:creator>vivek_sinha</dc:creator>
      <dc:date>2022-06-11T00:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: PySpark on Jupyterhub K8s || Unable to query data || Class org.apache.hadoop.fs.s3a.S3AFileSystem not found</title>
      <link>https://community.databricks.com/t5/data-engineering/pyspark-on-jupyterhub-k8s-unable-to-query-data-class-org-apache/m-p/17872#M11795</link>
      <description>&lt;P&gt;Hello @vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you confirm if you are running this code on the Databricks platform?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try adding spark.jars config which includes all the dependent jars when you are initializing the spark session&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SparkSession\&lt;/P&gt;&lt;P&gt;    .builder\&lt;/P&gt;&lt;P&gt;    .config("spark.jars", "x.jar,y.jar")\&lt;/P&gt;&lt;P&gt;    .getOrCreate()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;spark.jars&lt;/P&gt;&lt;P&gt;Comma-separated list of jars to include on the driver and executor classpaths. Globs are allowed.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jun 2022 06:48:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pyspark-on-jupyterhub-k8s-unable-to-query-data-class-org-apache/m-p/17872#M11795</guid>
      <dc:creator>User16764241763</dc:creator>
      <dc:date>2022-06-12T06:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: PySpark on Jupyterhub K8s || Unable to query data || Class org.apache.hadoop.fs.s3a.S3AFileSystem not found</title>
      <link>https://community.databricks.com/t5/data-engineering/pyspark-on-jupyterhub-k8s-unable-to-query-data-class-org-apache/m-p/17873#M11796</link>
      <description>&lt;P&gt;Hi @Arvind Ravish​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response and now I fixed the issue.&lt;/P&gt;&lt;P&gt;The image which I was using to launch spark executor didn't have aws jars. After doing necessary changes it started working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still may thanks for your response.&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jun 2022 07:49:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pyspark-on-jupyterhub-k8s-unable-to-query-data-class-org-apache/m-p/17873#M11796</guid>
      <dc:creator>vivek_sinha</dc:creator>
      <dc:date>2022-06-12T07:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: PySpark on Jupyterhub K8s || Unable to query data || Class org.apache.hadoop.fs.s3a.S3AFileSystem not found</title>
      <link>https://community.databricks.com/t5/data-engineering/pyspark-on-jupyterhub-k8s-unable-to-query-data-class-org-apache/m-p/17874#M11797</link>
      <description>&lt;P&gt;Based on the hadoop version, kubernetes, and AWS sdk, was clearly not using Databricks.  &lt;/P&gt;</description>
      <pubDate>Sun, 12 Jun 2022 11:32:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/pyspark-on-jupyterhub-k8s-unable-to-query-data-class-org-apache/m-p/17874#M11797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-12T11:32:14Z</dc:date>
    </item>
  </channel>
</rss>

