@Test public void steps() throws Exception { final StepExecutionsMojo mojo = mojo(StepExecutionsMojo.class); final long id = mojo.getOrCreateOperator().start("simple", new Properties() {{ setProperty("a", "b"); }}); waitForEnd(mojo.getOrCreateOperator(), id); mojo.executionId = id; mojo.execute(); final String output = BatchEEMojoTestFactory.output(mojo).toLowerCase(Locale.ENGLISH); assertTrue(output.contains("step executions for job execution #0:")); assertTrue(output.contains("step = simple-batchlet")); assertTrue(output.contains("batch status = completed")); assertTrue(output.contains("read = 0")); }
@Override public void execute() throws MojoExecutionException, MojoFailureException { final List<StepExecution> executions = getOrCreateOperator().getStepExecutions(executionId); getLog().info("Step executions for job execution #" + executionId + ":"); for (final StepExecution exec : executions) { getLog().info(" - id = " + exec.getStepExecutionId()); getLog().info(" + step = " + exec.getStepName()); getLog().info(" + batch status = " + exec.getBatchStatus()); getLog().info(" + exit status = " + exec.getExitStatus()); getLog().info(" + start time = " + exec.getStartTime()); getLog().info(" + end time = " + exec.getEndTime()); getLog().info(" + metrics"); if (exec.getMetrics() != null) { for (final Metric m : exec.getMetrics()) { getLog().info(" > " + m.getType().name().replace("COUNT", "").replace("_", " ").toLowerCase(Locale.ENGLISH) + " = " + m.getValue()); } } } }
StepExecutionsMojo extends BatchEEMojoBase { @Override public void execute() throws MojoExecutionException, MojoFailureException { final List<StepExecution> executions = getOrCreateOperator().getStepExecutions(executionId); getLog().info("Step executions for job execution #" + executionId + ":"); for (final StepExecution exec : executions) { getLog().info(" - id = " + exec.getStepExecutionId()); getLog().info(" + step = " + exec.getStepName()); getLog().info(" + batch status = " + exec.getBatchStatus()); getLog().info(" + exit status = " + exec.getExitStatus()); getLog().info(" + start time = " + exec.getStartTime()); getLog().info(" + end time = " + exec.getEndTime()); getLog().info(" + metrics"); if (exec.getMetrics() != null) { for (final Metric m : exec.getMetrics()) { getLog().info(" > " + m.getType().name().replace("COUNT", "").replace("_", " ").toLowerCase(Locale.ENGLISH) + " = " + m.getValue()); } } } } }
StepExecutionsMojo extends BatchEEMojoBase { @Override public void execute() throws MojoExecutionException, MojoFailureException { final List<StepExecution> executions = getOrCreateOperator().getStepExecutions(executionId); getLog().info("Step executions for job execution #" + executionId + ":"); for (final StepExecution exec : executions) { getLog().info(" - id = " + exec.getStepExecutionId()); getLog().info(" + step = " + exec.getStepName()); getLog().info(" + batch status = " + exec.getBatchStatus()); getLog().info(" + exit status = " + exec.getExitStatus()); getLog().info(" + start time = " + exec.getStartTime()); getLog().info(" + end time = " + exec.getEndTime()); getLog().info(" + metrics"); if (exec.getMetrics() != null) { for (final Metric m : exec.getMetrics()) { getLog().info(" > " + m.getType().name().replace("COUNT", "").replace("_", " ").toLowerCase(Locale.ENGLISH) + " = " + m.getValue()); } } } }  }
StepExecutionsMojo extends BatchEEMojoBase { @Override public void execute() throws MojoExecutionException, MojoFailureException { final List<StepExecution> executions = getOrCreateOperator().getStepExecutions(executionId); getLog().info("Step executions for job execution #" + executionId + ":"); for (final StepExecution exec : executions) { getLog().info(" - id = " + exec.getStepExecutionId()); getLog().info(" + step = " + exec.getStepName()); getLog().info(" + batch status = " + exec.getBatchStatus()); getLog().info(" + exit status = " + exec.getExitStatus()); getLog().info(" + start time = " + exec.getStartTime()); getLog().info(" + end time = " + exec.getEndTime()); getLog().info(" + metrics"); if (exec.getMetrics() != null) { for (final Metric m : exec.getMetrics()) { getLog().info(" > " + m.getType().name().replace("COUNT", "").replace("_", " ").toLowerCase(Locale.ENGLISH) + " = " + m.getValue()); } } } }  @Override void execute(); }
StepExecutionsMojo extends BatchEEMojoBase { @Override public void execute() throws MojoExecutionException, MojoFailureException { final List<StepExecution> executions = getOrCreateOperator().getStepExecutions(executionId); getLog().info("Step executions for job execution #" + executionId + ":"); for (final StepExecution exec : executions) { getLog().info(" - id = " + exec.getStepExecutionId()); getLog().info(" + step = " + exec.getStepName()); getLog().info(" + batch status = " + exec.getBatchStatus()); getLog().info(" + exit status = " + exec.getExitStatus()); getLog().info(" + start time = " + exec.getStartTime()); getLog().info(" + end time = " + exec.getEndTime()); getLog().info(" + metrics"); if (exec.getMetrics() != null) { for (final Metric m : exec.getMetrics()) { getLog().info(" > " + m.getType().name().replace("COUNT", "").replace("_", " ").toLowerCase(Locale.ENGLISH) + " = " + m.getValue()); } } } }  @Override void execute();  }