Search in sources :

Example 1 with BatchServerLogByAppLogTypeResultVO

use of com.dtstack.taier.develop.vo.develop.result.BatchServerLogByAppLogTypeResultVO in project Taier by DTStack.

the class BatchServerLogService method getLogsByAppLogType.

public BatchServerLogByAppLogTypeResultVO getLogsByAppLogType(Long tenantId, Integer taskType, String jobId, String logType, Long projectId) {
    if (EScheduleJobType.SYNC.getVal().equals(taskType) || EScheduleJobType.VIRTUAL.getVal().equals(taskType) || EScheduleJobType.WORK_FLOW.getVal().equals(taskType)) {
        throw new RdosDefineException("数据同步、虚节点、工作流的任务日志不支持下载");
    }
    if (YarnAppLogType.getType(logType) == null) {
        throw new RdosDefineException("not support the logType:" + logType);
    }
    final String msg = this.batchDownloadService.downloadAppTypeLog(tenantId, jobId, 100, logType.toUpperCase(), taskType);
    BatchServerLogByAppLogTypeResultVO resultVO = new BatchServerLogByAppLogTypeResultVO();
    resultVO.setMsg(msg);
    resultVO.setDownload(String.format(BatchServerLogService.DOWNLOAD_TYPE_LOG, jobId, logType, projectId));
    return resultVO;
}
Also used : RdosDefineException(com.dtstack.taier.common.exception.RdosDefineException) BatchServerLogByAppLogTypeResultVO(com.dtstack.taier.develop.vo.develop.result.BatchServerLogByAppLogTypeResultVO)

Aggregations

RdosDefineException (com.dtstack.taier.common.exception.RdosDefineException)1 BatchServerLogByAppLogTypeResultVO (com.dtstack.taier.develop.vo.develop.result.BatchServerLogByAppLogTypeResultVO)1