You can also check rdd.partitions.size. This will be 0 for empty RDDs and
0 for RDDs with data.
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/Testing-if-an-RDD-is-empty-tp1678p21170.html
Sent from the Apache Spark User List mailing list archive
. 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.
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/Testing-if-an-RDD-is-empty-tp1678p21175.html
Sent from the Apache Spark User
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
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