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

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


    };
  }

  public static ResourceManager mockRm(int apps, int racks, int nodes,
                                       int mbsPerNode) throws IOException {
    RMContext rmContext = mockRMContext(apps, racks, nodes,
      mbsPerNode);
    return mockRm(rmContext);
  }
View Full Code Here


  public static ResourceManager mockFifoRm(int apps, int racks, int nodes,
                                       int mbsPerNode)
  throws Exception {
    ResourceManager rm = mock(ResourceManager.class);
    RMContext rmContext = mockRMContext(apps, racks, nodes,
        mbsPerNode);
    ResourceScheduler rs = mockFifoScheduler();
    when(rm.getResourceScheduler()).thenReturn(rs);
    when(rm.getRMContext()).thenReturn(rmContext);
    return rm;
View Full Code Here

  private Injector injector;
 
  @Before
  public void setUp() throws Exception {
    final RMContext mockRMContext =
        TestRMWebApp.mockRMContext(3, numberOfRacks, numberOfNodesPerRack,
          8 * TestRMWebApp.GiB);
    injector =
        WebAppTests.createMockInjector(RMContext.class, mockRMContext,
          new Module() {
View Full Code Here

    final String user_0 = "user_0";
    final String user_1 = "user_1";
   
    RecordFactory recordFactory =
        RecordFactoryProvider.getRecordFactory(null);
    RMContext rmContext = TestUtils.getMockRMContext();

    Priority priority_1 = TestUtils.createMockPriority(1);

    // Submit first application with some resource-requests from user_0,
    // and check headroom
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, null);
    dispatcher.register(SchedulerEventType.class,
        new InlineDispatcher.EmptyEventHandler());
    dispatcher.register(RMNodeEventType.class,
        new NodeEventDispatcher(context));
View Full Code Here

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

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

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

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

    } catch (Exception e) {
      puts("Invalid Application ID: " + aid);
      return;
    }

    RMContext context = getInstance(RMContext.class);
    RMApp rmApp = context.getRMApps().get(appID);
    if (rmApp == null) {
      puts("Application not found: "+ aid);
      return;
    }
    AppInfo app = new AppInfo(rmApp, true);
View Full Code Here

      @Override
      public void handle(Event event) {
        ; // ignore
      }
    });
    RMContext context =
        new RMContextImpl(dispatcher, null, null, null, null,
          null, new RMContainerTokenSecretManager(conf),
          new NMTokenSecretManagerInRM(conf), null);
    dispatcher.register(RMNodeEventType.class,
        new ResourceManager.NodeEventDispatcher(context));
    NodesListManager nodesListManager = new NodesListManager(context);
    nodesListManager.init(conf);
   
    context.getContainerTokenSecretManager().rollMasterKey();
    context.getNMTokenSecretManager().rollMasterKey();
    resourceTrackerService = new ResourceTrackerService(context,
        nodesListManager, new NMLivelinessMonitor(dispatcher),
        context.getContainerTokenSecretManager(),
        context.getNMTokenSecretManager());
    resourceTrackerService.init(conf);
  }
View Full Code Here

TOP

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

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.