Skip to content

Best to distinguish CreateTime and StartTime in StepExecution #4049

Closed
@lcmarvin

Description

@lcmarvin

I need to record create time of StepExecution, but I found it only has a filed startTime, though this field has been assigned value when StepExecution is created.

private volatile Date startTime = new Date(System.currentTimeMillis());

But its value will be updated when StepExecution gets started in AbstractStep.

stepExecution.setStartTime(new Date());
stepExecution.setStatus(BatchStatus.STARTED);

So, maybe an individual createTime field is more suitable, just like what it is in JobExecution.

private volatile Date startTime = null;
private volatile Date createTime = new Date(System.currentTimeMillis());

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions