Hi,

On Fri, Jan 16, 2015 at 7:31 AM, freedafeng <freedaf...@yahoo.com> wrote:
>
> I myself saw many times that my app threw out exceptions because an empty
> RDD cannot be saved. This is not big issue, but annoying. Having a cheap
> solution testing if an RDD is empty would be nice if there is no such thing
> available now.
>

I think the cheapest you can have is computing at least one element in the
RDD, which in the case of, say,

  val maybeEmptyRDD = veryExpensiveRDD.filter(false)

will be just as expensive as .count().

Tobias

Reply via email to