当前位置:   article > 正文

Spark3 Unable to instantiate SparkSession with Hive support because Hive classes are not found

unable to instantiate sparksession with hive support because hive classes ar

当开启 enableHiveSupport 时
报错 java.lang.IllegalArgumentException: Unable to instantiate SparkSession with Hive support because Hive classes are not found.
可能原因:
1、未在 pom 中添加依赖

<dependency>
	<groupId>org.apache.spark</groupId>
	<artifactId>spark-hive_2.12</artifactId>
	<version>3.2.2</version>
	<scope>provided</scope>
</dependency>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

2、可能把依赖中的 guava 排除了,但后续未添加。需要添加 guava 依赖

<dependency>
	<groupId>com.google.guava</groupId>
	<artifactId>guava</artifactId>
	<version>30.1.1-jre</version>
	<scope>provided</scope>
</dependency>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/869698
推荐阅读
相关标签
  

闽ICP备14008679号