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-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org