Github user ScrapCodes commented on a diff in the pull request: https://github.com/apache/spark/pull/126#discussion_r10514209 --- Diff: core/src/main/scala/org/apache/spark/Dependency.scala --- @@ -49,9 +49,28 @@ class ShuffleDependency[K, V]( @transient rdd: RDD[_ <: Product2[K, V]], val partitioner: Partitioner, val serializerClass: String = null) - extends Dependency(rdd.asInstanceOf[RDD[Product2[K, V]]]) { + extends Dependency(rdd.asInstanceOf[RDD[Product2[K, V]]]) with Logging { val shuffleId: Int = rdd.context.newShuffleId() + + override def finalize() { + try { + if (rdd != null) { + rdd.sparkContext.cleaner.cleanShuffle(shuffleId) + } + } catch { + case t: Throwable => + // Paranoia - If logError throws error as well, report to stderr. + try { + logError("Error in finalize", t) --- End diff -- @tdas Hey TD, A try catch on logging ?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---