flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suneel Marthi <smar...@apache.org>
Subject Re: flink1.0 DataStream groupby
Date Fri, 22 Jul 2016 05:35:13 GMT
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, <rimin515@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?
> --------------------------------
>
>
>
>
>

Mime
View raw message