Search in sources :

Example 6 with CompositeInterceptor

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);
}
Also used : CompositeInterceptor(org.apache.myriad.scheduler.yarn.interceptor.CompositeInterceptor)

Aggregations

CompositeInterceptor (org.apache.myriad.scheduler.yarn.interceptor.CompositeInterceptor)6 SystemMetricsPublisher (org.apache.hadoop.yarn.server.resourcemanager.metrics.SystemMetricsPublisher)2 FSSchedulerNode (org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSSchedulerNode)2 MyriadConfiguration (org.apache.myriad.configuration.MyriadConfiguration)2 MockSchedulerDriver (org.apache.myriad.scheduler.MockSchedulerDriver)2 MyriadDriver (org.apache.myriad.scheduler.MyriadDriver)2 TaskUtils (org.apache.myriad.scheduler.TaskUtils)2 MyriadFairScheduler (org.apache.myriad.scheduler.yarn.MyriadFairScheduler)2 MockRMContext (org.apache.myriad.state.MockRMContext)2 Before (org.junit.Before)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 NodeId (org.apache.hadoop.yarn.api.records.NodeId)1 RMNode (org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode)1 FiCaSchedulerApp (org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerApp)1 FiCaSchedulerNode (org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerNode)1 LeastAMNodesFirstPolicy (org.apache.myriad.policy.LeastAMNodesFirstPolicy)1 SchedulerState (org.apache.myriad.state.SchedulerState)1 MyriadWebServer (org.apache.myriad.webapp.MyriadWebServer)1