use of org.apache.gobblin.rest.TaskExecutionInfo in project incubator-gobblin by apache.
the class DatabaseJobHistoryStoreTest method testUpdate.
@Test(dependsOnMethods = { "testInsert" })
public void testUpdate() throws IOException {
for (JobExecutionInfo jobExecutionInfo : this.expectedJobExecutionInfos) {
jobExecutionInfo.setEndTime(System.currentTimeMillis());
jobExecutionInfo.setDuration(jobExecutionInfo.getEndTime() - jobExecutionInfo.getStartTime());
jobExecutionInfo.setState(JobStateEnum.COMMITTED);
jobExecutionInfo.setCompletedTasks(jobExecutionInfo.getLaunchedTasks());
for (TaskExecutionInfo taskExecutionInfo : jobExecutionInfo.getTaskExecutions()) {
taskExecutionInfo.setEndTime(jobExecutionInfo.getEndTime());
taskExecutionInfo.setDuration(taskExecutionInfo.getEndTime() - taskExecutionInfo.getStartTime());
taskExecutionInfo.setState(TaskStateEnum.COMMITTED);
}
this.jobHistoryStore.put(jobExecutionInfo);
}
}
Aggregations