spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Armbrust <mich...@databricks.com>
Subject Re: Error in SparkSQL Example
Date Mon, 31 Mar 2014 16:49:13 GMT
> Thanks for the clarification. My question is about the error above "error:
> class $iwC needs to be abstract"
>

This is a fairly confusing scala REPL (interpreter) error.  Under the
covers, to run the line you entered into the interpreter, scala is creating
an object called $iwC with your code inserted into it.  So this error is
telling you that you cannot create a val in an object (or in a line of the
REPL) without giving it a value.

and what does the RDD brings, since I can do the DSL without the
"people: people:
> org.apache.spark.rdd.RDD[Person]"
>

This is just assigning the type for the variable people (which is really
only there for people reading the code in this particular example).  In the
case of the line from the first example where we leave it out, the scala
compiler will add it for us using type
inference<http://docs.scala-lang.org/tutorials/tour/local-type-inference.html>
.

Mime
View raw message