flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piyush Shrivastava <piyush...@yahoo.co.in>
Subject Accessing elements from DataStream
Date Thu, 05 May 2016 11:00:04 GMT
Hi all,
Can we access individual elements from a DataStream through an iterator like we can in a WindowedStream
with the apply function?
I am able to access the elements of a WindowedStream using the apply function and using the
Iterable and Collector interfaces:
val ds = ws.apply((K, W, input: Iterable[T], output: Collector[R]) => {
   val it = input.toIterator
   while(it.hasNext){      ...   }})

the output of this function is a DataStream. I want to perform a keyBy on this DataStream
and then again iterate through it's individual elements. We cannot use the apply function
on DataStreams like in WindowedStreams. Is there any other way? Thanks and Regards,Piyush
Shrivastava
http://webograffiti.com

Mime
View raw message