我正在尝试使用Spark的XORShiftRandom来生成随机数。代码非常简单:
1 import org.apache.spark._
2 import org.apache.spark.util.random.XORShiftRandom
3
4 object randomTest {
5 def main(args: Array[String]) = {
6 val x = new XORShiftRandom()
7 }
8 }
build.sbt如下:
1 name := "randomTest"
2 version := "0.01"
3 scalaVersion := "2.10.4"
4 libraryDependencies ++= Seq(
5 "org.apache.spark" %% "spark-core" % "1.5.0" withSources() withJavadoc(),
6 "org.apache.spark" %% "spark-mllib" % "1.5.0" withSources() withJavadoc()
7 )
但是我收到了标题中显示的错误消息。