I want to apply a function via flatMap to each group created by DataSet.groupBy . Attempting to call flatMap I get a compiler error:
error: value flatMap is not a member of org.apache.flink.api.scala.GroupedDataSet
My code is:
var mapped = env.fromCollection(Array[(Int, Int)]()) var groups = mapped.groupBy("myGroupField") groups.flatMap( myFunction: (Int, Array[Int]) => Array[(Int, Array[(Int, Int)])] )
In fact, in the documentation flinkscala 0.9-SNAPSHOT no map or similar. Is there a similar method to work? How to achieve the desired distributed display for each group separately on node?
scala hadoop apache-flink
Willi MΓΌller
source share