Ok, understand. Thank you very much. And sorry for the halfheartedness while reading the code!
Thank you again! 2015-07-15 1:17 GMT+08:00 Kishorkumar Patil <[email protected]>: > Hi Chuanlei, > The setup-default-uncaught-exception-handler fails fast in both OOM and > other uncaught Exceptions. The difference in treatment is Runtime.halt vs > Runtime.exist (Other uncaught exceptions handled here). > > If the OOM Error, we shutdown JVM using Runtime.halt. In other cases, we > call Runtime.exit, which invokes all registered shutdownhooks, giving > other parts a chance to gracefully finalize. > > Calling Runtime.halt, is extreme caution - as it shutdowns the system > without calling any shutdownHooks. This extreme steps is essential for OOM > as attempt to handle that itselt can rethrow more of OOMs. > So to answer your question in short, we are failing fast - running other > shutdownhooks or not is the only difference. > > -Kishor > > > > > > > > On Tuesday, July 14, 2015 10:40 AM, Chuanlei Ni <[email protected]> > wrote: > > > Hi, > I want to know why setup-default-uncaught-exception-handler just deal > with the OOM error, since the fast fail is the philosophy of Storm design. > When a thread crashes in one Storm process, the process will lost its > functionality mostly. > Why not exit the whole process when an uncaught exception happens? If we > deal exception in that way, we can remove a lot of labor for ops of storm. > > Thanks in advance! > > > >
