您的位置:首页 > 运维架构 > Apache

spark编译问题解决 object apache is not a member of package org

2016-07-08 00:33 2819 查看
报错

Error:(6, 12) object apache is not a member of package org

import org.apache.spark.SparkContext._

^

Error:(7, 12) object apache is not a member of package org

import org.apache.spark.{SparkConf, SparkContext}

^

Error:(16, 20) not found: type SparkConf

val conf = new SparkConf().setAppName("HelloSpark")

^

Error:(17, 18) not found: type SparkContext
val sc = new SparkContext(conf)

^

解决:

右键工程-open module setting-Libraries-spark-assembly-1.0.0-hadoop1.0.4.jar(添加spark的jar包-保存
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息