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

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


    for (Container c : appContainers) {
      if (c.getId().equals(containerId)) {
        container = c;
      }
    }
    GetContainerStatusResponse response =
        recordFactory.newRecordInstance(GetContainerStatusResponse.class);
    if (container != null && container.getContainerStatus() != null) {
      response.setStatus(container.getContainerStatus());
    }
    return response;
  }
View Full Code Here


    LOG.info("Getting container-status for " + containerIDStr);
    Container container = this.context.getContainers().get(containerID);
    if (container != null) {
      ContainerStatus containerStatus = container.cloneAndGetContainerStatus();
      LOG.info("Returning " + containerStatus);
      GetContainerStatusResponse response = recordFactory
          .newRecordInstance(GetContainerStatusResponse.class);
      response.setStatus(containerStatus);
      return response;
    }

    throw RPCUtil.getRemoteException("Container " + containerIDStr
        + " is not handled by this NodeManager");
View Full Code Here

    proxy.startContainer(scRequest);
   
    GetContainerStatusRequest gcsRequest =
        recordFactory.newRecordInstance(GetContainerStatusRequest.class);
    gcsRequest.setContainerId(containerLaunchContext.getContainerId());
    GetContainerStatusResponse response =  proxy.getContainerStatus(gcsRequest);
    ContainerStatus status = response.getStatus();
   
    //test remote exception
    boolean exception = false;
    try {
      StopContainerRequest stopRequest = recordFactory.newRecordInstance(StopContainerRequest.class);
View Full Code Here

   
    @Override
    public GetContainerStatusResponse getContainerStatus(
        GetContainerStatusRequest request)
    throws YarnRemoteException {
      GetContainerStatusResponse response =
          recordFactory.newRecordInstance(GetContainerStatusResponse.class);
      response.setStatus(status);
      return response;
    }
View Full Code Here

    LOG.info("Getting container-status for " + containerIDStr);
    Container container = this.context.getContainers().get(containerID);
    if (container != null) {
      ContainerStatus containerStatus = container.cloneAndGetContainerStatus();
      LOG.info("Returning " + containerStatus);
      GetContainerStatusResponse response = recordFactory
          .newRecordInstance(GetContainerStatusResponse.class);
      response.setStatus(containerStatus);
      return response;
    }

    throw RPCUtil.getRemoteException("Container " + containerIDStr
        + " is not handled by this NodeManager");
View Full Code Here

    for (Container c : appContainers) {
      if (c.getId().equals(containerId)) {
        container = c;
      }
    }
    GetContainerStatusResponse response =
        recordFactory.newRecordInstance(GetContainerStatusResponse.class);
    if (container != null && container.getContainerStatus() != null) {
      response.setStatus(container.getContainerStatus());
    }
    return response;
  }
View Full Code Here

  @Override
  public GetContainerStatusResponseProto getContainerStatus(RpcController arg0,
      GetContainerStatusRequestProto proto) throws ServiceException {
    GetContainerStatusRequestPBImpl request = new GetContainerStatusRequestPBImpl(proto);
    try {
      GetContainerStatusResponse response = real.getContainerStatus(request);
      return ((GetContainerStatusResponsePBImpl)response).getProto();
    } catch (YarnRemoteException e) {
      throw new ServiceException(e);
    }
  }
View Full Code Here

    private ContainerStatus status = null;

    @Override
    public GetContainerStatusResponse getContainerStatus(
        GetContainerStatusRequest request) throws YarnRemoteException {
      GetContainerStatusResponse response = recordFactory
          .newRecordInstance(GetContainerStatusResponse.class);
      response.setStatus(status);
      return response;
    }
View Full Code Here

    LOG.info("Getting container-status for " + containerIDStr);
    Container container = this.context.getContainers().get(containerID);
    if (container != null) {
      ContainerStatus containerStatus = container.cloneAndGetContainerStatus();
      LOG.info("Returning " + containerStatus);
      GetContainerStatusResponse response = recordFactory
          .newRecordInstance(GetContainerStatusResponse.class);
      response.setStatus(containerStatus);
      return response;
    }

    throw RPCUtil.getRemoteException("Container " + containerIDStr
        + " is not handled by this NodeManager");
View Full Code Here

    LOG.info("Getting container-status for " + containerID);
    Container container = this.context.getContainers().get(containerID);
    if (container != null) {
      ContainerStatus containerStatus = container.cloneAndGetContainerStatus();
      LOG.info("Returning " + containerStatus);
      GetContainerStatusResponse response = recordFactory
          .newRecordInstance(GetContainerStatusResponse.class);
      response.setStatus(containerStatus);
      return response;
    }

    throw RPCUtil.getRemoteException("Container " + containerID
        + " is not handled by this NodeManager");
View Full Code Here

TOP

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

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.