0706 ljc afl模块文件操作以及入库操作以及时序表操作等接口开发,包含分片代码以及文件工具类代码
This commit is contained in:
parent
b498c519db
commit
558f4d346d
@ -59,6 +59,9 @@ public class AflCrashesInfoServiceImpl extends ServiceImpl<AflCrashesInfoDao, Af
|
|||||||
String uuid = UUID.randomUUID().toString();
|
String uuid = UUID.randomUUID().toString();
|
||||||
|
|
||||||
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
||||||
|
if (ObjectUtils.isEmpty(runContext)){
|
||||||
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到运行上下文");
|
||||||
|
}
|
||||||
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
||||||
if (StringUtils.isEmpty(resourceId)){
|
if (StringUtils.isEmpty(resourceId)){
|
||||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
||||||
|
@ -55,6 +55,9 @@ public class AflInfoServiceImpl extends ServiceImpl<AflInfoDao, AflInfo> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
||||||
|
if (ObjectUtils.isEmpty(runContext)){
|
||||||
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到运行上下文");
|
||||||
|
}
|
||||||
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
||||||
// String resourceId = "1";
|
// String resourceId = "1";
|
||||||
if (StringUtils.isEmpty(resourceId)){
|
if (StringUtils.isEmpty(resourceId)){
|
||||||
@ -112,6 +115,9 @@ public class AflInfoServiceImpl extends ServiceImpl<AflInfoDao, AflInfo> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
||||||
|
if (ObjectUtils.isEmpty(runContext)){
|
||||||
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到运行上下文");
|
||||||
|
}
|
||||||
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
||||||
if (StringUtils.isEmpty(resourceId)){
|
if (StringUtils.isEmpty(resourceId)){
|
||||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
||||||
|
@ -55,6 +55,9 @@ public class AflPlotInfoServiceImpl extends ServiceImpl<AflPlotInfoDao, AflPlotI
|
|||||||
}
|
}
|
||||||
|
|
||||||
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
||||||
|
if (ObjectUtils.isEmpty(runContext)){
|
||||||
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到运行上下文");
|
||||||
|
}
|
||||||
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
||||||
if (StringUtils.isEmpty(resourceId)){
|
if (StringUtils.isEmpty(resourceId)){
|
||||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
||||||
@ -112,6 +115,9 @@ public class AflPlotInfoServiceImpl extends ServiceImpl<AflPlotInfoDao, AflPlotI
|
|||||||
}
|
}
|
||||||
|
|
||||||
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
||||||
|
if (ObjectUtils.isEmpty(runContext)){
|
||||||
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到运行上下文");
|
||||||
|
}
|
||||||
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
||||||
if (StringUtils.isEmpty(resourceId)){
|
if (StringUtils.isEmpty(resourceId)){
|
||||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
||||||
|
@ -23,6 +23,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -62,6 +63,9 @@ public class AflSeedInfoServiceImpl extends ServiceImpl<AflSeedInfoDao, AflSeedI
|
|||||||
}
|
}
|
||||||
|
|
||||||
BaseRunContext pipelineRunContext = runContextManager.getContext(req.getPipelineId());
|
BaseRunContext pipelineRunContext = runContextManager.getContext(req.getPipelineId());
|
||||||
|
if (ObjectUtils.isEmpty(pipelineRunContext)){
|
||||||
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到pipeline运行上下文");
|
||||||
|
}
|
||||||
String resourceId = pipelineRunContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) pipelineRunContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
String resourceId = pipelineRunContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) pipelineRunContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
||||||
if (StringUtils.isEmpty(resourceId)){
|
if (StringUtils.isEmpty(resourceId)){
|
||||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
||||||
@ -120,6 +124,9 @@ public class AflSeedInfoServiceImpl extends ServiceImpl<AflSeedInfoDao, AflSeedI
|
|||||||
|
|
||||||
// 获取开始时间
|
// 获取开始时间
|
||||||
BaseRunContext taskRunContext = runContextManager.getContext(req.getTaskId());
|
BaseRunContext taskRunContext = runContextManager.getContext(req.getTaskId());
|
||||||
|
if (ObjectUtils.isEmpty(taskRunContext)){
|
||||||
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到task运行上下文");
|
||||||
|
}
|
||||||
LocalDateTime startTime = taskRunContext.getStartTime();
|
LocalDateTime startTime = taskRunContext.getStartTime();
|
||||||
|
|
||||||
// 计算时间差(分钟)
|
// 计算时间差(分钟)
|
||||||
@ -169,6 +176,9 @@ public class AflSeedInfoServiceImpl extends ServiceImpl<AflSeedInfoDao, AflSeedI
|
|||||||
String uuid = UUID.randomUUID().toString();
|
String uuid = UUID.randomUUID().toString();
|
||||||
|
|
||||||
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
BaseRunContext runContext = runContextManager.getContext(req.getPipelineId());
|
||||||
|
if (ObjectUtils.isEmpty(runContext)){
|
||||||
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到运行上下文");
|
||||||
|
}
|
||||||
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
String resourceId = runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY) instanceof String ? ((String) runContext.getGlobalVariables().get(PipelineVariableConstant.AFL_RESOURCE_MANAGER_ID_KEY)) : null;
|
||||||
if (StringUtils.isEmpty(resourceId)){
|
if (StringUtils.isEmpty(resourceId)){
|
||||||
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
throw new ServiceException(GlobalErrorCodeConstants.INTERNAL_SERVER_ERROR.getCode(),"未找到资源");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user