Assume say JavaWord count I call the equivalent of a Mapper JavaPairRDD<String, Integer> ones = words.mapToPair(,,,
Now right here I want to guarantee that each word starting with a particular letter is processed in a specific partition - (Don't tell me this is a dumb idea - I know that but in a Hadoop code a custom partitioner is often important and I don't want to explain the real case) I have no idea how ones would implement mapToPartition but I want emulate Hadoop with a custom partition and keySort order JavaPairRDD<String, Integer> counts = ones.reduceByKey(...