I don't see common iterable trait methods such as takeRight() or last() in the spark scala api documentation. There are sampling and sorting methods. sample, sortByKey
spark scala api http://spark.incubator.apache.org/docs/latest/scala-programming-guide.html#rdd-operations org.apache.spark.rdd http://spark.incubator.apache.org/docs/latest/api/core/index.html#org.apache.spark.rdd.RDD spark-0.8.0-incubating/core/src/main/scala/org/apache/spark/rdd Also, remember that in scala tail() will return all of the elements except for head. On Thu, Oct 24, 2013 at 3:23 PM, Matt Cheah <[email protected]> wrote: > Hi everyone, > > I see there is a take() function for RDDs, getting the first n elements. > Is there a way to get the last n elements? > > Thanks, > > -Matt Cheah >
