Examples of startContainer()


Examples of org.apache.hadoop.yarn.api.ContainerManager.startContainer()

        StartContainerRequest request = Records.newRecord(StartContainerRequest.class);
        request.setContainerLaunchContext(context);

        //Calling startContainer with an expired token.
        try {
          client.startContainer(request);
          fail("Connection initiation with expired "
              + "token is expected to fail.");
        } catch (Throwable t) {
          LOG.info("Got exception : ", t);
          Assert.assertTrue(t.getMessage().contains(
View Full Code Here

Examples of org.apache.hadoop.yarn.api.ContainerManager.startContainer()

        .thenReturn(EventType.CONTAINER_REMOTE_LAUNCH);
      when(mockLaunchEvent.getContainerID())
        .thenReturn(contId);
      when(mockLaunchEvent.getTaskAttemptID()).thenReturn(taskAttemptId);
      when(mockLaunchEvent.getContainerMgrAddress()).thenReturn(cmAddress);
      when(mockCM.startContainer(any(StartContainerRequest.class))).thenReturn(startResp);
      ut.handle(mockLaunchEvent);
     
      ut.waitForPoolToIdle();
     
      verify(mockCM).startContainer(any(StartContainerRequest.class));
View Full Code Here

Examples of org.apache.hadoop.yarn.api.ContainerManager.startContainer()

        .thenReturn(EventType.CONTAINER_REMOTE_LAUNCH);
      when(mockLaunchEvent.getContainerID())
        .thenReturn(contId);
      when(mockLaunchEvent.getTaskAttemptID()).thenReturn(taskAttemptId);
      when(mockLaunchEvent.getContainerMgrAddress()).thenReturn(cmAddress);
      when(mockCM.startContainer(any(StartContainerRequest.class))).thenReturn(startResp);
      ut.handle(mockLaunchEvent);
     
      ut.waitForPoolToIdle();
     
      verify(mockCM, never()).startContainer(any(StartContainerRequest.class));
View Full Code Here

Examples of org.apache.hadoop.yarn.api.ContainerManager.startContainer()

        // Now launch the actual container
        StartContainerRequest startRequest = Records
          .newRecord(StartContainerRequest.class);
        startRequest.setContainerLaunchContext(containerLaunchContext);
        StartContainerResponse response = proxy.startContainer(startRequest);

        ByteBuffer portInfo = response
          .getServiceResponse(ShuffleHandler.MAPREDUCE_SHUFFLE_SERVICEID);
        int port = -1;
        if(portInfo != null) {
View Full Code Here

Examples of org.apache.hadoop.yarn.api.ContainerManager.startContainer()

        StartContainerRequest request = Records.newRecord(StartContainerRequest.class);
        request.setContainerLaunchContext(context);

        //Calling startContainer with an expired token.
        try {
          client.startContainer(request);
          fail("Connection initiation with expired "
              + "token is expected to fail.");
        } catch (Throwable t) {
          LOG.info("Got exception : ", t);
          Assert.assertTrue(t.getMessage().contains(
View Full Code Here

Examples of org.apache.hadoop.yarn.client.api.NMClient.startContainer()

  private NMClient mockNMClient(int mode)
      throws YarnException, IOException {
    NMClient client = mock(NMClient.class);
    switch (mode) {
      case 0:
        when(client.startContainer(any(Container.class),
            any(ContainerLaunchContext.class))).thenReturn(
                Collections.<String, ByteBuffer>emptyMap());
        when(client.getContainerStatus(any(ContainerId.class),
            any(NodeId.class))).thenReturn(
                recordFactory.newRecordInstance(ContainerStatus.class));
View Full Code Here

Examples of org.apache.hadoop.yarn.client.api.NMClient.startContainer()

            .getContainerStatus(any(ContainerId.class), any(NodeId.class));
        doThrow(RPCUtil.getRemoteException("Stop Exception")).when(client)
            .stopContainer(any(ContainerId.class), any(NodeId.class));
        break;
      case 2:
        when(client.startContainer(any(Container.class),
            any(ContainerLaunchContext.class))).thenReturn(
                Collections.<String, ByteBuffer>emptyMap());
        when(client.getContainerStatus(any(ContainerId.class),
            any(NodeId.class))).thenReturn(
                recordFactory.newRecordInstance(ContainerStatus.class));
View Full Code Here

Examples of org.apache.hadoop.yarn.client.api.NMClient.startContainer()

  private NMClient mockNMClient(int mode)
      throws YarnException, IOException {
    NMClient client = mock(NMClient.class);
    switch (mode) {
      case 0:
        when(client.startContainer(any(Container.class),
            any(ContainerLaunchContext.class))).thenReturn(
                Collections.<String, ByteBuffer>emptyMap());
        when(client.getContainerStatus(any(ContainerId.class),
            any(NodeId.class))).thenReturn(
                recordFactory.newRecordInstance(ContainerStatus.class));
View Full Code Here

Examples of org.apache.hadoop.yarn.client.api.NMClient.startContainer()

            .getContainerStatus(any(ContainerId.class), any(NodeId.class));
        doThrow(RPCUtil.getRemoteException("Stop Exception")).when(client)
            .stopContainer(any(ContainerId.class), any(NodeId.class));
        break;
      case 2:
        when(client.startContainer(any(Container.class),
            any(ContainerLaunchContext.class))).thenReturn(
                Collections.<String, ByteBuffer>emptyMap());
        when(client.getContainerStatus(any(ContainerId.class),
            any(NodeId.class))).thenReturn(
                recordFactory.newRecordInstance(ContainerStatus.class));
View Full Code Here

Examples of org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl.startContainer()

        .newRecord(Resource.class));
    containerLaunchContext.getResource().setMemory(1024);
    StartContainerRequest startRequest =
        Records.newRecord(StartContainerRequest.class);
    startRequest.setContainerLaunchContext(containerLaunchContext);
    containerManager.startContainer(startRequest);

    GetContainerStatusRequest request =
        Records.newRecord(GetContainerStatusRequest.class);
    request.setContainerId(cId);
    Container container =
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.