I want to access data from a particular partition in Spark RDD. I can get address of a partition as follow:
myRDD.partitions(0)
But I want to get data from myRDD.partitions(0)
partition.
I tried official org.apache.spark documentation but couldn't find.
Thanks in advance.
You can use
mapPartitionsWithIndex
as follows