|
I think you could do something like
that : (but Cheng's solution allows to avoid testing, so it's
better) :
val isEmpty = rdd.mapPartitions(iter => Iterator(! iter.hasNext)).reduce(_&&_) but it would be bad if the rdd is not persisted... Guillaume
--
|
- Testing if an RDD is empty? Sampo Niskanen
- Re: Testing if an RDD is empty? Cheng Lian
- Re: Testing if an RDD is empty? Guillaume Pitel
- Re: Testing if an RDD is empty? Cheng Lian

