Convert Datastream to Collector or List

2016-03-19 Thread Ahmed Nader
Hi, I want to pass an object of type DataStream ,after applying map function on it, as a parameter to be used somewhere else. But when i do so, i get an error message of trying to access a null context object. Is there a way that i can convert this DataStream object to a list or a collector so as t

Re: Convert Datastream to Collector or List

2016-03-19 Thread Ahmed Nader
Hello Suneel, Yeah that worked, thanks so much. On 16 March 2016 at 12:50, Suneel Marthi wrote: > DataStream ds = ... > > Iterator iter = DataStreamUtils.collect(ds); > > List list = Lists.newArrayList(iterator); > > Hope that helps. > > > On Wed, Mar 16, 2016 at 7:37 AM, Ahmed Nader > wrot

Re: Convert Datastream to Collector or List

2016-03-19 Thread Suneel Marthi
DataStream ds = ... Iterator iter = DataStreamUtils.collect(ds); List list = Lists.newArrayList(iterator); Hope that helps. On Wed, Mar 16, 2016 at 7:37 AM, Ahmed Nader wrote: > Hi, > I want to pass an object of type DataStream ,after applying map function > on it, as a parameter to be u