SPARK-2895: Add mapPartitionsWithContext related support on Spark Java API.

you can't have default argument values in Java