spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adnan Yaqoob <nsyaq...@gmail.com>
Subject Re: Access Last Element of RDD
Date Thu, 24 Apr 2014 05:00:32 GMT
You can use following code:

RDD.take(RDD.count())


On Thu, Apr 24, 2014 at 9:51 AM, Sai Prasanna <ansaiprasanna@gmail.com>wrote:

> Hi All, Some help !
> RDD.first or RDD.take(1) gives the first item, is there a straight forward
> way to access the last element in a similar way ?
>
> I coudnt fine a tail/last method for RDD. !!
>

Mime
View raw message