public class Dispatcher extends Object
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.)
Modifier and Type | Class and Description |
---|---|
class |
Dispatcher.NodeCallback
Handle YARN Node Manager events.
|
class |
Dispatcher.TimerCallback
Handle timer events: a constant tick to handle time-based actions such as
timeouts.
|
Constructor and Description |
---|
Dispatcher(int timerPeriodMs) |
Modifier and Type | Method and Description |
---|---|
ClusterController |
getController() |
String |
getTrackingUrl() |
void |
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.
|
public void setYarn(AMYarnFacade yarn) throws YarnFacadeException
YarnFacadeException
public ClusterController getController()
public void registerPollable(Pollable pollable)
public void registerAddOn(DispatcherAddOn addOn)
public void setHttpPort(int port)
public void setTrackingUrl(String trackingUrl)
public String getTrackingUrl()
public void setAMRegistrar(AMRegistrar registrar)
public boolean start() throws YarnFacadeException
YarnFacadeException
public void run() throws YarnFacadeException
YarnFacadeException
Copyright © 1970 The Apache Software Foundation. All rights reserved.