Class HadoopUncaughtExceptionHandler
java.lang.Object
org.apache.hadoop.service.launcher.HadoopUncaughtExceptionHandler
- All Implemented Interfaces:
Thread.UncaughtExceptionHandler
@Public
@Evolving
public class HadoopUncaughtExceptionHandler
extends Object
implements Thread.UncaughtExceptionHandler
This class is intended to be installed by calling
Thread.setDefaultUncaughtExceptionHandler(UncaughtExceptionHandler)
in the main entry point.
The base class will always attempt to shut down the process if an Error
was raised; the behavior on a standard Exception, raised outside
process shutdown, is simply to log it.
(Based on the class YarnUncaughtExceptionHandler)-
Constructor Summary
ConstructorsConstructorDescriptionBasic exception handler -logs simple exceptions, then continues.Create an instance delegating to the supplied handler if the exception is considered "simple". -
Method Summary
Modifier and TypeMethodDescriptionvoiduncaughtException(Thread thread, Throwable exception) Uncaught exception handler.
-
Constructor Details
-
HadoopUncaughtExceptionHandler
Create an instance delegating to the supplied handler if the exception is considered "simple".- Parameters:
delegate- a delegate exception handler.
-
HadoopUncaughtExceptionHandler
public HadoopUncaughtExceptionHandler()Basic exception handler -logs simple exceptions, then continues.
-
-
Method Details
-
uncaughtException
Uncaught exception handler. If an error is raised: shutdown The state of the system is unknown at this point -attempting a clean shutdown is dangerous. Instead: exit- Specified by:
uncaughtExceptionin interfaceThread.UncaughtExceptionHandler- Parameters:
thread- thread that failedexception- the raised exception
-