Package org.apache.hadoop.yarn.server.resourcemanager

Examples of org.apache.hadoop.yarn.server.resourcemanager.RMContextImpl


    ContainerAllocationExpirer cae =
        new ContainerAllocationExpirer(nullDispatcher);
   
    Configuration conf = new Configuration();
    RMContext rmContext =
        new RMContextImpl(nullDispatcher, cae, null, null, null,
          new AMRMTokenSecretManager(conf),
          new RMContainerTokenSecretManager(conf),
          new NMTokenSecretManagerInRM(conf),
          new ClientToAMTokenSecretManagerInRM());
   
View Full Code Here


 
    ContainerAllocationExpirer containerAllocationExpirer =
        mock(ContainerAllocationExpirer.class);
    AMLivelinessMonitor amLivelinessMonitor = mock(AMLivelinessMonitor.class);
    rmContext =
        new RMContextImpl(new MemStore(), rmDispatcher,
          containerAllocationExpirer, amLivelinessMonitor, null,
          new ApplicationTokenSecretManager(new Configuration()));
   
    scheduler = mock(YarnScheduler.class);
    masterService = mock(ApplicationMasterService.class);
View Full Code Here

    // No op
    ContainerAllocationExpirer cae =
        new ContainerAllocationExpirer(nullDispatcher);
   
    RMContext rmContext =
        new RMContextImpl(null, nullDispatcher, cae, null, null,
          new ApplicationTokenSecretManager(new Configuration()));
   
    return rmContext;
  }
View Full Code Here

      public void handle(Event event) {
        ; // ignore
      }
    });
    RMContext context =
        new RMContextImpl(new MemStore(), dispatcher, null, null, null, null);
    dispatcher.register(RMNodeEventType.class,
        new ResourceManager.NodeEventDispatcher(context));
    NodesListManager nodesListManager = new NodesListManager(context);
    Configuration conf = new Configuration();
    nodesListManager.init(conf);
View Full Code Here

 
  @Test
  public void testAppAttemptMetrics() throws Exception {
    AsyncDispatcher dispatcher = new InlineDispatcher();
    RMContext rmContext =
        new RMContextImpl(null, dispatcher, null, null, null, null);

    FifoScheduler schedular = new FifoScheduler();
    schedular.reinitialize(new Configuration(), null, rmContext);

    ApplicationId appId = BuilderUtils.newApplicationId(200, 1);
View Full Code Here

    ContainerAllocationExpirer containerAllocationExpirer =
        mock(ContainerAllocationExpirer.class);
    AMLivelinessMonitor amLivelinessMonitor = mock(AMLivelinessMonitor.class);
    this.rmContext =
        new RMContextImpl(new MemStore(), rmDispatcher,
          containerAllocationExpirer, amLivelinessMonitor, null,
          new ApplicationTokenSecretManager(conf));

    rmDispatcher.register(RMAppAttemptEventType.class,
        new TestApplicationAttemptEventDispatcher(this.rmContext));
View Full Code Here

    final ConcurrentMap<String, RMNode> deactivatedNodesMap =
        Maps.newConcurrentMap();
    for (RMNode node : deactivatedNodes) {
      deactivatedNodesMap.put(node.getHostName(), node);
    }
   return new RMContextImpl(new MemStore(), null, null, null, null, null) {
      @Override
      public ConcurrentMap<ApplicationId, RMApp> getRMApps() {
        return applicationsMaps;
      }
      @Override
View Full Code Here

  @Before
  public void setUp() {
    Configuration conf = new Configuration();
    // Dispatcher that processes events inline
    Dispatcher dispatcher = new InlineDispatcher();
    RMContext context = new RMContextImpl(new MemStore(), dispatcher, null,
        null, null, null);
    dispatcher.register(SchedulerEventType.class,
        new InlineDispatcher.EmptyEventHandler());
    dispatcher.register(RMNodeEventType.class,
        new NodeEventDispatcher(context));
View Full Code Here

  }
 
  @Test(timeout=5000)
  public void testAppAttemptMetrics() throws Exception {
    AsyncDispatcher dispatcher = new InlineDispatcher();
    RMContext rmContext = new RMContextImpl(dispatcher, null,
        null, null, null, null, null, null, null);

    FifoScheduler schedular = new FifoScheduler();
    schedular.reinitialize(new Configuration(), rmContext);
    QueueMetrics metrics = schedular.getRootQueueMetrics();
View Full Code Here

        new RMContainerTokenSecretManager(conf);
    containerTokenSecretManager.rollMasterKey();
    NMTokenSecretManagerInRM nmTokenSecretManager =
        new NMTokenSecretManagerInRM(conf);
    nmTokenSecretManager.rollMasterKey();
    RMContext rmContext = new RMContextImpl(dispatcher, null, null, null, null,
        null, containerTokenSecretManager, nmTokenSecretManager, null);

    FifoScheduler scheduler = new FifoScheduler();
    scheduler.reinitialize(new Configuration(), rmContext);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.server.resourcemanager.RMContextImpl

Copyright © 2018 www.massapicom. 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.