flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <rimin...@sina.cn>
Subject flink1.0 DataStream groupby
Date Fri, 22 Jul 2016 05:27:45 GMT
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