It should be keyBy(0) for DataStream API (since Flink 0.9)

Its groupBy() in DataSet API.

On Fri, Jul 22, 2016 at 1:27 AM, <rimin...@sina.cn> wrote:

> Hi,
>     today,I use flink to rewrite my spark project,in spark ,data is
> rdd,and it have much transformations and actions,but in flink,the
> DataStream does not have groupby and foreach,
>       for example,
>        val env=StreamExecutionEnvironment.createLocalEnvironment()
>       val data=List(("1"->"a"),("2"->"b"),("1"->"c"),("2"->"f"))
>       val ds=env.fromCollection(data)
>       val dskeyby=ds.groupBy(0)
>       ds.print()
>      env.execute()
>
> the code "val dskeyby=ds.groupBy(0)" is error,say "value groupBy is not a
> member of org.apache.flink.streaming.api.scala.DataStream"
> so , the solution is?
> --------------------------------
>
>
>
>
>

Reply via email to