spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Wendell (JIRA)" <>
Subject [jira] [Updated] (SPARK-5270) Provide isEmpty() function in RDD API
Date Tue, 20 Jan 2015 06:50:37 GMT


Patrick Wendell updated SPARK-5270:
    Summary: Provide isEmpty() function in RDD API  (was: Provide isEmpty utility function

> Provide isEmpty() function in RDD API
> -------------------------------------
>                 Key: SPARK-5270
>                 URL:
>             Project: Spark
>          Issue Type: Improvement
>    Affects Versions: 1.2.0
>         Environment: Centos 6
>            Reporter: Al M
>            Assignee: Sean Owen
>            Priority: Trivial
> Right now there is no clean way to check if an RDD is empty.  As discussed here:
> I'd like a method rdd.isEmpty that returns a boolean.
> This would be especially useful 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 process my empty RDD like the others but it would be more efficient
to just skip the empty ones.
> I can also run first() and catch the exception; this is neither a clean nor fast solution.

This message was sent by Atlassian JIRA

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

View raw message