Skip to content

Commit efc4f24

Browse files
author
KaiXinXiaoLei
committed
change file
1 parent d538919 commit efc4f24

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ package org.apache.spark
2020
import java.util.concurrent.TimeUnit
2121

2222
import scala.collection.mutable
23+
import scala.util.control.ControlThrowable
2324

2425
import com.codahale.metrics.{Gauge, MetricRegistry}
2526

@@ -211,7 +212,16 @@ private[spark] class ExecutorAllocationManager(
211212
listenerBus.addListener(listener)
212213

213214
val scheduleTask = new Runnable() {
214-
override def run(): Unit = Utils.logUncaughtExceptions(schedule())
215+
override def run(): Unit = {
216+
try {
217+
schedule()
218+
} catch {
219+
case ct: ControlThrowable =>
220+
throw ct
221+
case t: Throwable =>
222+
logError(s"Uncaught exception in thread ${Thread.currentThread().getName}", t)
223+
}
224+
}
215225
}
216226
executor.scheduleAtFixedRate(scheduleTask, 0, intervalMillis, TimeUnit.MILLISECONDS)
217227
}

0 commit comments

Comments
 (0)