spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cyril Scetbon <cyril.scet...@free.fr>
Subject StateSpec raises error "missing arguments for method"
Date Mon, 28 Mar 2016 03:57:33 GMT
Hi,

I'm testing a sample code and I get this error. Here is the sample code I use :

scala> import org.apache.spark.streaming._
import org.apache.spark.streaming._

scala> def mappingFunction(key: String, value: Option[Int], state: State[Int]): Option[String]
= {
     |    Option(key)
     | }
mappingFunction: (key: String, value: Option[Int], state: org.apache.spark.streaming.State[Int])Option[String]

scala> val spec = StateSpec.function(mappingFunction)
<console>:41: error: missing arguments for method mappingFunction;
follow this method with `_' if you want to treat it as a partially applied function
         val spec = StateSpec.function(mappingFunction)
                                       ^
I followed the current documentation https://spark.apache.org/docs/1.6.1/api/java/org/apache/spark/streaming/StateSpec.html

Any idea ?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message