List of usage examples for org.apache.hadoop.yarn.event Event toString
String toString();
From source file:org.apache.tajo.master.TajoAsyncDispatcher.java
License:Apache License
@SuppressWarnings("unchecked") protected void dispatch(Event event) { //all events go thru this loop if (LOG.isDebugEnabled()) { LOG.debug("Dispatching the event " + event.getClass().getName() + "." + event.toString()); }// w w w. j a v a 2 s . c om Class<? extends Enum> type = event.getType().getDeclaringClass(); try { EventHandler handler = eventDispatchers.get(type); if (handler != null) { handler.handle(event); } else { throw new Exception("No handler for registered for " + type); } } catch (Throwable t) { //TODO Maybe log the state of the queue LOG.fatal("Error in dispatcher thread:" + event.getType(), t); if (exitOnDispatchException && (ShutdownHookManager.get().isShutdownInProgress()) == false) { LOG.info("Exiting, bye.."); System.exit(-1); } } finally { } }
From source file:org.apache.tez.common.AsyncDispatcher.java
License:Apache License
protected void dispatch(Event event) { //all events go thru this loop if (LOG.isDebugEnabled()) { LOG.debug("Dispatching the event " + event.getClass().getName() + "." + event.toString()); }/*from w w w .jav a 2 s. co m*/ Class<? extends Enum> type = event.getType().getDeclaringClass(); try { EventHandler handler = eventHandlers.get(type); if (handler != null) { handler.handle(event); } else { throw new Exception("No handler for registered for " + type); } } catch (Throwable t) { LOG.fatal("Error in dispatcher thread", t); // If serviceStop is called, we should exit this thread gracefully. if (exitOnDispatchException && (ShutdownHookManager.get().isShutdownInProgress()) == false && stopped == false) { LOG.info("Exiting, bbye.."); System.exit(-1); } } }
From source file:org.apache.tez.common.AsyncDispatcherConcurrent.java
License:Apache License
protected void dispatch(Event event) { //all events go thru this loop if (LOG.isDebugEnabled()) { LOG.debug("Dispatching the event " + event.getClass().getName() + "." + event.toString()); }//from w w w . ja v a 2 s. c om Class<? extends Enum> type = event.getType().getDeclaringClass(); try { EventHandler handler = eventHandlers.get(type); if (handler != null) { handler.handle(event); } else { throw new Exception("No handler for registered for " + type); } } catch (Throwable t) { LOG.error("Error in dispatcher thread", t); // If serviceStop is called, we should exit this thread gracefully. if (exitOnDispatchException && (ShutdownHookManager.get().isShutdownInProgress()) == false && stopped == false) { Thread shutDownThread = new Thread(createShutDownThread()); shutDownThread.setName("AsyncDispatcher ShutDown handler"); shutDownThread.start(); } } }