make sure you mark RDD.mapPartitionsWithContext as well