Skip to content

Commit 9efb9da

Browse files
author
Marcelo Vanzin
committed
[minor] [core] Warn users who try to cache RDDs with dynamic allocation on.
1 parent 438859e commit 9efb9da

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/main/scala/org/apache/spark/SparkContext.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,11 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
13871387
* Register an RDD to be persisted in memory and/or disk storage
13881388
*/
13891389
private[spark] def persistRDD(rdd: RDD[_]) {
1390+
_executorAllocationManager.foreach { _ =>
1391+
logWarning(
1392+
s"Dynamic allocation currently does not support cached RDDs. Cached data for RDD " +
1393+
s"${rdd.id} will be deallocated when executors are removed.")
1394+
}
13901395
persistentRdds(rdd.id) = rdd
13911396
}
13921397

0 commit comments

Comments
 (0)