Spark 615 map partitions with index callable from java