Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/pyspark/rdd.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def id(self):
"""
A unique ID for this RDD (within its SparkContext).
"""
return self._id
return self._jrdd.id()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self._jrdd.id() will need an RPC in py4j, so it's better to cache it as _id.

For PipelineRDD() and SchemaRDD(), we can override id() to fetch the id from _jrdd (also cache it).


def __repr__(self):
return self._jrdd.toString()
Expand Down