赞
踩
当开启 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>
2、可能把依赖中的 guava 排除了,但后续未添加。需要添加 guava 依赖
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1.1-jre</version>
<scope>provided</scope>
</dependency>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。