lookup

fun <K, V> JavaRDD<Tuple2<K, V>>.lookup(key: K): List<V>

Return the list of values in the RDD for key key. This operation is done efficiently if the RDD has a known partitioner by only searching the partition that the key maps to.