3
votes

In Fink source, there are flink-stream-java and flink-stream-scala modules. Why do we need two modules for flink streaming?

https://github.com/apache/flink/tree/master/flink-streaming-java

https://github.com/apache/flink/tree/master/flink-streaming-scala

2

2 Answers

2
votes

Both flink-stream-java and flink-stream-scala provide a similar API to manage Flink Streams ; you only have to use one of them, depending on your language.

Please note that whatever your choice, some dependencies like flink-runtime and flink-clients depend on a version of scala (2.11 or 2.12), because Flink is based on a framework written in scala, Akka.

There is an ongoing effort to remove scala dependency from a higher level API, flink-table (FLINK-11063).

0
votes

flink-stream-java is the implement of java api for stream. flink-stream-scala is the implement of scala api for stream. So you can find DataStream.java in flink-stream-java, and DataStream.scala in flink-stream-scala.