GitHub user dianacarroll opened a pull request:
https://github.com/apache/spark/pull/1276
[SPARK-2334] fix rdd.id() Attribute Error
rdd.id() was returning an Attribute Error in some cases because self._id is
not getting set. So instead of returning the _id attribute, return the value
of id() from the jrdd. Fixes bug SPARK-2334.
Test with: sc.parallelize([1,2,3]).map(lambda x: x+1).id()
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dianacarroll/spark SPARK-2334
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/1276.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1276
----
commit a69e6a9dde47b2eb8bb99e4a67013c107df80eb9
Author: Diana Carroll <[email protected]>
Date: 2014-07-01T17:08:45Z
rdd.id(): return id of underlying jrdd
In some cases self._id is not getting set and calls to id() are therefore
resulting in an AttributeError. This change fixes that by returning the id of
the underlying jrdd instead.
Test case: sc.parallelize([1,2,3]).map(lambda x: x+1).id()
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---