Description
New function for RDDs -> apply
>>> def foo(rdd):
... return rdd.map(lambda x: x.split('|')).filter(lambda x: x[0] == 'ERROR')
>>> rdd = sc.parallelize(['ERROR|10', 'ERROR|12', 'WARNING|10', 'INFO|2'])
>>> result = rdd.apply(foo)
>>> result.collect()
[('ERROR', '10'), ('ERROR', '12')]