use of com.thinkbiganalytics.jobrepo.query.model.DefaultExecutedStep in project kylo by Teradata.
the class JobModelTransform method executedStep.
public static ExecutedStep executedStep(BatchStepExecution stepExecution) {
DefaultExecutedStep step = new DefaultExecutedStep();
NifiEventStepExecution nifiEventStepExecution = stepExecution.getNifiEventStepExecution();
if (nifiEventStepExecution != null) {
step.setNifiEventId(nifiEventStepExecution.getEventId());
}
step.setRunning(!stepExecution.isFinished());
step.setStartTime(stepExecution.getStartTime());
step.setEndTime(stepExecution.getEndTime());
step.setLastUpdateTime(stepExecution.getLastUpdated());
step.setVersion(stepExecution.getVersion().intValue());
step.setStepName(stepExecution.getStepName());
step.setExitDescription(stepExecution.getExitMessage());
step.setExitCode(stepExecution.getExitCode().name());
step.setId(stepExecution.getStepExecutionId());
step.setTimeSinceEndTime(ModelUtils.timeSince(stepExecution.getStartTime(), stepExecution.getEndTime()));
step.setRunTime(ModelUtils.runTime(stepExecution.getStartTime(), stepExecution.getEndTime()));
Map<String, String> stepExecutionContext = stepExecution.getStepExecutionContextAsMap();
if (stepExecutionContext != null) {
step.setExecutionContext(new HashMap<>(stepExecutionContext));
}
return step;
}
Aggregations