Skip to content

Commit

Permalink
Scala style fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdas committed Apr 7, 2014
1 parent 2b95b5e commit 4d05314
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/src/main/scala/org/apache/spark/ContextCleaner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ private[spark] class ContextCleaner(sc: SparkContext) extends Logging {

private val cleaningThread = new Thread() { override def run() { keepCleaning() }}

/** Whether the cleaning thread will block on cleanup tasks */
private val blockOnCleanupTasks = sc.conf.getBoolean("spark.cleaner.referenceTracking.blocking", false)
/**
* Whether the cleaning thread will block on cleanup tasks.
* This is set to true only for tests. */
private val blockOnCleanupTasks = sc.conf.getBoolean(
"spark.cleaner.referenceTracking.blocking", false)

@volatile private var stopped = false

Expand Down Expand Up @@ -170,7 +173,8 @@ private[spark] class ContextCleaner(sc: SparkContext) extends Logging {
private def broadcastManager = sc.env.broadcastManager
private def mapOutputTrackerMaster = sc.env.mapOutputTracker.asInstanceOf[MapOutputTrackerMaster]

// Used for testing, explicitly blocks until cleanup is completed
// Used for testing. These methods explicitly blocks until cleanup is completed
// to ensure that more reliable testing.

def cleanupRDD(rdd: RDD[_]) {
doCleanupRDD(rdd.id, blocking = true)
Expand Down

0 comments on commit 4d05314

Please sign in to comment.