Getting elements from DataStream

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting elements from DataStream

subashbasnet
Hello all,

Getting certain number of elements from DataSet is possible as below:
DataSet<Centroid> centroids = newDataSet.map(new TupleCentroidConverter()).first(3);

How could I get elements as above in DataStream
DataStream<Centroid> centroids = newDataStream.map(new TupleCentroidConverter()).???


Best Regards,
Subash Basnet
Reply | Threaded
Open this post in threaded view
|

Re: Getting elements from DataStream

Stephan Ewen
Hi!

The equivalent does not yet exist on DataStream.

Stephan


On Mon, Apr 11, 2016 at 3:42 PM, subash basnet <[hidden email]> wrote:
Hello all,

Getting certain number of elements from DataSet is possible as below:
DataSet<Centroid> centroids = newDataSet.map(new TupleCentroidConverter()).first(3);

How could I get elements as above in DataStream
DataStream<Centroid> centroids = newDataStream.map(new TupleCentroidConverter()).???


Best Regards,
Subash Basnet