spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Al M (JIRA)" <>
Subject [jira] [Created] (SPARK-5270) Elegantly check if RDD is empty
Date Thu, 15 Jan 2015 17:17:35 GMT
Al M created SPARK-5270:

             Summary: Elegantly check if RDD is empty
                 Key: SPARK-5270
             Project: Spark
          Issue Type: Improvement
    Affects Versions: 1.2.0
         Environment: Centos 6
            Reporter: Al M
            Priority: Trivial

Right now there is no clean way to check if an RDD is empty.  As discussed here:

This is especially a problem when using streams.  Sometimes my batches are huge in one stream,
sometimes i get nothing for hours.  Still I have to run count() to check if there is anything
in the RDD.

I can also run first() and catch the exception; this is neither a clean nor fast solution.

I'd like a method rdd.isEmpty that returns a boolean.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message