Skip to content
Closed
Changes from 1 commit
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
Next Next commit
[minor] [core] Warn users who try to cache RDDs with dynamic allocati…
…on on.
  • Loading branch information
Marcelo Vanzin committed Apr 28, 2015
commit 9efb9daea3fa6ac438fcd919da88946fce8671f9
5 changes: 5 additions & 0 deletions core/src/main/scala/org/apache/spark/SparkContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,11 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
* Register an RDD to be persisted in memory and/or disk storage
*/
private[spark] def persistRDD(rdd: RDD[_]) {
_executorAllocationManager.foreach { _ =>
logWarning(
s"Dynamic allocation currently does not support cached RDDs. Cached data for RDD " +
s"${rdd.id} will be deallocated when executors are removed.")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we say "lost" instead of "deallocated"? Deallocate has a connotation to me of purposely returned to a pool, where as this is more a situation of unpurposely returned to nowhere accessible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about lost but thought it would be too strong, since the data can be recomputed. But sure, it sounds more correct than "deallocated".

}
persistentRdds(rdd.id) = rdd
}

Expand Down