Package org.apache.drill.yarn.appMaster
Class Dispatcher
java.lang.Object
org.apache.drill.yarn.appMaster.Dispatcher
Dispatches YARN, timer and ZooKeeper events to the cluster controller.
Allows the controller to be independent of the plumbing needed to
receive events. Divides work among
various components to separate concerns. Three streams of events
feed into an app master "strategy". The three streams are
- Resource manager
- Node manager
- Timer
This class is "lightly" multi-threaded: it responds to events from the RM, NM and timer threads. Within each of these, events are sequential. So, synchronization is needed across the three event types, but not within event types. (That is, we won't see two RM events, say, occurring at the same time from separate threads.)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassHandle YARN Node Manager events.classHandle timer events: a constant tick to handle time-based actions such as timeouts. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterAddOn(DispatcherAddOn addOn) voidregisterPollable(Pollable pollable) voidrun()voidsetAMRegistrar(AMRegistrar registrar) voidsetHttpPort(int port) voidsetTrackingUrl(String trackingUrl) voidsetYarn(AMYarnFacade yarn) booleanstart()Start the dispatcher by initializing YARN and registering the AM.
-
Constructor Details
-
Dispatcher
public Dispatcher(int timerPeriodMs)
-
-
Method Details
-
setYarn
- Throws:
YarnFacadeException
-
getController
-
registerPollable
-
registerAddOn
-
setHttpPort
public void setHttpPort(int port) -
setTrackingUrl
-
getTrackingUrl
-
setAMRegistrar
-
start
Start the dispatcher by initializing YARN and registering the AM.- Returns:
- true if successful, false if the dispatcher did not start.
- Throws:
YarnFacadeException
-
run
- Throws:
YarnFacadeException
-