spark-mllib: Error "reassignment to val" in source code

339 views Asked by At

I'm using IDEA SBT project to test spark-mllib code. Here is build.sbt:

name := "SparkTest"

version := "1.0"

scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
  "org.apache.spark" %% "spark-core" % "1.2.0",
  "org.apache.spark" %% "spark-mllib" % "1.2.0"
)

After all the import and compile work has done, I found some errors in lib source

BoostingStrategy.scala(img: https://i.stack.imgur.com/rEt5D.png),

saying that

"treeStrategy.maxDepth = 3(Line 80)" has error "reassignment to val"

Could anyone explain this? Is that the problem in sbt file?

1

There are 1 answers

1
abalcerek On BEST ANSWER

I did run example from the spark website witch is pretty much identical. It does work even though Intellij shows the same errors. It looks like some bug in IDEA scala plugin. Your project should compile and work normally.