spark-user mailing list archives

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

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

Any idea ?
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message