我正在尝试JobServer
并希望在我们的生产环境中使用它。
我想一起使用mllib
and spark-jobserver
,但是我遇到了一个错误(在 spark-jobserver 上,当发送作业时)。
job-server[ERROR] Uncaught error from thread [JobServer-akka.actor.default-dispatcher-3] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[JobServer]
job-server[ERROR] java.lang.NoClassDefFoundError: org/apache/spark/mllib/stat/Statistics$
job-server[ERROR] at SparkCorrelation$.getCorrelation(SparkCorrelation.scala:50)
job-server[ERROR] at SparkCorrelation$.runJob(SparkCorrelation.scala:28)
job-server[ERROR] at SparkCorrelation$.runJob(SparkCorrelation.scala:11)
job-server[ERROR] at spark.jobserver.JobManagerActor$$anonfun$spark$jobserver$JobManagerActor$$getJobFuture$4.apply(JobManagerActor.scala:234)
我正在使用spark-jobserver 0.5.0
和spark 1.2
。
有什么想法吗?
代码:
def getCorrelation(sc: SparkContext):Double={
val pathFile = "hdfs://localhost:9000/user/hduser/correlacion.csv"
val fileData = getFileData(sc,pathFile)
val colX = getDoubleColumn(fileData,1)
val colY = getDoubleColumn(fileData,2)
Statistics.corr(colX,colY,"pearson")
}
override def runJob(sc: SparkContext, config: Config): Any = {/*
val dd = sc.parallelize(config.getString("input.string").split(" ").toSeq)
dd.map((_, 1)).reduceByKey(_ + _).collect().toMap*/
getCorrelation(sc)
}