Hello all,

I grouped by the input based on it's id to count the number of elements in
each group.
DataStream<Tuple2<String, Long>> gridWithCount;
Upon printing the above datastream it shows with duplicate rows:
Output:
(1, 1)
(1,2)
(2,1)
(1,3)
(2,2).......

Whereas I wanted the distinct rows with final count:
Needed Output:
(1,3)
(2,2)..

What could be the way to achieve this.


Regards,
Subash Basnet

Reply via email to