accommodate change of MapPartitionsWithSplit to MapPartitionsWithIndex