Hello there, Thank you! But I couldn't find DataStreamUtils. Where is it located? I am using <flink.version>*1.0.0*</flink.version>, 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, Suneel Marthi <smar...@apache.org> wrote: > [image: Boxbe] <https://www.boxbe.com/overview> This message is eligible > for Automatic Cleanup! (smar...@apache.org) Add cleanup rule > <https://www.boxbe.com/popup?url=https%3A%2F%2Fwww.boxbe.com%2Fcleanup%3Ftoken%3DreP2r48pKUa39v%252BHyshfrCrg6NOF1l7x0fQbG5CgONuGeaoFt%252B0MEkfhlWsK284TedwqHXrgsxKwx9SwMsfCTE%252Bwano8eHrWF4JHw%252Bk2c63GgLhuq74L7vMjaml3H9vLpCADALgCPlU%253D%26key%3DtqjcnI5NGF5kdpN%252FHUUJJ3wci2Mj9yq8k2inACOoMSE%253D&tc_serial=25281140543&tc_rand=1148713187&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001> > | More info > <http://blog.boxbe.com/general/boxbe-automatic-cleanup?tc_serial=25281140543&tc_rand=1148713187&utm_source=stf&utm_medium=email&utm_campaign=ANNO_CLEANUP_ADD&utm_content=001> > > DataStream<Tuple2<String,Point>> *newCentroids = new DataStream<>.....()* > > *Iterator<Tuple2<String, Point>> iter = > DataStreamUtils.collect(newCentroids);* > > *List<Tuple2<>> list = Lists.newArrayList(iter);* > > On Tue, May 3, 2016 at 10:26 AM, subash basnet <yasub...@gmail.com> wrote: > >> Hello all, >> >> Suppose I have the datastream as: >> DataStream<Tuple2<String,Point>> *newCentroids*; >> >> How to get collection of *newCentroids * to be able to loop as below: >> private Collection<Tuple2<String,Point>> *centroids*; >> for (Centroid cent : *centroids*) { >> } >> >> >> >> Best Regards, >> Subash Basnet >> > > >