Ideally I'd be able to write this with only one pass of data, but it's not possible in one pass (as far as I know)
def separate(r: RDD[A \/ B]): (RDD[A], RDD[B]) = ???I'd settle for something like this where the As are dumped to a file and the Bs are still in the RDD. It's kind of like observeW from scalaz-stream.