Does this actually compile? Looks like the rdd.coalesce should be wrapped to turn it into a JavaRDD (sorry if I'm missing something)