Package org.springframework.xd.rest.domain

Examples of org.springframework.xd.rest.domain.StepExecutionInfoResource


    return createResourceWithId(entity.getId(), entity, new Object[] { entity.getJobExecutionId() });
  }

  @Override
  protected StepExecutionInfoResource instantiateResource(StepExecutionInfo entity) {
    return new StepExecutionInfoResource(entity.getJobExecutionId(), entity.getStepExecution(), entity.getStepType());
  }
View Full Code Here


    Iterator<StepExecutionInfoResource> iter = stepExecutions.iterator();
    assertEquals(2, stepExecutions.size());
    boolean step1MasterFound = false;
    boolean step1MasterPartitionFound = false;
    while (iter.hasNext()) {
      StepExecutionInfoResource resource = iter.next();
      assertEquals(BatchStatus.COMPLETED, resource.getStepExecution().getStatus());
      assertEquals(ExitStatus.COMPLETED, resource.getStepExecution().getExitStatus());
      if (resource.getStepExecution().getStepName().equals("step1-master")) {
        step1MasterFound = true;
      }
      else if (resource.getStepExecution().getStepName().equals("step1-master:partition0")) {
        step1MasterPartitionFound = true;
      }
    }
    assertTrue("step1-master was not found in step execution list", step1MasterFound);
    assertTrue("step1-master:partition0 was not found in step execution list", step1MasterPartitionFound);
View Full Code Here

    final List<StepExecutionInfoResource> stepExecutionInfoResources = new ArrayList<>();

    final StepExecution stepExecution1 = new StepExecution("first step", new JobExecution(123L));
    final StepExecution stepExecution2 = new StepExecution("second step", new JobExecution(123L));

    final StepExecutionInfoResource executionInfoResource1 = new StepExecutionInfoResource(123L, stepExecution1, "stepType");
    final StepExecutionInfoResource executionInfoResource2 = new StepExecutionInfoResource(123L, stepExecution2, "stepType");

    stepExecutionInfoResources.add(executionInfoResource1);
    stepExecutionInfoResources.add(executionInfoResource2);

    final String stepExecutionInfoResourcesAsJson = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(
View Full Code Here

    stepExecution.setStartTime(startTime);
    stepExecution.setEndTime(endTime);
    stepExecution.setLastUpdated(lastUpdated);
    stepExecution.setStatus(BatchStatus.COMPLETED);
    stepExecution.setExitStatus(ExitStatus.COMPLETED.addExitDescription("We are done."));
    final StepExecutionInfoResource stepExecutionInfoResource = new StepExecutionInfoResource(444L, stepExecution,
        StepType.TASKLET_STEP.getDisplayName());

    final Table table = JobCommandsUtils.prepareStepExecutionTable(stepExecutionInfoResource, TimeZone.getDefault());

    assertEquals("Step Execution Id", table.getRows().get(0).getValue(1));
View Full Code Here

  }

  @Test
  public void testPrepareStepExecutionTableWithNullStepExecution() {

    final StepExecutionInfoResource stepExecutionInfoResource = new StepExecutionInfoResource();

    final Table table = JobCommandsUtils.prepareStepExecutionTable(stepExecutionInfoResource, TimeZone.getDefault());

    assertEquals("Step Execution Id", table.getRows().get(0).getValue(1));
    assertEquals("N/A", table.getRows().get(0).getValue(2));
View Full Code Here

    stepExecution.setStartTime(startTime);
    stepExecution.setEndTime(endTime);
    stepExecution.setLastUpdated(lastUpdated);
    stepExecution.setStatus(BatchStatus.COMPLETED);
    stepExecution.setExitStatus(ExitStatus.COMPLETED);
    final StepExecutionInfoResource stepExecutionInfoResource = new StepExecutionInfoResource(444L, stepExecution,
        StepType.TASKLET_STEP.getDisplayName());

    final Table table = JobCommandsUtils.prepareStepExecutionTable(stepExecutionInfoResource, TimeZone.getDefault());

    assertEquals("Exit Description", table.getRows().get(17).getValue(1));
View Full Code Here

  @Override
  public StepExecutionInfoResource displayStepExecution(long jobExecutionId, long stepExecutionId) {
    String uriTemplate = resources.get("jobs/executions").toString()
        + "/{jobExecutionId}/steps/{stepExecutionId}";
    final StepExecutionInfoResource stepExecutionInfoResource = restTemplate.getForObject(uriTemplate,
        StepExecutionInfoResource.class, jobExecutionId, stepExecutionId);
    return stepExecutionInfoResource;
  }
View Full Code Here

  @CliCommand(value = DISPLAY_STEP_EXECUTION, help = "Display the details of a Step Execution")
  public Table displayStepExecution(
      @CliOption(mandatory = true, key = { "", "id" }, help = "the id of the step execution") long stepExecutionId,
      @CliOption(mandatory = true, key = { "jobExecutionId" }, help = "the job execution id") long jobExecutionId) {
    final StepExecutionInfoResource stepExecutionInfoResource = jobOperations().displayStepExecution(
        jobExecutionId,
        stepExecutionId);

    final Table stepExecutionTable = JobCommandsUtils.prepareStepExecutionTable(stepExecutionInfoResource,
        this.configuration.getClientTimeZone());
View Full Code Here

TOP

Related Classes of org.springframework.xd.rest.domain.StepExecutionInfoResource

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.