火花 - 对构建斯卡拉初始化错误 [英] spark - scala init error on build

查看:286
本文介绍了火花 - 对构建斯卡拉初始化错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的Scala的应用程序中使用的火花。

I'm trying to use spark in my scala application.

这是我用我的火花依赖性:

this is my spark dependency I'm using :

<dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-core_2.10</artifactId>
      <version>1.0.0</version>
    </dependency>

然后在我的code

Then in my code

import org.apache.spark.SparkConf
val sparkConf = new SparkConf()

有在我的Eclipse IDE中没有错误,但是,code版本( MVN包EXEC:JAVA )失败,出现以下错误:

There is no error in my eclipse IDE, But code build (mvn package exec:java) is failed with the following error:

error: class file needed by SparkConf is missing.
[ERROR] reference type Cloneable of package scala refers to nonexisting symbol.
[ERROR] val sparkConf = new SparkConf()
[ERROR]                     ^
[ERROR] one error found

我该如何处理呢?

How can I handle this?

推荐答案

像@massag有提及,这是一个Scala的版本不匹配:

Like @massag has mention, It was a Scala version mismatch:

火花core_2.10是使用Scala 2.10.x

spark-core_2.10 is using scala 2.10.x

这篇关于火花 - 对构建斯卡拉初始化错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆