|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.service.AbstractService
org.apache.hadoop.yarn.event.AsyncDispatcher
@InterfaceAudience.Public @InterfaceStability.Evolving public class AsyncDispatcher
Dispatches Events in a separate thread. Currently only single thread
does that. Potentially there could be multiple channels for each event type
class and a thread pool can be used to dispatch the events.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.hadoop.service.Service |
|---|
org.apache.hadoop.service.Service.STATE |
| Field Summary | |
|---|---|
protected Map<Class<? extends Enum>,EventHandler> |
eventDispatchers
|
| Fields inherited from interface org.apache.hadoop.yarn.event.Dispatcher |
|---|
DEFAULT_DISPATCHER_EXIT_ON_ERROR, DISPATCHER_EXIT_ON_ERROR_KEY |
| Constructor Summary | |
|---|---|
AsyncDispatcher()
|
|
AsyncDispatcher(BlockingQueue<Event> eventQueue)
|
|
| Method Summary | |
|---|---|
protected void |
dispatch(Event event)
|
EventHandler |
getEventHandler()
|
void |
register(Class<? extends Enum> eventType,
EventHandler handler)
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf)
|
protected void |
serviceStart()
|
protected void |
serviceStop()
|
void |
setDrainEventsOnStop()
|
| Methods inherited from class org.apache.hadoop.service.AbstractService |
|---|
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, toString, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Map<Class<? extends Enum>,EventHandler> eventDispatchers
| Constructor Detail |
|---|
public AsyncDispatcher()
public AsyncDispatcher(BlockingQueue<Event> eventQueue)
| Method Detail |
|---|
protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class org.apache.hadoop.service.AbstractServiceException
protected void serviceStart()
throws Exception
serviceStart in class org.apache.hadoop.service.AbstractServiceExceptionpublic void setDrainEventsOnStop()
protected void serviceStop()
throws Exception
serviceStop in class org.apache.hadoop.service.AbstractServiceExceptionprotected void dispatch(Event event)
public void register(Class<? extends Enum> eventType,
EventHandler handler)
register in interface Dispatcherpublic EventHandler getEventHandler()
getEventHandler in interface Dispatcher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||