[IDEA运行spark|spark sql出错]Error:(4, 8) object SparkConf is not a member of package org.apache.spark

[IDEA运行spark|spark sql出错]Error:(4, 8) object SparkConf is not a member of package org.apache.spark
**原因:**实际上问题的根本原因,是因为spark升级到spark2以后,原有lib目录下的大JAR包被分散成多个小JAR包,原来的spark-assembly.jar已经不存在。原来的 jar包分解为:jars/.jar

解决办法:到Saprk官网下载spark安装包,然后解压spark,将jars下的所有jar包添加到项目lib中。
spark下载地址:https://archive.apache.org/dist/spark/
[IDEA运行spark|spark sql出错]Error:(4, 8) object SparkConf is not a member of package org.apache.spark
解压后将jars目录放到自己熟悉的地方,然后在IDEA中为项目添加lib
[IDEA运行spark|spark sql出错]Error:(4, 8) object SparkConf is not a member of package org.apache.spark
选择目录 --> 点击OK --> 选择应用到spark 项目即可。

上一篇:Apache Calcite官方文档中文版- 进阶-2. 空间(Spatial)


下一篇:Apache Calcite教程-官方翻译-空间