Re: GroupedDataset collect

2015-06-11 Thread Maximilian Alber
Ok! Thank you! Cheers, Max On Thu, Jun 11, 2015 at 4:34 PM, Chiwan Park wrote: > Hi. You cannot collect grouped dataset directly. You can collect grouped > data by using reduceGroup method. > Following code is example: > > import org.apache.flink.util.Collector > val result = grouped_ds.reduceG

Re: GroupedDataset collect

2015-06-11 Thread Chiwan Park
Hi. You cannot collect grouped dataset directly. You can collect grouped data by using reduceGroup method. Following code is example: import org.apache.flink.util.Collector val result = grouped_ds.reduceGroup { (in, out: Collector[(Int, Seq[Int])]) => { val seq = in.toSeq // I assumed t

GroupedDataset collect

2015-06-11 Thread Maximilian Alber
Hi Flinksters, I tried to call collect on a grouped data set, somehow it did not work. Is this intended? If yes, why? Code snippet: // group a data set according to second field: val grouped_ds = cross_ds.groupBy(1) println("After groupBy: "+grouped_ds.collect()) Error: [ant:scalac]