406407408409410411412413414415416
private void loop() { // Check if we should stop every second. Sleeper sleeper = new Sleeper(1000, this); while (!this.stopped) { sleeper.sleep(); } } /** * Finish initialization of HMaster after becoming the primary master.
762763764765766767768769770771772
// Something seriously wrong. Shutdown. stop(); } } } sleeper.sleep(lastMsg); } // for } catch (Throwable t) { LOG.fatal("Unhandled exception. Aborting...", t); abort(); }
405406407408409410411412413414415
} } } // Do some housekeeping before going to sleep housekeeping(); sleeper.sleep(lastMsg); } // for } catch (OutOfMemoryError error) { abort(); LOG.fatal("Ran out of memory", error); } catch (Throwable t) {
307308309310311312313314315316317
834835836837838839840841842843844
} } } // Do some housekeeping before going to sleep housekeeping(); sleeper.sleep(lastMsg); } // for } catch (Throwable t) { LOG.fatal("Unhandled exception. Aborting...", t); abort(); }
459460461462463464465466467468469
} } } // Do some housekeeping before going to sleep housekeeping(); sleeper.sleep(lastMsg); } // for } catch (Throwable t) { if (!checkOOME(t)) { LOG.fatal("Unhandled exception. Aborting...", t); abort();
301302303304305306307308309310311
446447448449450451452453454455456
302303304305306307308309310311312