Hi All,
I want to try out kafka stream example using this example :
https://github.com/confluentinc/examples/blob/3.1.x/kafka-streams/src/main/scala/io/confluent/examples/streams/MapFunctionScalaExample.scala
Getting exception while compiling code :
*[error] val uppercasedWithMapValues: KStream[Array[Byte], String] =
textLines.mapValues(x => makeCaps(x))*
*[error]
^*
*[error] /home/ubuntu/stream/MapFunctionScalaExample.scala:32: missing
parameter type*
*[error] val uppercasedWithMap: KStream[Array[Byte], String] =
textLines.map((key, value) => (key, value.toUpperCase()))*
*[error]
^*
Is this example working for anyone, Has anyone tried it out?
This is my sbt file :
name := "Kafka_Stream_Test"
organization := "com.goibibo"
version := "0.1"
scalaVersion := "2.11.0"
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
resolvers ++= Seq(
"confluent-repository" at "http://packages.confluent.io/maven/"
)
libraryDependencies ++= Seq(
"org.apache.kafka" % "kafka-streams" % "0.10.1.0-cp2",
"org.apache.kafka" % "kafka-clients" % "0.10.1.0-cp2"
)
Is there anything i'm missing here ?
Regards,
Amrit