Examples of MindAppmasterServiceClient


Examples of org.springframework.yarn.integration.ip.mind.MindAppmasterServiceClient

    if(log.isDebugEnabled()) {
      log.info("Finished remote step stepExecution=[" + stepExecution + "]");
    }

    MindAppmasterServiceClient client = (MindAppmasterServiceClient) getIntegrationServiceClient();
    PartitionedStepExecutionStatusReq req = new PartitionedStepExecutionStatusReq();
    req.stepExecution = JobRepositoryRpcFactory.convertStepExecutionType(stepExecution);
    BaseResponseObject doMindRequest = client.doMindRequest(req);
    log.info("got response for status update: " + doMindRequest);
  }
View Full Code Here

Examples of org.springframework.yarn.integration.ip.mind.MindAppmasterServiceClient

  private final static Log log = LogFactory.getLog(CustomContainer.class);

  @Override
  protected void runInternal() {
    MindAppmasterServiceClient client = (MindAppmasterServiceClient) getIntegrationServiceClient();
    Random random = new Random();
    Long job = null;
    boolean die = false;

    // run loop, we exit if appmaster asks or randomly
    // in approximately once every 10 runs
    do {
      JobRequest request = new JobRequest();
      if(job == null) {
        request.setState(JobRequest.State.WHATTODO);
      } else {
        // we send job failed message approximately once in 4 runs
        request.setState(random.nextInt(4) == 0 ? JobRequest.State.JOBFAILED : JobRequest.State.JOBDONE);
        request.job = job;
      }
      JobResponse response = (JobResponse) client.doMindRequest(request);
      if (response == null) {
        die = true;
        break;
      }
      log.info("Response state=" + response.getState());
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.