Add mapPartitions() method to RDD for API consistency.