Examples of YarnScheduler


Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler

    // ensure max retries set to known value
    conf.setInt(YarnConfiguration.RM_AM_MAX_RETRIES, maxRetries);
    ApplicationSubmissionContext submissionContext = null;
    String clientTokenStr = "bogusstring";
    ApplicationStore appStore = mock(ApplicationStore.class);
    YarnScheduler scheduler = mock(YarnScheduler.class);
    ApplicationMasterService masterService =
        new ApplicationMasterService(rmContext,
            new ApplicationTokenSecretManager(), scheduler);

    RMApp application = new RMAppImpl(applicationId, rmContext,
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler

      Assert.fail(ex.getMessage());
    }
  }

  public ClientRMService createRMService() throws IOException {
    YarnScheduler yarnScheduler = mockYarnScheduler();
    RMContext rmContext = mock(RMContext.class);
    mockRMContext(yarnScheduler, rmContext);
    ConcurrentHashMap<ApplicationId, RMApp> apps = getRMApps(rmContext,
        yarnScheduler);
    when(rmContext.getRMApps()).thenReturn(apps);
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler

    rmService.moveApplicationAcrossQueues(request);
  }

  @Test
  public void testGetQueueInfo() throws Exception {
    YarnScheduler yarnScheduler = mock(YarnScheduler.class);
    RMContext rmContext = mock(RMContext.class);
    mockRMContext(yarnScheduler, rmContext);
    ClientRMService rmService = new ClientRMService(rmContext, yarnScheduler,
        null, null, null, null);
    GetQueueInfoRequest request = recordFactory
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler

  }

  @Test (timeout = 30000)
  @SuppressWarnings ("rawtypes")
  public void testAppSubmit() throws Exception {
    YarnScheduler yarnScheduler = mockYarnScheduler();
    RMContext rmContext = mock(RMContext.class);
    mockRMContext(yarnScheduler, rmContext);
    RMStateStore stateStore = mock(RMStateStore.class);
    when(rmContext.getStateStore()).thenReturn(stateStore);
    RMAppManager appManager = new RMAppManager(rmContext, yarnScheduler,
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler

    /**
     * 1. Submit 3 applications alternately in two queues
     * 2. Test each of the filters
     */
    // Basic setup
    YarnScheduler yarnScheduler = mockYarnScheduler();
    RMContext rmContext = mock(RMContext.class);
    mockRMContext(yarnScheduler, rmContext);
    RMStateStore stateStore = mock(RMStateStore.class);
    when(rmContext.getStateStore()).thenReturn(stateStore);
    RMAppManager appManager = new RMAppManager(rmContext, yarnScheduler,
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler

 
  @Test(timeout=4000)
  public void testConcurrentAppSubmit()
      throws IOException, InterruptedException, BrokenBarrierException,
      YarnException {
    YarnScheduler yarnScheduler = mockYarnScheduler();
    RMContext rmContext = mock(RMContext.class);
    mockRMContext(yarnScheduler, rmContext);
    RMStateStore stateStore = mock(RMStateStore.class);
    when(rmContext.getStateStore()).thenReturn(stateStore);
    RMAppManager appManager = new RMAppManager(rmContext, yarnScheduler,
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler

    when(containerimpl.getContainerState()).thenReturn(ContainerState.COMPLETE);
    return app;
  }

  private static YarnScheduler mockYarnScheduler() {
    YarnScheduler yarnScheduler = mock(YarnScheduler.class);
    when(yarnScheduler.getMinimumResourceCapability()).thenReturn(
        Resources.createResource(
            YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_MB));
    when(yarnScheduler.getMaximumResourceCapability()).thenReturn(
        Resources.createResource(
            YarnConfiguration.DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_MB));
    when(yarnScheduler.getAppsInQueue(QUEUE_1)).thenReturn(
        Arrays.asList(getApplicationAttemptId(101), getApplicationAttemptId(102)));
    when(yarnScheduler.getAppsInQueue(QUEUE_2)).thenReturn(
        Arrays.asList(getApplicationAttemptId(103)));
    return yarnScheduler;
  }
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler

    // ensure max retries set to known value
    conf.setInt(YarnConfiguration.RM_AM_MAX_RETRIES, maxRetries);
    ApplicationSubmissionContext submissionContext = null;
    String clientTokenStr = "bogusstring";
    ApplicationStore appStore = mock(ApplicationStore.class);
    YarnScheduler scheduler = mock(YarnScheduler.class);
    ApplicationMasterService masterService =
        new ApplicationMasterService(rmContext, scheduler);

    RMApp application = new RMAppImpl(applicationId, rmContext,
        conf, name, user,
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler

    Configuration conf = new YarnConfiguration();
    // ensure max retries set to known value
    conf.setInt(YarnConfiguration.RM_AM_MAX_RETRIES, maxRetries);
    ApplicationSubmissionContext submissionContext = null;
    ApplicationStore appStore = mock(ApplicationStore.class);
    YarnScheduler scheduler = mock(YarnScheduler.class);
    ApplicationMasterService masterService =
        new ApplicationMasterService(rmContext, scheduler);

    RMApp application = new RMAppImpl(applicationId, rmContext,
        conf, name, user,
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.scheduler.YarnScheduler

        applicationReport.getApplicationReport());
  }
 
  @Test
  public void testGetQueueInfo() throws Exception {
    YarnScheduler yarnScheduler = mock(YarnScheduler.class);
    RMContext rmContext = mock(RMContext.class);
    mockRMContext(yarnScheduler, rmContext);
    ClientRMService rmService = new ClientRMService(rmContext, yarnScheduler,
        null, null, null);
    GetQueueInfoRequest request = recordFactory
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.