filterByRange

fun <K, V> JavaRDD<Tuple2<K, V>>.filterByRange(lower: K, upper: K): JavaRDD<Tuple2<K, V>>
fun <K, V> JavaRDD<Tuple2<K, V>>.filterByRange(comp: Comparator<K>, lower: K, upper: K): JavaRDD<Tuple2<K, V>>

Return a RDD containing only the elements in the inclusive range lower to upper. If the RDD has been partitioned using a RangePartitioner, then this operation can be performed efficiently by only scanning the partitions that might contain matching elements. Otherwise, a standard filter is applied to all partitions.

Since

3.1.0


fun <K : Comparable<K>, V> JavaRDD<Tuple2<K, V>>.filterByRange(range: ClosedRange<K>): JavaRDD<Tuple2<K, V>>

Return a RDD containing only the elements in the range range. If the RDD has been partitioned using a RangePartitioner, then this operation can be performed efficiently by only scanning the partitions that might contain matching elements. Otherwise, a standard filter is applied to all partitions.

Since

3.1.0


fun <K : Comparable<K>, V> JavaRDD<Tuple2<K, V>>.filterByRange(comp: Comparator<K>, range: ClosedRange<K>): JavaRDD<Tuple2<K, V>>

Return a RDD containing only the elements in the inclusive range range. If the RDD has been partitioned using a RangePartitioner, then this operation can be performed efficiently by only scanning the partitions that might contain matching elements. Otherwise, a standard filter is applied to all partitions.

Since

3.1.0