Package org.apache.hadoop.yarn.api.protocolrecords

Examples of org.apache.hadoop.yarn.api.protocolrecords.StartContainerResponse


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

      ByteBuffer portInfo = response
          .getServiceResponse(PullServerAuxService.PULLSERVER_SERVICEID);

      if(portInfo != null) {
        port = PullServerAuxService.deserializeMetaData(portInfo);
      }
View Full Code Here


      LOG.debug("startContainer:" + " node=" + containerManagerAddress
        + " application=" + applicationId + " container=" + container
        + " available=" + available + " used=" + used);
    }

    StartContainerResponse response = recordFactory.newRecordInstance(StartContainerResponse.class);
    return response;
  }
View Full Code Here

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

        // container started properly. Stop the timer
        timerTask.cancel();
        if (Thread.interrupted()) {
          // The timer canceled the command in the mean while, but
          // startContainer didn't throw exception
          String message = "Container launch failed for " + containerID
              + " : Start-container for " + event.getContainerID()
              + " got interrupted. Returning.";
          this.state = ContainerState.FAILED;
          sendContainerLaunchFailedMsg(taskAttemptID, message);
          return;
        }

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

    NMAuditLogger.logSuccess(launchContext.getUser(),
        AuditConstants.START_CONTAINER, "ContainerManageImpl",
        applicationID, containerID);

    StartContainerResponse response =
        recordFactory.newRecordInstance(StartContainerResponse.class);
    response.addAllServiceResponse(auxiliaryServices.getMeta());
    // TODO launchedContainer misplaced -> doesn't necessarily mean a container
    // launch. A finished Application will not launch containers.
    metrics.launchedContainer();
    metrics.allocateContainer(launchContext.getResource());
    return response;
View Full Code Here

    @Override
    public StartContainerResponse startContainer(StartContainerRequest request)
        throws YarnRemoteException {
      ContainerLaunchContext container = request.getContainerLaunchContext();
      StartContainerResponse response =
          recordFactory.newRecordInstance(StartContainerResponse.class);
      status = recordFactory.newRecordInstance(ContainerStatus.class);
      status.setState(ContainerState.RUNNING);
      status.setContainerId(container.getContainerId());
      status.setExitStatus(0);
View Full Code Here

    NMAuditLogger.logSuccess(launchContext.getUser(),
        AuditConstants.START_CONTAINER, "ContainerManageImpl",
        applicationID, containerID);

    StartContainerResponse response =
        recordFactory.newRecordInstance(StartContainerResponse.class);
    response.addAllServiceResponse(auxiliaryServices.getMeta());
    // TODO launchedContainer misplaced -> doesn't necessarily mean a container
    // launch. A finished Application will not launch containers.
    metrics.launchedContainer();
    metrics.allocateContainer(launchContext.getResource());
    return response;
View Full Code Here

      LOG.debug("startContainer:" + " node=" + containerManagerAddress
        + " application=" + applicationId + " container=" + container
        + " available=" + available + " used=" + used);
    }

    StartContainerResponse response = recordFactory.newRecordInstance(StartContainerResponse.class);
    return response;
  }
View Full Code Here

  @Override
  public StartContainerResponseProto startContainer(RpcController arg0,
      StartContainerRequestProto proto) throws ServiceException {
    StartContainerRequestPBImpl request = new StartContainerRequestPBImpl(proto);
    try {
      StartContainerResponse response = real.startContainer(request);
      return ((StartContainerResponsePBImpl)response).getProto();
    } catch (YarnRemoteException e) {
      throw new ServiceException(e);
    }
  }
View Full Code Here

    @Override
    public StartContainerResponse startContainer(StartContainerRequest request)
        throws YarnRemoteException {
      ContainerLaunchContext container = request.getContainerLaunchContext();
      StartContainerResponse response = recordFactory
          .newRecordInstance(StartContainerResponse.class);
      status = recordFactory.newRecordInstance(ContainerStatus.class);
          try {
        // make the thread sleep to look like its not going to respond
        Thread.sleep(15000);
View Full Code Here

    ut.start();
    try {
      ContainerId contId = makeContainerId(0l, 0, 0, 1);
      TaskAttemptId taskAttemptId = makeTaskAttemptId(0l, 0, 0, TaskType.MAP, 0);
      String cmAddress = "127.0.0.1:8000";
      StartContainerResponse startResp =
        recordFactory.newRecordInstance(StartContainerResponse.class);
      startResp.setServiceResponse(ShuffleHandler.MAPREDUCE_SHUFFLE_SERVICEID,
          ShuffleHandler.serializeMetaData(80));
     

      LOG.info("inserting launch event");
      ContainerRemoteLaunchEvent mockLaunchEvent =
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.api.protocolrecords.StartContainerResponse

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.