use of com.dtstack.taier.develop.vo.console.ConsoleJobVO in project Taier by DTStack.
the class ConsoleService method searchJob.
public ConsoleJobVO searchJob(String jobName) {
String jobId = null;
ScheduleJob scheduleJob = scheduleJobMapper.getByName(jobName);
if (scheduleJob != null) {
jobId = scheduleJob.getJobId();
}
if (jobId == null) {
return null;
}
ScheduleEngineJobCache engineJobCache = scheduleEngineJobCacheMapper.getOne(jobId);
if (engineJobCache == null) {
return null;
}
try {
ParamAction paramAction = PublicUtil.jsonStrToObject(engineJobCache.getJobInfo(), ParamAction.class);
Tenant tenant = tenantMapper.selectById(scheduleJob.getTenantId());
ConsoleJobInfoVO consoleJobInfoVO = this.fillJobInfo(paramAction, scheduleJob, engineJobCache, tenant);
ConsoleJobVO vo = new ConsoleJobVO();
vo.setTheJob(consoleJobInfoVO);
vo.setNodeAddress(engineJobCache.getNodeAddress());
vo.setTheJobIdx(1);
return vo;
} catch (Exception e) {
LOGGER.error("searchJob error:", e);
}
return null;
}
Aggregations