flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From subash basnet <yasub...@gmail.com>
Subject Re: Sorting in datastream
Date Wed, 17 Aug 2016 16:32:06 GMT
Hello Stephan,

Okey, then it's the same reason why there is no *count()* function in Data
streams as well I suppose.


Regards,
Subash

On Wed, Aug 17, 2016 at 6:26 PM, Stephan Ewen <sewen@apache.org> wrote:

> Hi!
>
> Data streams are inifnite. It's quite hard to sort something infinite ;-)
> That's why the operation does not exist on DataStream.
>
> Stephan
>
>
> On Wed, Aug 17, 2016 at 6:22 PM, subash basnet <yasubash@gmail.com> wrote:
>
>> Hello all,
>>
>> I found the *sortPartition()* function in dataset for ordering the
>> dataset elements as below:
>> DataSet<Tuple2<Integer, String>> data;
>> DataSet<Tuple2<Integer, String>> partitionedData = data.sortPartition(0,
>> Order.DESCENDING);
>>
>> But I couldn't find any methods to sort the elements in datastream.
>> DataStream<Tuple2<Integer, String>> data;
>> DataStream<Tuple2<Integer, String>> partitionedData =data.??
>>
>> What could be the way to achieve sorting in datastream elements.
>>
>>
>> Best Regards,
>> Subash Basnet
>>
>
>

Mime
View raw message