[SPARK-15288][MESOS] Mesos dispatcher should handle gracefully when any thread gets UncaughtException
## What changes were proposed in this pull request? Adding the default UncaughtExceptionHandler to the MesosClusterDispatcher. ## How was this patch tested? I verified it manually, when any of the dispatcher thread gets uncaught exceptions then the default UncaughtExceptionHandler will handle those exceptions. Author: Devaraj K <devaraj@apache.org> Closes #13072 from devaraj-kavali/SPARK-15288.
This commit is contained in:
parent
fe07de9566
commit
410392ed75
|
@ -25,7 +25,7 @@ import org.apache.spark.deploy.mesos.ui.MesosClusterUI
|
||||||
import org.apache.spark.deploy.rest.mesos.MesosRestServer
|
import org.apache.spark.deploy.rest.mesos.MesosRestServer
|
||||||
import org.apache.spark.internal.Logging
|
import org.apache.spark.internal.Logging
|
||||||
import org.apache.spark.scheduler.cluster.mesos._
|
import org.apache.spark.scheduler.cluster.mesos._
|
||||||
import org.apache.spark.util.{CommandLineUtils, ShutdownHookManager, Utils}
|
import org.apache.spark.util.{CommandLineUtils, ShutdownHookManager, SparkUncaughtExceptionHandler, Utils}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A dispatcher that is responsible for managing and launching drivers, and is intended to be
|
* A dispatcher that is responsible for managing and launching drivers, and is intended to be
|
||||||
|
@ -97,6 +97,7 @@ private[mesos] object MesosClusterDispatcher
|
||||||
with CommandLineUtils {
|
with CommandLineUtils {
|
||||||
|
|
||||||
override def main(args: Array[String]) {
|
override def main(args: Array[String]) {
|
||||||
|
Thread.setDefaultUncaughtExceptionHandler(SparkUncaughtExceptionHandler)
|
||||||
Utils.initDaemon(log)
|
Utils.initDaemon(log)
|
||||||
val conf = new SparkConf
|
val conf = new SparkConf
|
||||||
val dispatcherArgs = new MesosClusterDispatcherArguments(args, conf)
|
val dispatcherArgs = new MesosClusterDispatcherArguments(args, conf)
|
||||||
|
|
Loading…
Reference in a new issue