Examples of StepExecution


Examples of javax.batch.runtime.StepExecution

    assertEquals(ExitStatus.FAILED.getExitCode(), jobExecution.getExitStatus());

    JobOperator jobOperator = BatchRuntime.getJobOperator();
    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(jobExecution.getExecutionId());
    assertEquals(1, stepExecutions.size());
    StepExecution failedStep = stepExecutions.get(0);
    assertTrue("step1".equals(failedStep.getStepName()));
  }
View Full Code Here

Examples of org.jenkinsci.plugins.workflow.steps.StepExecution

        Step s;
        boolean sync;
        try {
            d.checkContextAvailability(context);
            s = d.newInstance(ps.namedArgs);
            StepExecution e = s.start(context);
            thread.setStep(e);
            sync = e.start();
        } catch (Exception e) {
            if (e instanceof MissingContextVariableException)
                reportMissingContextVariableException(context, (MissingContextVariableException)e);
            context.onFailure(e);
            s = null;
View Full Code Here

Examples of org.springframework.batch.core.StepExecution

        @Override
        public BaseObject preRequest(BaseObject baseObject) {
          if(baseObject.getType().equals("PartitionedStepExecutionStatusReq")) {
            StepExecutionType stepExecutionType = ((PartitionedStepExecutionStatusReq)baseObject).stepExecution;
            StepExecution convertStepExecution = JobRepositoryRpcFactory.convertStepExecutionType(stepExecutionType);
            getStepExecutions().add(convertStepExecution);
            return null;
          } else {
            return baseObject;
          }
View Full Code Here

Examples of org.springframework.batch.core.StepExecution

  protected void onContainerAllocated(Container container) {
    if (log.isDebugEnabled()) {
      log.debug("Container allocated: " + container);
    }

    StepExecution stepExecution = null;

    String host = container.getNodeId().getHost();
    String rack = RackResolver.resolve(host).getNetworkLocation();
    if (log.isDebugEnabled()) {
      log.debug("Matching against host=" + host + " rack=" + rack);
View Full Code Here

Examples of org.springframework.batch.core.StepExecution

  protected void onContainerCompleted(ContainerStatus status) {
    super.onContainerCompleted(status);

    // find assigned container for step execution
    ContainerId containerId = status.getContainerId();
    StepExecution stepExecution = containerToStepMap.get(containerId);

    if (stepExecution != null) {
      for (Entry<StepExecution, Set<StepExecution>> entry : masterExecutions.entrySet()) {
        Set<StepExecution> set = entry.getValue();
        if (set.remove(stepExecution)) {
View Full Code Here

Examples of org.springframework.batch.core.StepExecution

    if(log.isDebugEnabled()) {
      log.debug("Intercept launch context: " + context);
    }

    StepExecution stepExecution = containerToStepMap.get(container.getId());
    String jobName = remoteStepNames.get(stepExecution);

    if(service != null) {
      int port = service.getPort();
      String address = service.getHost();
      Map<String, String> env = new HashMap<String, String>(context.getEnvironment());
      env.put(YarnSystemConstants.FS_ADDRESS, getConfiguration().get(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY));
      env.put(YarnSystemConstants.AMSERVICE_PORT, Integer.toString(port));
      env.put(YarnSystemConstants.AMSERVICE_HOST, address);
      env.put(YarnSystemConstants.AMSERVICE_BATCH_STEPNAME, jobName);
      env.put(YarnSystemConstants.AMSERVICE_BATCH_STEPNAME, jobName);
      env.put(YarnSystemConstants.AMSERVICE_BATCH_STEPEXECUTIONNAME, stepExecution.getStepName());
      env.put(YarnSystemConstants.AMSERVICE_BATCH_JOBEXECUTIONID, Long.toString(stepExecution.getJobExecutionId()));
      env.put(YarnSystemConstants.AMSERVICE_BATCH_STEPEXECUTIONID, Long.toString(stepExecution.getId()));
      context.setEnvironment(env);
      return context;
    } else {
      return context;
    }
View Full Code Here

Examples of org.springframework.batch.core.StepExecution

    return responseObj;
  }

  private BaseResponseObject handleGetStepExecutionReq(GetStepExecutionReq request) {
    GetStepExecutionRes response = new GetStepExecutionRes();
    StepExecution stepExecution = jobExplorer.getStepExecution(request.jobExecutionId, request.stepExecutionId);
    response.stepExecution = JobRepositoryRpcFactory.convertStepExecutionType(stepExecution);
    return response;
  }
View Full Code Here

Examples of org.springframework.batch.core.StepExecution

    return response;
  }

  private BaseResponseObject handleAddWithStepExecutionReq(AddWithStepExecutionReq request) {
    AddWithStepExecutionRes response = null;
    StepExecution stepExecution = JobRepositoryRpcFactory.convertStepExecutionType(request.stepExecution);
    jobRepository.add(stepExecution);
    response = new AddWithStepExecutionRes();
    response.id = stepExecution.getId();
    response.version = stepExecution.getVersion();
    return response;
  }
View Full Code Here

Examples of org.springframework.batch.core.StepExecution

  }

  private BaseResponseObject handleGetLastStepExecutionReq(GetLastStepExecutionReq request) {
    GetLastStepExecutionRes response = null;
    JobInstance jobInstance = JobRepositoryRpcFactory.convertJobInstanceType(request.jobInstance);
    StepExecution lastStepExecution = jobRepository.getLastStepExecution(jobInstance, request.stepName);
    response = new GetLastStepExecutionRes();
    response.stepExecution = JobRepositoryRpcFactory.convertStepExecutionType(lastStepExecution);
    return response;
  }
View Full Code Here

Examples of org.springframework.batch.core.StepExecution

    return response;
  }

  private BaseResponseObject handleUpdateWithStepExecutionReq(UpdateWithStepExecutionReq request) {
    UpdateWithStepExecutionRes response = null;
    StepExecution stepExecution = JobRepositoryRpcFactory.convertStepExecutionType(request.stepExecution);
    jobRepository.update(stepExecution);
    response = new UpdateWithStepExecutionRes();
    response.id = stepExecution.getId();
    response.version = stepExecution.getVersion();
    return response;
  }
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.