Examples of ClientRMProtocol


Examples of org.apache.hadoop.yarn.api.ClientRMProtocol

  /**
   * Tests that getRootQueues makes a request for the (recursive) child queues
   */
  @Test
  public void testGetRootQueues() throws IOException, InterruptedException {
    ClientRMProtocol applicationsManager = Mockito.mock(ClientRMProtocol.class);
    GetQueueInfoResponse response = Mockito.mock(GetQueueInfoResponse.class);
    org.apache.hadoop.yarn.api.records.QueueInfo queueInfo =
      Mockito.mock(org.apache.hadoop.yarn.api.records.QueueInfo.class);
    Mockito.when(response.getQueueInfo()).thenReturn(queueInfo);
    Mockito.when(applicationsManager.getQueueInfo(Mockito.any(
      GetQueueInfoRequest.class))).thenReturn(response);

    ResourceMgrDelegate delegate = new ResourceMgrDelegate(
      new YarnConfiguration(), applicationsManager);
    delegate.getRootQueues();
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.