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
>

Reply via email to