Spark 在windows环境中源码编译遇到的错误

1 首先有可能是各种jar包错误,删除掉maven里面的jar包就好,

2 其他:

Error:(21, 8) Symbol 'term org.apache.spark.annotation' is missing from the classpath.
This symbol is required by ' <none>'.
Make sure that term annotation is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
A full rebuild may help if 'package.class' was compiled against an incompatible version of org.apache.spark.
import org.apache.spark.sql.SparkSession

File-> Project -Structure-> Modules -> spark exampes 2.11 -> 点击dependancies -> 点击右边绿色+按钮 -> addd jar or directories -> 进入spark/common/tags/targets 选择对应的jar包

参考:https://stackoverflow.com/questions/42327777/spark-sql-errors

Error:(111, 5) Symbol 'term org.apache.hadoop' is missing from the classpath.
This symbol is required by 'type org.apache.spark.rdd.RDD._$12'.
Make sure that term hadoop is in your classpath and check for conflicting dependencies with `-Ylog-classpath`.
A full rebuild may help if 'RDD.class' was compiled against an incompatible version of org.apache.
    fileRDD.saveAsTextFile(dfsFilename)

错误:
Intellij compile failures: “is already defined as”   这是因为我又重复的把scala marked as source dierectory了
https://stackoverflow.com/questions/16885489/intellij-compile-failures-is-already-defined-as/16888290,第二个答案 

  • 5
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值