File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
core/src/main/scala/org/apache/spark Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,11 @@ private[spark] class ContextCleaner(sc: SparkContext) extends Logging {
6363
6464 private val cleaningThread = new Thread () { override def run () { keepCleaning() }}
6565
66- /** Whether the cleaning thread will block on cleanup tasks */
67- private val blockOnCleanupTasks = sc.conf.getBoolean(" spark.cleaner.referenceTracking.blocking" , false )
66+ /**
67+ * Whether the cleaning thread will block on cleanup tasks.
68+ * This is set to true only for tests. */
69+ private val blockOnCleanupTasks = sc.conf.getBoolean(
70+ " spark.cleaner.referenceTracking.blocking" , false )
6871
6972 @ volatile private var stopped = false
7073
@@ -170,7 +173,8 @@ private[spark] class ContextCleaner(sc: SparkContext) extends Logging {
170173 private def broadcastManager = sc.env.broadcastManager
171174 private def mapOutputTrackerMaster = sc.env.mapOutputTracker.asInstanceOf [MapOutputTrackerMaster ]
172175
173- // Used for testing, explicitly blocks until cleanup is completed
176+ // Used for testing. These methods explicitly blocks until cleanup is completed
177+ // to ensure that more reliable testing.
174178
175179 def cleanupRDD (rdd : RDD [_]) {
176180 doCleanupRDD(rdd.id, blocking = true )
You can’t perform that action at this time.
0 commit comments