mapKeys

fun <K, V, U> JavaRDD<Tuple2<K, V>>.mapKeys(f: (K) -> U): JavaRDD<Tuple2<U, V>>

Pass each key in the key-value pair RDD through a map function without changing the values; this also retains the original RDD's partitioning.