use of org.apache.myriad.scheduler.yarn.interceptor.CompositeInterceptor in project incubator-myriad by apache.
the class MyriadFifoScheduler method setRMContext.
/**
* Register an event handler that receives {@link RMNodeEvent} events.
* This event handler is registered ahead of RM's own event handler for RMNodeEvents.
* For e.g. myriad can inspect a node's HB (RMNodeStatusEvent) before the HB is handled by
* RM and the scheduler.
*
* @param rmContext
*/
@Override
public synchronized void setRMContext(RMContext rmContext) {
this.rmContext = rmContext;
this.yarnSchedulerInterceptor = new CompositeInterceptor();
rmNodeEventHandler = new RMNodeEventHandler(yarnSchedulerInterceptor, rmContext);
rmContext.getDispatcher().register(RMNodeEventType.class, rmNodeEventHandler);
super.setRMContext(rmContext);
}
Aggregations