Skip to content

Commit 4d05314

Browse files
committed
Scala style fix.
1 parent 2b95b5e commit 4d05314

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)