This is expensive but doable: rdd.zipWithIndex().filter { case (_, idx) => idx >= 10 && idx < 20 }.collect()
-Xiangrui On Thu, Jul 10, 2014 at 12:53 PM, Nick Chammas <nicholas.cham...@gmail.com> wrote: > Interesting question on Stack Overflow: > http://stackoverflow.com/q/24677180/877069 > > Basically, is there a way to take() elements of an RDD at an arbitrary > index? > > Nick > > > ________________________________ > View this message in context: How to RDD.take(middle 10 elements) > Sent from the Apache Spark User List mailing list archive at Nabble.com.