sink type error in scala

Posted by Fanbin Bu on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/sink-type-error-in-scala-tp31640.html

Hi

I have my sink defined as:
class MyAwesomeSink() extends RichSinkFunction[(Boolean, Row)] {
...
}

But compile complains when I use it like:
val sink = new MyAwesomeSink()
tableEnv.toRetractStream(queryResult, classOf[Row]).addSink(sink)

 found   : MyAwesomeSink
 required: org.apache.flink.streaming.api.functions.sink.SinkFunction[org.apache.flink.api.java.tuple.Tuple2[Boolean,org.apache.flink.types.Row]]


I'm using Flink 1.9 with blink.
I tried 
import org.apache.flink.api.scala._
import org.apache.flink.streaming.api.scala._
and it doesn't work.


Any ideas?

Thanks,
Fanbin