apache/spark — pull request #1306 by YanjieGao (2014-07-05 07:51:25+00:00)
Title: [SPARK-2373]RDD add span function (split an RDD to two RDD based on user's function)]

def span(p: T => Boolean): (RDD[T], RDD[T])
Splits this RDD into a prefix/suffix pair according to a predicate .
returns
a pair consisting of the longest prefix of this RDD whose elements all satisfy p, and the rest of this list.

JIRA:https://issues.apache.org/jira/browse/SPARK-2373