...@gmail.com]
> *Sent:* Thursday, November 12, 2015 12:11 AM
> *To:* ayan guha
> *Cc:* user
> *Subject:* Re: How can you sort wordcounts by counts in
> stateful_network_wordcount.py example
>
>
>
> Hi Ayan,
>
>
>
> Thanks for help,
>
>
>
> Your example
: user
Subject: Re: How can you sort wordcounts by counts in
stateful_network_wordcount.py example
Hi Ayan,
Thanks for help,
Your example is not the streaming example. There we don't have sortByKey.
On Wed, Nov 11, 2015 at 11:35 PM, ayan guha
mailto:guha.a...@gmail.com>> wrote:
how ab
Hi Ayan,
Thanks for help,
Your example is not the streaming example. There we don't have sortByKey.
On Wed, Nov 11, 2015 at 11:35 PM, ayan guha wrote:
> how about this?
>
> sorted = running_counts.map(lambda t: t[1],t[0]).sortByKey()
>
> Basically swap key and value of the RDD and then sort?
how about this?
sorted = running_counts.map(lambda t: t[1],t[0]).sortByKey()
Basically swap key and value of the RDD and then sort?
On Thu, Nov 12, 2015 at 8:53 AM, Amir Rahnama wrote:
> Hey,
>
> Anybody knows how can one sort the result in the stateful example?
>
> Python would be prefered.
>