Search in sources :

Example 1 with ConsoleJobVO

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;
}
Also used : ParamAction(com.dtstack.taier.pluginapi.pojo.ParamAction) ConsoleJobVO(com.dtstack.taier.develop.vo.console.ConsoleJobVO) ConsoleJobInfoVO(com.dtstack.taier.develop.vo.console.ConsoleJobInfoVO) RdosDefineException(com.dtstack.taier.common.exception.RdosDefineException)

Aggregations

RdosDefineException (com.dtstack.taier.common.exception.RdosDefineException)1 ConsoleJobInfoVO (com.dtstack.taier.develop.vo.console.ConsoleJobInfoVO)1 ConsoleJobVO (com.dtstack.taier.develop.vo.console.ConsoleJobVO)1 ParamAction (com.dtstack.taier.pluginapi.pojo.ParamAction)1