Re: how to convert datastream to collection

2016-05-04 Thread Stefano Baghino
I believe you may suffer from some undefined behaviour by using different versions for Flink and contrib libraries. Please note that in your dependency declaration there's a typo: flink-streaming-contrib_${flink.version} should be flink-streaming-contrib_${scala.version}, with ${scala.version} bein

Re: how to convert datastream to collection

2016-05-04 Thread Aljoscha Krettek
org.apache.flink flink-streaming-contrib_2.10 1.0.0 On Wed, 4 May 2016 at 12:44 subash basnet wrote: > Hello Stefano, > > When I did as you said, it shows: *Missing artifact > org.apache.flink:flink-streaming-contrib_1.0.0:jar:1.0.0* error. > My pom is: > > UTF-8 > 1.0.0 > > >

Re: how to convert datastream to collection

2016-05-04 Thread subash basnet
Hello Stefano, When I did as you said, it shows: *Missing artifact org.apache.flink:flink-streaming-contrib_1.0.0:jar:1.0.0* error. My pom is: UTF-8 1.0.0 org.apache.flink *flink-streaming-contrib_${flink.version}* *${flink.version}* So I instead used the below for contrib dependency as given

Re: how to convert datastream to collection

2016-05-04 Thread Stefano Baghino
I think you have to explicitly import contrib packages as a dependency in Maven/SBT. In particular, in your case, it should be something like: org.apache.flink flink-streaming-contrib_${scala.version} ${project.version} for Maven. On Wed, May 4, 2016 at 12:00 PM, subash basnet wrote: > Hell

Re: how to convert datastream to collection

2016-05-04 Thread subash basnet
Hello there, Thank you! But I couldn't find DataStreamUtils. Where is it located? I am using *1.0.0*, The given, org.apache.flink.*contrib*.streaming.DataStreamUtils doesn't work as there is no *contrib *package within org.apache.flink. Best Regards, Subash Basnet On Tue, May 3, 2016 at 4:35 PM

Re: how to convert datastream to collection

2016-05-03 Thread Srikanth
Why do you want collect and iterate? Why not iterate on the DataStream itself? May be I didn't understand your use case completely. Srikanth On Tue, May 3, 2016 at 10:55 AM, Aljoscha Krettek wrote: > Hi, > please keep in mind that we're dealing with streams. The Iterator might > never finish. >

Re: how to convert datastream to collection

2016-05-03 Thread Aljoscha Krettek
Hi, please keep in mind that we're dealing with streams. The Iterator might never finish. Cheers, Aljoscha On Tue, 3 May 2016 at 16:35 Suneel Marthi wrote: > DataStream> *newCentroids = new DataStream<>.()* > > *Iterator> iter = > DataStreamUtils.collect(newCentroids);* > > *List> list = Li

Re: how to convert datastream to collection

2016-05-03 Thread Suneel Marthi
DataStream> *newCentroids = new DataStream<>.()* *Iterator> iter = DataStreamUtils.collect(newCentroids);* *List> list = Lists.newArrayList(iter);* On Tue, May 3, 2016 at 10:26 AM, subash basnet wrote: > Hello all, > > Suppose I have the datastream as: > DataStream> *newCentroids*; > > How

how to convert datastream to collection

2016-05-03 Thread subash basnet
Hello all, Suppose I have the datastream as: DataStream> *newCentroids*; How to get collection of *newCentroids * to be able to loop as below: private Collection> *centroids*; for (Centroid cent : *centroids*) { } Best Regards, Subash Basnet