Re: how to get rid of null pointer exception in collection in DataStream

2016-07-18 Thread subash basnet
Hello Robert, Yup thank you, I used array in place of collection to rid of that error. Best Regards, Subash Basnet On Thu, Jul 14, 2016 at 4:03 PM, Robert Metzger wrote: > [image: Boxbe] This message is eligible > for Automatic Cleanup! (rmetz...@apache.org)

Re: how to get rid of null pointer exception in collection in DataStream

2016-07-14 Thread Robert Metzger
Hi Subash, The problem you are facing is not related to Flink. The problem is that the "centroids" field is not initialized, which is general Java issue. Please keep in mind that this list is not the best forum for Java questions. Regards, Robert On Wed, Jul 13, 2016 at 6:45 PM, subash basnet

how to get rid of null pointer exception in collection in DataStream

2016-07-13 Thread subash basnet
Hello all, I need to collect the centroids to find out the nearest center for each point. DataStream points = newDataStream.map(new getPoints()); DataStream *centroids* = newCentroidDataStream.map(new TupleCentroidConverter()); ConnectedIterativeStreams loop = points.iterate().withFeedbackType(Cen