如何获取对已保存在内存中的 RDD 的引用?

How to get a reference to RDD thats already persisted in memory?

我不小心覆盖了内存中对 RDD 的原始引用,我该如何取回它或设置另一个引用?

您可以调用 sc.getPersistentRDDs,其中 returns 所有已标记为持久性(.cache())的 RDD。