Can Not Connect to Hive from Spark 2.2 Instead "pyspark.sql.utils.AnalysisException: "Database 'attrition' not found;"" is Raised
(Doc ID 2328700.1)
Last updated on APRIL 08, 2020
Applies to:
Big Data Appliance Integrated Software - Version 4.8.0 and laterLinux x86-64
Symptoms
Spark 2.2 can not connect to Hive. Instead the following error is raised:
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ '/ __/ '_/
/__ / .__/\_,_/_/ /_/\_\ version 2.2.0.cloudera1
/_/
Using Python version 2.7.11 (default, Dec 6 2015 18:08:32)
SparkSession available as 'spark'.
...
Traceback (most recent call last):
File "", line 2, in
File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/pyspark/sql/context.py", line 397, in table
return self.sparkSession.table(tableName)
File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/pyspark/sql/session.py", line 569, in table
return DataFrame(self._jsparkSession.table(tableName), self._wrapped)
File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/py4j-0.10.4-src.zip/py4j/java_gateway.py", line 1133, in __call__
File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/pyspark/sql/utils.py", line 71, in decoraise AnalysisException(s.split(': ', 1)[1], stackTrace)
pyspark.sql.utils.AnalysisException: u"Database 'attrition' not found;"
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |