Skip to content

Commit

Permalink
Fixed compilation errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdas committed Apr 4, 2014
1 parent b27f8e8 commit a430f06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/Dependency.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ShuffleDependency[K, V](

val shuffleId: Int = rdd.context.newShuffleId()

rdd.sparkContext.cleaner.registerShuffleForCleanup(this)
rdd.sparkContext.cleaner.foreach(_.registerShuffleForCleanup(this))
}


Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/rdd/RDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ abstract class RDD[T: ClassTag](
}
sc.persistRDD(this)
// Register the RDD with the ContextCleaner for automatic GC-based cleanup
sc.cleaner.registerRDDForCleanup(this)
sc.cleaner.foreach(_.registerRDDForCleanup(this))
storageLevel = newLevel
this
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class ContextCleanerSuite extends FunSuite with BeforeAndAfter with LocalSparkCo
}
}

def cleaner = sc.cleaner
def cleaner = sc.cleaner.get
}


Expand Down Expand Up @@ -235,7 +235,7 @@ class CleanerTester(

logInfo("Attempting to validate before cleanup:\n" + uncleanedResourcesToString)
preCleanupValidate()
sc.cleaner.attachListener(cleanerListener)
sc.cleaner.get.attachListener(cleanerListener)

/** Assert that all the stuff has been cleaned up */
def assertCleanup()(implicit waitTimeout: Eventually.Timeout) {
Expand Down

0 comments on commit a430f06

Please sign in to comment.