@CliCommand(value = STEP_EXECUTION_PROGRESS, help = "Display the details of a specific step progress") public Table stepProgressDisplay( @CliOption(key = { "id" }, help = "the step execution id", mandatory = true) long id, @CliOption(key = { "jobExecutionId" }, help = "the job execution id", mandatory = true) long jobExecutionId) { StepExecutionProgressInfoResource progressInfoResource = jobOperations().stepExecutionProgress(jobExecutionId, id); TableModelBuilder<Object> modelBuilder = new TableModelBuilder<>(); modelBuilder.addRow().addValue("ID ").addValue("Step Name ").addValue("Complete ").addValue("Duration "); modelBuilder.addRow().addValue(progressInfoResource.getStepExecution().getId()) .addValue(progressInfoResource.getStepExecution().getStepName()) .addValue(progressInfoResource.getPercentageComplete() * 100 + "%") .addValue(progressInfoResource.getDuration() + " ms"); TableBuilder builder = new TableBuilder(modelBuilder.build()); DataFlowTables.applyStyle(builder); return builder.build(); }
@CliCommand(value = STEP_EXECUTION_PROGRESS, help = "Display the details of a specific step progress") public Table stepProgressDisplay( @CliOption(key = { "id" }, help = "the step execution id", mandatory = true) long id, @CliOption(key = { "jobExecutionId" }, help = "the job execution id", mandatory = true) long jobExecutionId) { StepExecutionProgressInfoResource progressInfoResource = jobOperations().stepExecutionProgress(jobExecutionId, id); TableModelBuilder<Object> modelBuilder = new TableModelBuilder<>(); modelBuilder.addRow().addValue("ID ").addValue("Step Name ").addValue("Complete ").addValue("Duration "); modelBuilder.addRow().addValue(progressInfoResource.getStepExecution().getId()) .addValue(progressInfoResource.getStepExecution().getStepName()) .addValue(progressInfoResource.getPercentageComplete() * 100 + "%") .addValue(progressInfoResource.getDuration() + " ms"); TableBuilder builder = new TableBuilder(modelBuilder.build()); DataFlowTables.applyStyle(builder); return builder.build(); }
"jobExecutionId" }, help = "the job execution id", mandatory = true) long jobExecutionId) { StepExecutionProgressInfoResource progressInfoResource = jobOperations().stepExecutionProgress(jobExecutionId, id);
"jobExecutionId" }, help = "the job execution id", mandatory = true) long jobExecutionId) { StepExecutionProgressInfoResource progressInfoResource = jobOperations().stepExecutionProgress(jobExecutionId, id);