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
Modifier and TypeClassDescriptionclass
Handle YARN Node Manager events.class
Handle timer events: a constant tick to handle time-based actions such as timeouts. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
registerAddOn
(DispatcherAddOn addOn) void
registerPollable
(Pollable pollable) void
run()
void
setAMRegistrar
(AMRegistrar registrar) void
setHttpPort
(int port) void
setTrackingUrl
(String trackingUrl) void
setYarn
(AMYarnFacade yarn) boolean
start()
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
-