Hi,
Filter() transformation in Apache Spark takes function as input.
It returns an RDD that only has element that pass the condition mentioned in input function.
val rdd1 = sc.parallelize(List(10,20,40,60))
val rdd2 = rdd2.filter(x => x !=10) println(rdd2.collect())
Output will be:
10.