feat: add job parameters info into fetching job instance detail api

This commit is contained in:
Echo009 2021-02-26 11:32:03 +08:00
parent 539d31007c
commit ef384b5574
3 changed files with 84 additions and 24 deletions

View File

@ -40,6 +40,10 @@ public class InstanceDetail implements OmsSerializable {
* Task tracker address.
*/
private String taskTrackerAddress;
/**
* 任务参数
*/
private String jobParams;
/**
* Param string that is passed to an instance when it is initialized.
*/

View File

@ -14,34 +14,62 @@ import java.util.Date;
@Data
public class InstanceInfoDTO {
// 任务ID
/**
* 任务ID
*/
private Long jobId;
// 任务所属应用的ID冗余提高查询效率
/**
* 任务所属应用的ID冗余提高查询效率
*/
private Long appId;
// 任务实例ID
/**
* 任务实例ID
*/
private Long instanceId;
// 工作流实例ID
/**
* 工作流实例ID
*/
private Long wfInstanceId;
// 任务实例参数
/**
* 任务参数
*/
private String jobParams;
/**
* 任务实例参数
*/
private String instanceParams;
/**
* 任务状态 {@link InstanceStatus}
*/
private int status;
// 该任务实例的类型普通/工作流InstanceType
/**
* 该任务实例的类型普通/工作流InstanceType
*/
private Integer type;
// 执行结果
/**
* 执行结果
*/
private String result;
// 预计触发时间
/**
* 预计触发时间
*/
private Long expectedTriggerTime;
// 实际触发时间
/**
* 实际触发时间
*/
private Long actualTriggerTime;
// 结束时间
/**
* 结束时间
*/
private Long finishedTime;
// TaskTracker地址
/**
* TaskTracker地址
*/
private String taskTrackerAddress;
// 总共执行的次数用于重试判断
/**
* 总共执行的次数用于重试判断
*/
private Long runningTimes;
private Date gmtCreate;

View File

@ -22,30 +22,56 @@ import java.util.List;
@NoArgsConstructor
public class InstanceDetailVO {
// 任务预计执行时间
/**
* 任务预计执行时间
*/
private String expectedTriggerTime;
// 任务整体开始时间
/**
* 任务整体开始时间
*/
private String actualTriggerTime;
// 任务整体结束时间可能不存在
/**
* 任务整体结束时间可能不存在
*/
private String finishedTime;
// 任务状态
/**
* 任务状态
*/
private Integer status;
// 任务执行结果可能不存在
/**
* 任务执行结果可能不存在
*/
private String result;
// TaskTracker地址
/**
* TaskTracker地址
*/
private String taskTrackerAddress;
// 启动参数
/**
* 任务参数
*/
private String jobParams;
/**
* 启动参数
*/
private String instanceParams;
// MR或BD任务专用
/**
* MR或BD任务专用
*/
private InstanceDetailVO.TaskDetail taskDetail;
// 秒级任务专用
/**
* 秒级任务专用
*/
private List<InstanceDetailVO.SubInstanceDetail> subInstanceDetails;
// 重试次数
/**
* 重试次数
*/
private Long runningTimes;
// 秒级任务的 extra -> List<SubInstanceDetail>
/**
* 秒级任务的 extra -> List<SubInstanceDetail>
*/
@Data
@NoArgsConstructor
public static class SubInstanceDetail implements OmsSerializable {
@ -56,7 +82,9 @@ public class InstanceDetailVO {
private int status;
}
// MapReduce Broadcast 任务的 extra ->
/**
* MapReduce Broadcast 任务的 extra ->
*/
@Data
@NoArgsConstructor
public static class TaskDetail implements OmsSerializable {