Examples of InlineDispatcher


Examples of org.apache.hadoop.yarn.server.resourcemanager.resourcetracker.InlineDispatcher

    }
  }

  @Before
  public void setUp() throws Exception {
    InlineDispatcher rmDispatcher = new InlineDispatcher();
   
    rmContext =
        new RMContextImpl(new MemStore(), rmDispatcher, null, null,
            mock(DelegationTokenRenewer.class), null);
    scheduler = mock(YarnScheduler.class);
    doAnswer(
        new Answer<Void>() {

          @Override
          public Void answer(InvocationOnMock invocation) throws Throwable {
            final SchedulerEvent event = (SchedulerEvent)(invocation.getArguments()[0]);
            eventType = event.getType();
            if (eventType == SchedulerEventType.NODE_UPDATE) {
              completedContainers =
                  ((NodeUpdateSchedulerEvent)event).getCompletedContainers();
            } else {
              completedContainers = null;
            }
            return null;
          }
        }
        ).when(scheduler).handle(any(SchedulerEvent.class));
   
    rmDispatcher.register(SchedulerEventType.class,
        new TestSchedulerEventDispatcher());
   
    NodeId nodeId = BuilderUtils.newNodeId("localhost", 0);
    node = new RMNodeImpl(nodeId, rmContext, null, 0, 0, null, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.