You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ke...@apache.org on 2022/08/10 13:34:31 UTC
[dolphinscheduler] 01/01: Support reading application properties from kubernetes config map
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch k8s/config
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
commit bb9359bcac208988f60717acd9aa4585083a6862
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Wed Aug 10 21:34:08 2022 +0800
Support reading application properties from kubernetes config map
---
.../service/impl/ProcessDefinitionServiceImpl.java | 527 +++++++++++++--------
.../src/main/resources/application.yaml | 2 +-
dolphinscheduler-bom/pom.xml | 114 ++---
dolphinscheduler-dist/release-docs/LICENSE | 106 ++---
.../master/runner/StateWheelExecuteThread.java | 2 +
.../src/main/resources/application.yaml | 2 +-
.../service/process/ProcessServiceImpl.java | 5 +-
dolphinscheduler-standalone-server/pom.xml | 56 ++-
.../src/main/resources/application.yaml | 2 +-
.../src/main/resources/logback-spring.xml | 2 +-
pom.xml | 2 +-
tools/dependencies/known-dependencies.txt | 121 ++---
12 files changed, 539 insertions(+), 402 deletions(-)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
index 88be804307..10143934c6 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProcessDefinitionServiceImpl.java
@@ -139,6 +139,7 @@ import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -176,6 +177,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Autowired
private ProcessDefinitionMapper processDefinitionMapper;
+ @Lazy
@Autowired
private ProcessInstanceService processInstanceService;
@@ -245,8 +247,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
String otherParamsJson,
ProcessExecutionTypeEnum executionType) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_CREATE);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_CREATE);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -262,8 +265,10 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
if (checkTaskDefinitions.get(Constants.STATUS) != Status.SUCCESS) {
return checkTaskDefinitions;
}
- List<ProcessTaskRelationLog> taskRelationList = JSONUtils.toList(taskRelationJson, ProcessTaskRelationLog.class);
- Map<String, Object> checkRelationJson = checkTaskRelationList(taskRelationList, taskRelationJson, taskDefinitionLogs);
+ List<ProcessTaskRelationLog> taskRelationList =
+ JSONUtils.toList(taskRelationJson, ProcessTaskRelationLog.class);
+ Map<String, Object> checkRelationJson =
+ checkTaskRelationList(taskRelationList, taskRelationJson, taskDefinitionLogs);
if (checkRelationJson.get(Constants.STATUS) != Status.SUCCESS) {
return checkRelationJson;
}
@@ -283,19 +288,21 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
putMsg(result, Status.INTERNAL_SERVER_ERROR_ARGS);
return result;
}
- ProcessDefinition processDefinition = new ProcessDefinition(projectCode, name, processDefinitionCode, description,
- globalParams, locations, timeout, loginUser.getId(), tenantId);
+ ProcessDefinition processDefinition =
+ new ProcessDefinition(projectCode, name, processDefinitionCode, description,
+ globalParams, locations, timeout, loginUser.getId(), tenantId);
processDefinition.setExecutionType(executionType);
return createDagDefine(loginUser, taskRelationList, processDefinition, taskDefinitionLogs, otherParamsJson);
}
protected Map<String, Object> createDagDefine(User loginUser,
- List<ProcessTaskRelationLog> taskRelationList,
- ProcessDefinition processDefinition,
- List<TaskDefinitionLog> taskDefinitionLogs, String otherParamsJson) {
+ List<ProcessTaskRelationLog> taskRelationList,
+ ProcessDefinition processDefinition,
+ List<TaskDefinitionLog> taskDefinitionLogs, String otherParamsJson) {
Map<String, Object> result = new HashMap<>();
- int saveTaskResult = processService.saveTaskDefine(loginUser, processDefinition.getProjectCode(), taskDefinitionLogs, Boolean.TRUE);
+ int saveTaskResult = processService.saveTaskDefine(loginUser, processDefinition.getProjectCode(),
+ taskDefinitionLogs, Boolean.TRUE);
if (saveTaskResult == Constants.EXIT_CODE_SUCCESS) {
logger.info("The task has not changed, so skip");
}
@@ -308,8 +315,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
putMsg(result, Status.CREATE_PROCESS_DEFINITION_ERROR);
throw new ServiceException(Status.CREATE_PROCESS_DEFINITION_ERROR);
}
- int insertResult = processService.saveTaskRelation(loginUser, processDefinition.getProjectCode(), processDefinition.getCode(),
- insertVersion, taskRelationList, taskDefinitionLogs, Boolean.TRUE);
+ int insertResult = processService.saveTaskRelation(loginUser, processDefinition.getProjectCode(),
+ processDefinition.getCode(),
+ insertVersion, taskRelationList, taskDefinitionLogs, Boolean.TRUE);
if (insertResult == Constants.EXIT_CODE_SUCCESS) {
putMsg(result, Status.SUCCESS);
result.put(Constants.DATA_LIST, processDefinition);
@@ -321,7 +329,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return result;
}
- private Map<String, Object> checkTaskDefinitionList(List<TaskDefinitionLog> taskDefinitionLogs, String taskDefinitionJson) {
+ private Map<String, Object> checkTaskDefinitionList(List<TaskDefinitionLog> taskDefinitionLogs,
+ String taskDefinitionJson) {
Map<String, Object> result = new HashMap<>();
try {
if (taskDefinitionLogs.isEmpty()) {
@@ -349,7 +358,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return result;
}
- private Map<String, Object> checkTaskRelationList(List<ProcessTaskRelationLog> taskRelationList, String taskRelationJson, List<TaskDefinitionLog> taskDefinitionLogs) {
+ private Map<String, Object> checkTaskRelationList(List<ProcessTaskRelationLog> taskRelationList,
+ String taskRelationJson,
+ List<TaskDefinitionLog> taskDefinitionLogs) {
Map<String, Object> result = new HashMap<>();
try {
if (taskRelationList == null || taskRelationList.isEmpty()) {
@@ -358,16 +369,19 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return result;
}
List<ProcessTaskRelation> processTaskRelations = taskRelationList.stream()
- .map(processTaskRelationLog -> JSONUtils.parseObject(JSONUtils.toJsonString(processTaskRelationLog), ProcessTaskRelation.class))
- .collect(Collectors.toList());
+ .map(processTaskRelationLog -> JSONUtils.parseObject(JSONUtils.toJsonString(processTaskRelationLog),
+ ProcessTaskRelation.class))
+ .collect(Collectors.toList());
List<TaskNode> taskNodeList = processService.transformTask(processTaskRelations, taskDefinitionLogs);
if (taskNodeList.size() != taskRelationList.size()) {
- Set<Long> postTaskCodes = taskRelationList.stream().map(ProcessTaskRelationLog::getPostTaskCode).collect(Collectors.toSet());
+ Set<Long> postTaskCodes = taskRelationList.stream().map(ProcessTaskRelationLog::getPostTaskCode)
+ .collect(Collectors.toSet());
Set<Long> taskNodeCodes = taskNodeList.stream().map(TaskNode::getCode).collect(Collectors.toSet());
Collection<Long> codes = CollectionUtils.subtract(postTaskCodes, taskNodeCodes);
if (CollectionUtils.isNotEmpty(codes)) {
logger.error("the task code is not exist");
- putMsg(result, Status.TASK_DEFINE_NOT_EXIST, org.apache.commons.lang.StringUtils.join(codes, Constants.COMMA));
+ putMsg(result, Status.TASK_DEFINE_NOT_EXIST,
+ org.apache.commons.lang.StringUtils.join(codes, Constants.COMMA));
return result;
}
}
@@ -403,8 +417,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Override
public Map<String, Object> queryProcessDefinitionList(User loginUser, long projectCode) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_DEFINITION);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_DEFINITION);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -425,8 +440,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Override
public Map<String, Object> queryProcessDefinitionSimpleList(User loginUser, long projectCode) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_DEFINITION);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_DEFINITION);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -457,11 +473,14 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
* @return process definition page
*/
@Override
- public Result queryProcessDefinitionListPaging(User loginUser, long projectCode, String searchVal, String otherParamsJson, Integer userId, Integer pageNo, Integer pageSize) {
+ public Result queryProcessDefinitionListPaging(User loginUser, long projectCode, String searchVal,
+ String otherParamsJson, Integer userId, Integer pageNo,
+ Integer pageSize) {
Result result = new Result();
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_DEFINITION);
+ // check user access for project
+ Map<String, Object> checkResult =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_DEFINITION);
Status resultStatus = (Status) checkResult.get(Constants.STATUS);
if (resultStatus != Status.SUCCESS) {
putMsg(result, resultStatus);
@@ -470,11 +489,12 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
Page<ProcessDefinition> page = new Page<>(pageNo, pageSize);
IPage<ProcessDefinition> processDefinitionIPage = processDefinitionMapper.queryDefineListPaging(
- page, searchVal, userId, project.getCode(), isAdmin(loginUser));
+ page, searchVal, userId, project.getCode(), isAdmin(loginUser));
List<ProcessDefinition> records = processDefinitionIPage.getRecords();
for (ProcessDefinition pd : records) {
- ProcessDefinitionLog processDefinitionLog = processDefinitionLogMapper.queryByDefinitionCodeAndVersion(pd.getCode(), pd.getVersion());
+ ProcessDefinitionLog processDefinitionLog =
+ processDefinitionLogMapper.queryByDefinitionCodeAndVersion(pd.getCode(), pd.getVersion());
User user = userMapper.selectById(processDefinitionLog.getOperator());
pd.setModifyBy(user.getUserName());
}
@@ -499,8 +519,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Override
public Map<String, Object> queryProcessDefinitionByCode(User loginUser, long projectCode, long code) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_DEFINITION);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_DEFINITION);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -523,8 +544,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Override
public Map<String, Object> queryProcessDefinitionByName(User loginUser, long projectCode, String name) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_DEFINITION);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_DEFINITION);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -573,8 +595,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
String otherParamsJson,
ProcessExecutionTypeEnum executionType) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_UPDATE);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_UPDATE);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -584,8 +607,10 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
if (checkTaskDefinitions.get(Constants.STATUS) != Status.SUCCESS) {
return checkTaskDefinitions;
}
- List<ProcessTaskRelationLog> taskRelationList = JSONUtils.toList(taskRelationJson, ProcessTaskRelationLog.class);
- Map<String, Object> checkRelationJson = checkTaskRelationList(taskRelationList, taskRelationJson, taskDefinitionLogs);
+ List<ProcessTaskRelationLog> taskRelationList =
+ JSONUtils.toList(taskRelationJson, ProcessTaskRelationLog.class);
+ Map<String, Object> checkRelationJson =
+ checkTaskRelationList(taskRelationList, taskRelationJson, taskDefinitionLogs);
if (checkRelationJson.get(Constants.STATUS) != Status.SUCCESS) {
return checkRelationJson;
}
@@ -619,10 +644,12 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return result;
}
}
- ProcessDefinition processDefinitionDeepCopy = JSONUtils.parseObject(JSONUtils.toJsonString(processDefinition), ProcessDefinition.class);
+ ProcessDefinition processDefinitionDeepCopy =
+ JSONUtils.parseObject(JSONUtils.toJsonString(processDefinition), ProcessDefinition.class);
processDefinition.set(projectCode, name, description, globalParams, locations, timeout, tenantId);
processDefinition.setExecutionType(executionType);
- return updateDagDefine(loginUser, taskRelationList, processDefinition, processDefinitionDeepCopy, taskDefinitionLogs, otherParamsJson);
+ return updateDagDefine(loginUser, taskRelationList, processDefinition, processDefinitionDeepCopy,
+ taskDefinitionLogs, otherParamsJson);
}
/**
@@ -633,15 +660,20 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
* @param processDefinition ProcessDefinition you change task definition and task relation
* @param taskRelationList All the latest task relation list from process definition
*/
- private void taskUsedInOtherTaskValid(ProcessDefinition processDefinition, List<ProcessTaskRelationLog> taskRelationList) {
- List<ProcessTaskRelation> oldProcessTaskRelationList = processTaskRelationMapper.queryByProcessCode(processDefinition.getProjectCode(), processDefinition.getCode());
- Set<ProcessTaskRelationLog> oldProcessTaskRelationSet = oldProcessTaskRelationList.stream().map(ProcessTaskRelationLog::new).collect(Collectors.toSet());
+ private void taskUsedInOtherTaskValid(ProcessDefinition processDefinition,
+ List<ProcessTaskRelationLog> taskRelationList) {
+ List<ProcessTaskRelation> oldProcessTaskRelationList = processTaskRelationMapper
+ .queryByProcessCode(processDefinition.getProjectCode(), processDefinition.getCode());
+ Set<ProcessTaskRelationLog> oldProcessTaskRelationSet =
+ oldProcessTaskRelationList.stream().map(ProcessTaskRelationLog::new).collect(Collectors.toSet());
StringBuilder sb = new StringBuilder();
- for (ProcessTaskRelationLog oldProcessTaskRelation: oldProcessTaskRelationSet) {
- boolean oldTaskExists = taskRelationList.stream().anyMatch(relation -> oldProcessTaskRelation.getPostTaskCode() == relation.getPostTaskCode());
+ for (ProcessTaskRelationLog oldProcessTaskRelation : oldProcessTaskRelationSet) {
+ boolean oldTaskExists = taskRelationList.stream()
+ .anyMatch(relation -> oldProcessTaskRelation.getPostTaskCode() == relation.getPostTaskCode());
if (!oldTaskExists) {
Optional<String> taskDepMsg = workFlowLineageService.taskDepOnTaskMsg(
- processDefinition.getProjectCode(), oldProcessTaskRelation.getProcessDefinitionCode(), oldProcessTaskRelation.getPostTaskCode());
+ processDefinition.getProjectCode(), oldProcessTaskRelation.getProcessDefinitionCode(),
+ oldProcessTaskRelation.getPostTaskCode());
taskDepMsg.ifPresent(sb::append);
}
if (sb.length() != 0) {
@@ -651,13 +683,14 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
protected Map<String, Object> updateDagDefine(User loginUser,
- List<ProcessTaskRelationLog> taskRelationList,
- ProcessDefinition processDefinition,
- ProcessDefinition processDefinitionDeepCopy,
- List<TaskDefinitionLog> taskDefinitionLogs,
- String otherParamsJson) {
+ List<ProcessTaskRelationLog> taskRelationList,
+ ProcessDefinition processDefinition,
+ ProcessDefinition processDefinitionDeepCopy,
+ List<TaskDefinitionLog> taskDefinitionLogs,
+ String otherParamsJson) {
Map<String, Object> result = new HashMap<>();
- int saveTaskResult = processService.saveTaskDefine(loginUser, processDefinition.getProjectCode(), taskDefinitionLogs, Boolean.TRUE);
+ int saveTaskResult = processService.saveTaskDefine(loginUser, processDefinition.getProjectCode(),
+ taskDefinitionLogs, Boolean.TRUE);
if (saveTaskResult == Constants.EXIT_CODE_SUCCESS) {
logger.info("The task has not changed, so skip");
}
@@ -667,10 +700,12 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
boolean isChange = false;
if (processDefinition.equals(processDefinitionDeepCopy) && saveTaskResult == Constants.EXIT_CODE_SUCCESS) {
- List<ProcessTaskRelationLog> processTaskRelationLogList = processTaskRelationLogMapper.queryByProcessCodeAndVersion(processDefinition.getCode(), processDefinition.getVersion());
+ List<ProcessTaskRelationLog> processTaskRelationLogList = processTaskRelationLogMapper
+ .queryByProcessCodeAndVersion(processDefinition.getCode(), processDefinition.getVersion());
if (taskRelationList.size() == processTaskRelationLogList.size()) {
Set<ProcessTaskRelationLog> taskRelationSet = taskRelationList.stream().collect(Collectors.toSet());
- Set<ProcessTaskRelationLog> processTaskRelationLogSet = processTaskRelationLogList.stream().collect(Collectors.toSet());
+ Set<ProcessTaskRelationLog> processTaskRelationLogSet =
+ processTaskRelationLogList.stream().collect(Collectors.toSet());
if (taskRelationSet.size() == processTaskRelationLogSet.size()) {
taskRelationSet.removeAll(processTaskRelationLogSet);
if (!taskRelationSet.isEmpty()) {
@@ -687,7 +722,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
if (isChange) {
processDefinition.setUpdateTime(new Date());
- int insertVersion = processService.saveProcessDefine(loginUser, processDefinition, Boolean.TRUE, Boolean.TRUE);
+ int insertVersion =
+ processService.saveProcessDefine(loginUser, processDefinition, Boolean.TRUE, Boolean.TRUE);
if (insertVersion <= 0) {
putMsg(result, Status.UPDATE_PROCESS_DEFINITION_ERROR);
throw new ServiceException(Status.UPDATE_PROCESS_DEFINITION_ERROR);
@@ -695,7 +731,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
taskUsedInOtherTaskValid(processDefinition, taskRelationList);
int insertResult = processService.saveTaskRelation(loginUser, processDefinition.getProjectCode(),
- processDefinition.getCode(), insertVersion, taskRelationList, taskDefinitionLogs, Boolean.TRUE);
+ processDefinition.getCode(), insertVersion, taskRelationList, taskDefinitionLogs, Boolean.TRUE);
if (insertResult == Constants.EXIT_CODE_SUCCESS) {
putMsg(result, Status.SUCCESS);
result.put(Constants.DATA_LIST, processDefinition);
@@ -722,12 +758,14 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Override
public Map<String, Object> verifyProcessDefinitionName(User loginUser, long projectCode, String name) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_CREATE);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_CREATE);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
- ProcessDefinition processDefinition = processDefinitionMapper.verifyByDefineName(project.getCode(), name.trim());
+ ProcessDefinition processDefinition =
+ processDefinitionMapper.verifyByDefineName(project.getCode(), name.trim());
if (processDefinition == null) {
putMsg(result, Status.SUCCESS);
} else {
@@ -750,16 +788,19 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
// check process instances is already running
- List<ProcessInstance> processInstances = processInstanceService.queryByProcessDefineCodeAndStatus(processDefinition.getCode(), Constants.NOT_TERMINATED_STATES);
+ List<ProcessInstance> processInstances = processInstanceService
+ .queryByProcessDefineCodeAndStatus(processDefinition.getCode(), Constants.NOT_TERMINATED_STATES);
if (CollectionUtils.isNotEmpty(processInstances)) {
throw new ServiceException(Status.DELETE_PROCESS_DEFINITION_EXECUTING_FAIL, processInstances.size());
}
// check process used by other task, including subprocess and dependent task type
- Set<TaskMainInfo> taskDepOnProcess = workFlowLineageService.queryTaskDepOnProcess(processDefinition.getProjectCode(), processDefinition.getCode());
+ Set<TaskMainInfo> taskDepOnProcess = workFlowLineageService
+ .queryTaskDepOnProcess(processDefinition.getProjectCode(), processDefinition.getCode());
if (CollectionUtils.isNotEmpty(taskDepOnProcess)) {
String taskDepDetail = taskDepOnProcess.stream()
- .map(task -> String.format(Constants.FORMAT_S_S_COLON, task.getProcessDefinitionName(), task.getTaskName()))
+ .map(task -> String.format(Constants.FORMAT_S_S_COLON, task.getProcessDefinitionName(),
+ task.getTaskName()))
.collect(Collectors.joining(Constants.COMMA));
throw new ServiceException(Status.DELETE_PROCESS_DEFINITION_USE_BY_OTHER_FAIL, taskDepDetail);
}
@@ -777,8 +818,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Transactional
public Map<String, Object> deleteProcessDefinitionByCode(User loginUser, long projectCode, long code) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_DEFINITION_DELETE);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_DEFINITION_DELETE);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -836,10 +878,12 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
*/
@Override
@Transactional
- public Map<String, Object> releaseProcessDefinition(User loginUser, long projectCode, long code, ReleaseState releaseState) {
+ public Map<String, Object> releaseProcessDefinition(User loginUser, long projectCode, long code,
+ ReleaseState releaseState) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_ONLINE_OFFLINE);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_ONLINE_OFFLINE);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -857,7 +901,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
switch (releaseState) {
case ONLINE:
- List<ProcessTaskRelation> relationList = processService.findRelationByCode(code, processDefinition.getVersion());
+ List<ProcessTaskRelation> relationList =
+ processService.findRelationByCode(code, processDefinition.getVersion());
if (CollectionUtils.isEmpty(relationList)) {
putMsg(result, Status.PROCESS_DAG_IS_EMPTY);
return result;
@@ -870,7 +915,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
int updateProcess = processDefinitionMapper.updateById(processDefinition);
Schedule schedule = scheduleMapper.queryByProcessDefinitionCode(code);
if (updateProcess > 0 && schedule != null) {
- logger.info("set schedule offline, project code: {}, schedule id: {}, process definition code: {}", projectCode, schedule.getId(), code);
+ logger.info("set schedule offline, project code: {}, schedule id: {}, process definition code: {}",
+ projectCode, schedule.getId(), code);
// set status
schedule.setReleaseState(releaseState);
int updateSchedule = scheduleMapper.updateById(schedule);
@@ -894,24 +940,29 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
* batch export process definition by codes
*/
@Override
- public void batchExportProcessDefinitionByCodes(User loginUser, long projectCode, String codes, HttpServletResponse response) {
+ public void batchExportProcessDefinitionByCodes(User loginUser, long projectCode, String codes,
+ HttpServletResponse response) {
if (org.apache.commons.lang.StringUtils.isEmpty(codes)) {
return;
}
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_DEFINITION_EXPORT);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_DEFINITION_EXPORT);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return;
}
- Set<Long> defineCodeSet = Lists.newArrayList(codes.split(Constants.COMMA)).stream().map(Long::parseLong).collect(Collectors.toSet());
+ Set<Long> defineCodeSet = Lists.newArrayList(codes.split(Constants.COMMA)).stream().map(Long::parseLong)
+ .collect(Collectors.toSet());
List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(defineCodeSet);
if (CollectionUtils.isEmpty(processDefinitionList)) {
return;
}
// check processDefinition exist in project
- List<ProcessDefinition> processDefinitionListInProject = processDefinitionList.stream().filter(o -> projectCode == o.getProjectCode()).collect(Collectors.toList());
- List<DagDataSchedule> dagDataSchedules = processDefinitionListInProject.stream().map(this::exportProcessDagData).collect(Collectors.toList());
+ List<ProcessDefinition> processDefinitionListInProject = processDefinitionList.stream()
+ .filter(o -> projectCode == o.getProjectCode()).collect(Collectors.toList());
+ List<DagDataSchedule> dagDataSchedules =
+ processDefinitionListInProject.stream().map(this::exportProcessDagData).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(dagDataSchedules)) {
downloadProcessDefinitionFile(response, dagDataSchedules);
}
@@ -981,11 +1032,11 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
String dagDataScheduleJson = FileUtils.file2String(file);
List<DagDataSchedule> dagDataScheduleList = JSONUtils.toList(dagDataScheduleJson, DagDataSchedule.class);
Project project = projectMapper.queryByCode(projectCode);
- result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_EXPORT);
+ result = projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_EXPORT);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
- //check file content
+ // check file content
if (CollectionUtils.isEmpty(dagDataScheduleList)) {
putMsg(result, Status.DATA_IS_NULL, "fileContent");
return result;
@@ -1003,7 +1054,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
public Map<String, Object> importSqlProcessDefinition(User loginUser, long projectCode, MultipartFile file) {
Map<String, Object> result = new HashMap<>();
Project project = projectMapper.queryByCode(projectCode);
- result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_IMPORT);
+ result = projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_IMPORT);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -1028,15 +1079,16 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
Map<String, DataSource> dataSourceCache = new HashMap<>(1);
Map<String, Long> taskNameToCode = new HashMap<>(16);
Map<String, List<String>> taskNameToUpstream = new HashMap<>(16);
- try (ZipInputStream zIn = new ZipInputStream(file.getInputStream());
- BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(zIn))) {
+ try (
+ ZipInputStream zIn = new ZipInputStream(file.getInputStream());
+ BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(zIn))) {
// build process definition
processDefinition = new ProcessDefinition(projectCode,
- processDefinitionName,
- CodeGenerateUtils.getInstance().genCode(),
- "",
- "[]", null,
- 0, loginUser.getId(), loginUser.getTenantId());
+ processDefinitionName,
+ CodeGenerateUtils.getInstance().genCode(),
+ "",
+ "[]", null,
+ 0, loginUser.getId(), loginUser.getTenantId());
ZipEntry entry;
while ((entry = zIn.getNextEntry()) != null) {
@@ -1054,7 +1106,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
totalSizeArchive += nBytes;
long compressionRatio = totalSizeEntry / entry.getCompressedSize();
if (compressionRatio > THRESHOLD_RATIO) {
- throw new IllegalStateException("ratio between compressed and uncompressed data is highly suspicious, looks like a Zip Bomb Attack");
+ throw new IllegalStateException(
+ "ratio between compressed and uncompressed data is highly suspicious, looks like a Zip Bomb Attack");
}
int commentIndex = line.indexOf("-- ");
if (commentIndex >= 0) {
@@ -1069,7 +1122,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
break;
case "upstream":
upstreams = Arrays.stream(value.split(",")).map(String::trim)
- .filter(s -> !"".equals(s)).collect(Collectors.toList());
+ .filter(s -> !"".equals(s)).collect(Collectors.toList());
line = line.substring(0, commentIndex);
break;
case "datasource":
@@ -1107,7 +1160,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
dataSourceCache.put(datasourceName, dataSource);
- TaskDefinitionLog taskDefinition = buildNormalSqlTaskDefinition(taskName, dataSource, sql.substring(0, sql.length() - 1));
+ TaskDefinitionLog taskDefinition =
+ buildNormalSqlTaskDefinition(taskName, dataSource, sql.substring(0, sql.length() - 1));
taskDefinitionList.add(taskDefinition);
taskNameToCode.put(taskDefinition.getName(), taskDefinition.getCode());
@@ -1115,11 +1169,13 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
if (totalSizeArchive > THRESHOLD_SIZE) {
- throw new IllegalStateException("the uncompressed data size is too much for the application resource capacity");
+ throw new IllegalStateException(
+ "the uncompressed data size is too much for the application resource capacity");
}
if (totalEntryArchive > THRESHOLD_ENTRIES) {
- throw new IllegalStateException("too much entries in this archive, can lead to inodes exhaustion of the system");
+ throw new IllegalStateException(
+ "too much entries in this archive, can lead to inodes exhaustion of the system");
}
}
} catch (Exception e) {
@@ -1132,13 +1188,14 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
for (Map.Entry<String, Long> entry : taskNameToCode.entrySet()) {
List<String> upstreams = taskNameToUpstream.get(entry.getKey());
if (CollectionUtils.isEmpty(upstreams)
- || (upstreams.size() == 1 && upstreams.contains("root") && !taskNameToCode.containsKey("root"))) {
+ || (upstreams.size() == 1 && upstreams.contains("root") && !taskNameToCode.containsKey("root"))) {
ProcessTaskRelationLog processTaskRelation = buildNormalTaskRelation(0, entry.getValue());
processTaskRelationList.add(processTaskRelation);
continue;
}
for (String upstream : upstreams) {
- ProcessTaskRelationLog processTaskRelation = buildNormalTaskRelation(taskNameToCode.get(upstream), entry.getValue());
+ ProcessTaskRelationLog processTaskRelation =
+ buildNormalTaskRelation(taskNameToCode.get(upstream), entry.getValue());
processTaskRelationList.add(processTaskRelation);
}
}
@@ -1159,7 +1216,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
private DataSource queryDatasourceByNameAndUser(String datasourceName, User loginUser) {
if (isAdmin(loginUser)) {
- List<DataSource> dataSources = dataSourceMapper.queryDataSourceByName(datasourceName);
+ List<DataSource> dataSources = dataSourceMapper.queryDataSourceByName(datasourceName);
if (CollectionUtils.isNotEmpty(dataSources)) {
return dataSources.get(0);
}
@@ -1169,7 +1226,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return null;
}
- private TaskDefinitionLog buildNormalSqlTaskDefinition(String taskName, DataSource dataSource, String sql) throws CodeGenerateException {
+ private TaskDefinitionLog buildNormalSqlTaskDefinition(String taskName, DataSource dataSource,
+ String sql) throws CodeGenerateException {
TaskDefinitionLog taskDefinition = new TaskDefinitionLog();
taskDefinition.setName(taskName);
taskDefinition.setFlag(Flag.YES);
@@ -1200,7 +1258,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
/**
* check and import
*/
- protected boolean checkAndImport(User loginUser, long projectCode, Map<String, Object> result, DagDataSchedule dagDataSchedule, String otherParamsJson) {
+ protected boolean checkAndImport(User loginUser, long projectCode, Map<String, Object> result,
+ DagDataSchedule dagDataSchedule, String otherParamsJson) {
if (!checkImportanceParams(dagDataSchedule, result)) {
return false;
}
@@ -1209,8 +1268,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
// generate import processDefinitionName
String processDefinitionName = recursionProcessDefinitionName(projectCode, processDefinition.getName(), 1);
String importProcessDefinitionName = getNewName(processDefinitionName, IMPORT_SUFFIX);
- //unique check
- Map<String, Object> checkResult = verifyProcessDefinitionName(loginUser, projectCode, importProcessDefinitionName);
+ // unique check
+ Map<String, Object> checkResult =
+ verifyProcessDefinitionName(loginUser, projectCode, importProcessDefinitionName);
if (Status.SUCCESS.equals(checkResult.get(Constants.STATUS))) {
putMsg(result, Status.SUCCESS);
} else {
@@ -1273,7 +1333,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
processTaskRelationLog.setPostTaskVersion(Constants.VERSION_FIRST);
taskRelationLogList.add(processTaskRelationLog);
}
- if (StringUtils.isNotEmpty(processDefinition.getLocations()) && JSONUtils.checkJsonValid(processDefinition.getLocations())) {
+ if (StringUtils.isNotEmpty(processDefinition.getLocations())
+ && JSONUtils.checkJsonValid(processDefinition.getLocations())) {
ArrayNode arrayNode = JSONUtils.parseArray(processDefinition.getLocations());
ArrayNode newArrayNode = JSONUtils.createArrayNode();
for (int i = 0; i < arrayNode.size(); i++) {
@@ -1290,7 +1351,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
processDefinition.setCreateTime(new Date());
processDefinition.setUpdateTime(new Date());
- Map<String, Object> createDagResult = createDagDefine(loginUser, taskRelationLogList, processDefinition, Lists.newArrayList(), otherParamsJson);
+ Map<String, Object> createDagResult = createDagDefine(loginUser, taskRelationLogList, processDefinition,
+ Lists.newArrayList(), otherParamsJson);
if (Status.SUCCESS.equals(createDagResult.get(Constants.STATUS))) {
putMsg(createDagResult, Status.SUCCESS);
} else {
@@ -1334,7 +1396,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
private String recursionProcessDefinitionName(long projectCode, String processDefinitionName, int num) {
- ProcessDefinition processDefinition = processDefinitionMapper.queryByDefineName(projectCode, processDefinitionName);
+ ProcessDefinition processDefinition =
+ processDefinitionMapper.queryByDefineName(projectCode, processDefinitionName);
if (processDefinition != null) {
if (num > 1) {
String str = processDefinitionName.substring(0, processDefinitionName.length() - 3);
@@ -1355,7 +1418,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
* @return check result code
*/
@Override
- public Map<String, Object> checkProcessNodeList(String processTaskRelationJson, List<TaskDefinitionLog> taskDefinitionLogsList) {
+ public Map<String, Object> checkProcessNodeList(String processTaskRelationJson,
+ List<TaskDefinitionLog> taskDefinitionLogsList) {
Map<String, Object> result = new HashMap<>();
try {
if (processTaskRelationJson == null) {
@@ -1364,7 +1428,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return result;
}
- List<ProcessTaskRelation> taskRelationList = JSONUtils.toList(processTaskRelationJson, ProcessTaskRelation.class);
+ List<ProcessTaskRelation> taskRelationList =
+ JSONUtils.toList(processTaskRelationJson, ProcessTaskRelation.class);
// Check whether the task node is normal
List<TaskNode> taskNodes = processService.transformTask(taskRelationList, taskDefinitionLogsList);
@@ -1417,8 +1482,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Override
public Map<String, Object> getTaskNodeListByDefinitionCode(User loginUser, long projectCode, long code) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,null);
+ // check user access for project
+ Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, null);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -1446,26 +1511,27 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Override
public Map<String, Object> getNodeListMapByDefinitionCodes(User loginUser, long projectCode, String codes) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,null);
+ // check user access for project
+ Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, null);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
- Set<Long> defineCodeSet = Lists.newArrayList(codes.split(Constants.COMMA)).stream().map(Long::parseLong).collect(Collectors.toSet());
+ Set<Long> defineCodeSet = Lists.newArrayList(codes.split(Constants.COMMA)).stream().map(Long::parseLong)
+ .collect(Collectors.toSet());
List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(defineCodeSet);
if (CollectionUtils.isEmpty(processDefinitionList)) {
logger.info("process definition not exists");
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, codes);
return result;
}
- HashMap<Long, Project> userProjects = new HashMap<>(Constants.DEFAULT_HASH_MAP_SIZE);
+ HashMap<Long, Project> userProjects = new HashMap<>(Constants.DEFAULT_HASH_MAP_SIZE);
projectMapper.queryProjectCreatedAndAuthorizedByUserId(loginUser.getId())
- .forEach(userProject -> userProjects.put(userProject.getCode(), userProject));
+ .forEach(userProject -> userProjects.put(userProject.getCode(), userProject));
// check processDefinition exist in project
List<ProcessDefinition> processDefinitionListInProject = processDefinitionList.stream()
- .filter(o -> userProjects.containsKey(o.getProjectCode())).collect(Collectors.toList());
+ .filter(o -> userProjects.containsKey(o.getProjectCode())).collect(Collectors.toList());
if (CollectionUtils.isEmpty(processDefinitionListInProject)) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, codes);
return result;
@@ -1493,13 +1559,15 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Override
public Map<String, Object> queryAllProcessDefinitionByProjectCode(User loginUser, long projectCode) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_DEFINITION);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_DEFINITION);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
List<ProcessDefinition> processDefinitions = processDefinitionMapper.queryAllDefinitionList(projectCode);
- List<DagData> dagDataList = processDefinitions.stream().map(processService::genDagData).collect(Collectors.toList());
+ List<DagData> dagDataList =
+ processDefinitions.stream().map(processService::genDagData).collect(Collectors.toList());
result.put(Constants.DATA_LIST, dagDataList);
putMsg(result, Status.SUCCESS);
return result;
@@ -1514,7 +1582,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
@Override
public Map<String, Object> queryProcessDefinitionListByProjectCode(long projectCode) {
Map<String, Object> result = new HashMap<>();
- List<DependentSimplifyDefinition> processDefinitions = processDefinitionMapper.queryDefinitionListByProjectCodeAndProcessDefinitionCodes(projectCode, null);
+ List<DependentSimplifyDefinition> processDefinitions =
+ processDefinitionMapper.queryDefinitionListByProjectCodeAndProcessDefinitionCodes(projectCode, null);
result.put(Constants.DATA_LIST, processDefinitions);
putMsg(result, Status.SUCCESS);
return result;
@@ -1528,19 +1597,22 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
* @return task definition list in the process definition
*/
@Override
- public Map<String, Object> queryTaskDefinitionListByProcessDefinitionCode(long projectCode, Long processDefinitionCode) {
+ public Map<String, Object> queryTaskDefinitionListByProcessDefinitionCode(long projectCode,
+ Long processDefinitionCode) {
Map<String, Object> result = new HashMap<>();
Set<Long> definitionCodesSet = new HashSet<>();
definitionCodesSet.add(processDefinitionCode);
- List<DependentSimplifyDefinition> processDefinitions = processDefinitionMapper.queryDefinitionListByProjectCodeAndProcessDefinitionCodes(projectCode, definitionCodesSet);
+ List<DependentSimplifyDefinition> processDefinitions = processDefinitionMapper
+ .queryDefinitionListByProjectCodeAndProcessDefinitionCodes(projectCode, definitionCodesSet);
- //query process task relation
- List<ProcessTaskRelation> processTaskRelations = processTaskRelationMapper.queryProcessTaskRelationsByProcessDefinitionCode(
- processDefinitions.get(0).getCode(),
- processDefinitions.get(0).getVersion());
+ // query process task relation
+ List<ProcessTaskRelation> processTaskRelations =
+ processTaskRelationMapper.queryProcessTaskRelationsByProcessDefinitionCode(
+ processDefinitions.get(0).getCode(),
+ processDefinitions.get(0).getVersion());
- //query task definition log
+ // query task definition log
List<TaskDefinitionLog> taskDefinitionLogsList = processService.genTaskDefineList(processTaskRelations);
List<DependentSimplifyDefinition> taskDefinitionList = new ArrayList<>();
@@ -1566,11 +1638,11 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
* @return tree view json data
*/
@Override
- public Map<String, Object> viewTree(User loginUser,long projectCode, long code, Integer limit) {
+ public Map<String, Object> viewTree(User loginUser, long projectCode, long code, Integer limit) {
Map<String, Object> result = new HashMap<>();
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_TREE_VIEW);
+ // check user access for project
+ result = projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_TREE_VIEW);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -1584,15 +1656,17 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
// nodes that is running
Map<String, List<TreeViewDto>> runningNodeMap = new ConcurrentHashMap<>();
- //nodes that is waiting to run
+ // nodes that is waiting to run
Map<String, List<TreeViewDto>> waitingRunningNodeMap = new ConcurrentHashMap<>();
// List of process instances
List<ProcessInstance> processInstanceList = processInstanceService.queryByProcessDefineCode(code, limit);
- processInstanceList.forEach(processInstance -> processInstance.setDuration(DateUtils.format2Duration(processInstance.getStartTime(), processInstance.getEndTime())));
- List<TaskDefinitionLog> taskDefinitionList = processService.genTaskDefineList(processTaskRelationMapper.queryByProcessCode(processDefinition.getProjectCode(), processDefinition.getCode()));
+ processInstanceList.forEach(processInstance -> processInstance
+ .setDuration(DateUtils.format2Duration(processInstance.getStartTime(), processInstance.getEndTime())));
+ List<TaskDefinitionLog> taskDefinitionList = processService.genTaskDefineList(processTaskRelationMapper
+ .queryByProcessCode(processDefinition.getProjectCode(), processDefinition.getCode()));
Map<Long, TaskDefinitionLog> taskDefinitionMap = taskDefinitionList.stream()
- .collect(Collectors.toMap(TaskDefinitionLog::getCode, taskDefinitionLog -> taskDefinitionLog));
+ .collect(Collectors.toMap(TaskDefinitionLog::getCode, taskDefinitionLog -> taskDefinitionLog));
if (limit > processInstanceList.size()) {
limit = processInstanceList.size();
@@ -1606,9 +1680,12 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
for (int i = limit - 1; i >= 0; i--) {
ProcessInstance processInstance = processInstanceList.get(i);
Date endTime = processInstance.getEndTime() == null ? new Date() : processInstance.getEndTime();
- parentTreeViewDto.getInstances().add(new Instance(processInstance.getId(), processInstance.getName(), processInstance.getProcessDefinitionCode(),
- "", processInstance.getState().toString(), processInstance.getStartTime(), endTime, processInstance.getHost(),
- DateUtils.format2Readable(endTime.getTime() - processInstance.getStartTime().getTime())));
+ parentTreeViewDto.getInstances()
+ .add(new Instance(processInstance.getId(), processInstance.getName(),
+ processInstance.getProcessDefinitionCode(),
+ "", processInstance.getState().toString(), processInstance.getStartTime(), endTime,
+ processInstance.getHost(),
+ DateUtils.format2Readable(endTime.getTime() - processInstance.getStartTime().getTime())));
}
List<TreeViewDto> parentTreeViewDtoList = new ArrayList<>();
@@ -1631,10 +1708,11 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
treeViewDto.setType(taskNode.getType());
treeViewDto.setCode(taskNode.getCode());
treeViewDto.setName(taskNode.getName());
- //set treeViewDto instances
+ // set treeViewDto instances
for (int i = limit - 1; i >= 0; i--) {
ProcessInstance processInstance = processInstanceList.get(i);
- TaskInstance taskInstance = taskInstanceMapper.queryByInstanceIdAndCode(processInstance.getId(), Long.parseLong(nodeCode));
+ TaskInstance taskInstance = taskInstanceMapper.queryByInstanceIdAndCode(processInstance.getId(),
+ Long.parseLong(nodeCode));
if (taskInstance == null) {
treeViewDto.getInstances().add(new Instance(-1, "not running", 0, "null"));
} else {
@@ -1648,9 +1726,12 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
subProcessCode = Long.parseLong(JSONUtils.parseObject(
taskDefinition.getTaskParams()).path(CMD_PARAM_SUB_PROCESS_DEFINE_CODE).asText());
}
- treeViewDto.getInstances().add(new Instance(taskInstance.getId(), taskInstance.getName(), taskInstance.getTaskCode(),
- taskInstance.getTaskType(), taskInstance.getState().toString(), taskInstance.getStartTime(), taskInstance.getEndTime(),
- taskInstance.getHost(), DateUtils.format2Readable(endTime.getTime() - startTime.getTime()), subProcessCode));
+ treeViewDto.getInstances().add(new Instance(taskInstance.getId(), taskInstance.getName(),
+ taskInstance.getTaskCode(),
+ taskInstance.getTaskType(), taskInstance.getState().toString(),
+ taskInstance.getStartTime(), taskInstance.getEndTime(),
+ taskInstance.getHost(),
+ DateUtils.format2Readable(endTime.getTime() - startTime.getTime()), subProcessCode));
}
}
for (TreeViewDto pTreeViewDto : parentTreeViewDtoList) {
@@ -1722,7 +1803,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
long projectCode,
String codes,
long targetProjectCode) {
- Map<String, Object> result = checkParams(loginUser, projectCode, codes, targetProjectCode,WORKFLOW_BATCH_COPY);
+ Map<String, Object> result = checkParams(loginUser, projectCode, codes, targetProjectCode, WORKFLOW_BATCH_COPY);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -1749,7 +1830,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
long projectCode,
String codes,
long targetProjectCode) {
- Map<String, Object> result = checkParams(loginUser, projectCode, codes, targetProjectCode,TASK_DEFINITION_MOVE);
+ Map<String, Object> result =
+ checkParams(loginUser, projectCode, codes, targetProjectCode, TASK_DEFINITION_MOVE);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -1766,10 +1848,10 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
private Map<String, Object> checkParams(User loginUser,
long projectCode,
String processDefinitionCodes,
- long targetProjectCode,String perm) {
+ long targetProjectCode, String perm) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,perm);
+ // check user access for project
+ Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode, perm);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -1781,8 +1863,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
if (projectCode != targetProjectCode) {
Project targetProject = projectMapper.queryByCode(targetProjectCode);
- //check user access for project
- Map<String, Object> targetResult = projectService.checkProjectAndAuth(loginUser, targetProject, targetProjectCode,perm);
+ // check user access for project
+ Map<String, Object> targetResult =
+ projectService.checkProjectAndAuth(loginUser, targetProject, targetProjectCode, perm);
if (targetResult.get(Constants.STATUS) != Status.SUCCESS) {
return targetResult;
}
@@ -1791,21 +1874,26 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
protected void doBatchOperateProcessDefinition(User loginUser,
- long targetProjectCode,
- List<String> failedProcessList,
- String processDefinitionCodes,
- Map<String, Object> result,
- boolean isCopy) {
- Set<Long> definitionCodes = Arrays.stream(processDefinitionCodes.split(Constants.COMMA)).map(Long::parseLong).collect(Collectors.toSet());
+ long targetProjectCode,
+ List<String> failedProcessList,
+ String processDefinitionCodes,
+ Map<String, Object> result,
+ boolean isCopy) {
+ Set<Long> definitionCodes = Arrays.stream(processDefinitionCodes.split(Constants.COMMA)).map(Long::parseLong)
+ .collect(Collectors.toSet());
List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(definitionCodes);
- Set<Long> queryCodes = processDefinitionList.stream().map(ProcessDefinition::getCode).collect(Collectors.toSet());
+ Set<Long> queryCodes =
+ processDefinitionList.stream().map(ProcessDefinition::getCode).collect(Collectors.toSet());
// definitionCodes - queryCodes
- Set<Long> diffCode = definitionCodes.stream().filter(code -> !queryCodes.contains(code)).collect(Collectors.toSet());
+ Set<Long> diffCode =
+ definitionCodes.stream().filter(code -> !queryCodes.contains(code)).collect(Collectors.toSet());
diffCode.forEach(code -> failedProcessList.add(code + "[null]"));
for (ProcessDefinition processDefinition : processDefinitionList) {
List<ProcessTaskRelation> processTaskRelations =
- processTaskRelationMapper.queryByProcessCode(processDefinition.getProjectCode(), processDefinition.getCode());
- List<ProcessTaskRelationLog> taskRelationList = processTaskRelations.stream().map(ProcessTaskRelationLog::new).collect(Collectors.toList());
+ processTaskRelationMapper.queryByProcessCode(processDefinition.getProjectCode(),
+ processDefinition.getCode());
+ List<ProcessTaskRelationLog> taskRelationList =
+ processTaskRelations.stream().map(ProcessTaskRelationLog::new).collect(Collectors.toList());
processDefinition.setProjectCode(targetProjectCode);
String otherParamsJson = doOtherOperateProcess(loginUser, processDefinition);
if (isCopy) {
@@ -1833,7 +1921,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
processTaskRelationLog.setPreTaskCode(taskCodeMap.get(processTaskRelationLog.getPreTaskCode()));
}
if (processTaskRelationLog.getPostTaskCode() > 0) {
- processTaskRelationLog.setPostTaskCode(taskCodeMap.get(processTaskRelationLog.getPostTaskCode()));
+ processTaskRelationLog
+ .setPostTaskCode(taskCodeMap.get(processTaskRelationLog.getPostTaskCode()));
}
}
final long oldProcessDefinitionCode = processDefinition.getCode();
@@ -1859,7 +1948,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
processDefinition.setLocations(JSONUtils.toJsonString(jsonNodes));
}
- //copy timing configuration
+ // copy timing configuration
Schedule scheduleObj = scheduleMapper.queryByProcessDefinitionCode(oldProcessDefinitionCode);
if (scheduleObj != null) {
scheduleObj.setProcessDefinitionCode(processDefinition.getCode());
@@ -1873,14 +1962,16 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
}
try {
- result.putAll(createDagDefine(loginUser, taskRelationList, processDefinition, taskDefinitionLogs, otherParamsJson));
+ result.putAll(createDagDefine(loginUser, taskRelationList, processDefinition, taskDefinitionLogs,
+ otherParamsJson));
} catch (Exception e) {
putMsg(result, Status.COPY_PROCESS_DEFINITION_ERROR);
throw new ServiceException(Status.COPY_PROCESS_DEFINITION_ERROR);
}
} else {
try {
- result.putAll(updateDagDefine(loginUser, taskRelationList, processDefinition, null, Lists.newArrayList(), otherParamsJson));
+ result.putAll(updateDagDefine(loginUser, taskRelationList, processDefinition, null,
+ Lists.newArrayList(), otherParamsJson));
} catch (Exception e) {
putMsg(result, Status.MOVE_PROCESS_DEFINITION_ERROR);
throw new ServiceException(Status.MOVE_PROCESS_DEFINITION_ERROR);
@@ -1902,7 +1993,7 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
StringBuilder newName = new StringBuilder();
String regex = String.format(".*%s\\d{17}$", suffix);
if (originalName.matches(regex)) {
- //replace timestamp of originalName
+ // replace timestamp of originalName
return newName.append(originalName, 0, originalName.lastIndexOf(suffix))
.append(suffix)
.append(DateUtils.getCurrentTimeStamp())
@@ -1925,10 +2016,12 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
*/
@Override
@Transactional
- public Map<String, Object> switchProcessDefinitionVersion(User loginUser, long projectCode, long code, int version) {
+ public Map<String, Object> switchProcessDefinitionVersion(User loginUser, long projectCode, long code,
+ int version) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_SWITCH_TO_THIS_VERSION);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_SWITCH_TO_THIS_VERSION);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -1939,9 +2032,11 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return result;
}
- ProcessDefinitionLog processDefinitionLog = processDefinitionLogMapper.queryByDefinitionCodeAndVersion(code, version);
+ ProcessDefinitionLog processDefinitionLog =
+ processDefinitionLogMapper.queryByDefinitionCodeAndVersion(code, version);
if (Objects.isNull(processDefinitionLog)) {
- putMsg(result, Status.SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_VERSION_ERROR, processDefinition.getCode(), version);
+ putMsg(result, Status.SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_VERSION_ERROR,
+ processDefinition.getCode(), version);
return result;
}
int switchVersion = processService.switchVersion(processDefinition, processDefinitionLog);
@@ -1966,9 +2061,11 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
Map<String, Object> result, List<String> failedProcessList, boolean isCopy) {
if (!failedProcessList.isEmpty()) {
if (isCopy) {
- putMsg(result, Status.COPY_PROCESS_DEFINITION_ERROR, srcProjectCode, targetProjectCode, String.join(",", failedProcessList));
+ putMsg(result, Status.COPY_PROCESS_DEFINITION_ERROR, srcProjectCode, targetProjectCode,
+ String.join(",", failedProcessList));
} else {
- putMsg(result, Status.MOVE_PROCESS_DEFINITION_ERROR, srcProjectCode, targetProjectCode, String.join(",", failedProcessList));
+ putMsg(result, Status.MOVE_PROCESS_DEFINITION_ERROR, srcProjectCode, targetProjectCode,
+ String.join(",", failedProcessList));
}
} else {
putMsg(result, Status.SUCCESS);
@@ -1986,11 +2083,13 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
* @return the pagination process definition versions info of the certain process definition
*/
@Override
- public Result queryProcessDefinitionVersions(User loginUser, long projectCode, int pageNo, int pageSize, long code) {
+ public Result queryProcessDefinitionVersions(User loginUser, long projectCode, int pageNo, int pageSize,
+ long code) {
Result result = new Result();
Project project = projectMapper.queryByCode(projectCode);
// check user access for project
- Map<String, Object> checkResult = projectService.checkProjectAndAuth(loginUser, project, projectCode,VERSION_LIST);
+ Map<String, Object> checkResult =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, VERSION_LIST);
Status resultStatus = (Status) checkResult.get(Constants.STATUS);
if (resultStatus != Status.SUCCESS) {
putMsg(result, resultStatus);
@@ -1998,7 +2097,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
PageInfo<ProcessDefinitionLog> pageInfo = new PageInfo<>(pageNo, pageSize);
Page<ProcessDefinitionLog> page = new Page<>(pageNo, pageSize);
- IPage<ProcessDefinitionLog> processDefinitionVersionsPaging = processDefinitionLogMapper.queryProcessDefinitionVersionsPaging(page, code, projectCode);
+ IPage<ProcessDefinitionLog> processDefinitionVersionsPaging =
+ processDefinitionLogMapper.queryProcessDefinitionVersionsPaging(page, code, projectCode);
List<ProcessDefinitionLog> processDefinitionLogs = processDefinitionVersionsPaging.getRecords();
pageInfo.setTotalList(processDefinitionLogs);
@@ -2008,7 +2108,6 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return result;
}
-
/**
* delete one certain process definition by version number and process definition code
*
@@ -2020,10 +2119,12 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
*/
@Override
@Transactional
- public Map<String, Object> deleteProcessDefinitionVersion(User loginUser, long projectCode, long code, int version) {
+ public Map<String, Object> deleteProcessDefinitionVersion(User loginUser, long projectCode, long code,
+ int version) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,VERSION_DELETE);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, VERSION_DELETE);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -2073,8 +2174,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
String scheduleJson,
ProcessExecutionTypeEnum executionType) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_CREATE);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_CREATE);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -2102,8 +2204,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
putMsg(result, Status.INTERNAL_SERVER_ERROR_ARGS);
return result;
}
- ProcessDefinition processDefinition = new ProcessDefinition(projectCode, name, processDefinitionCode, description,
- globalParams, "", timeout, loginUser.getId(), tenantId);
+ ProcessDefinition processDefinition =
+ new ProcessDefinition(projectCode, name, processDefinitionCode, description,
+ globalParams, "", timeout, loginUser.getId(), tenantId);
processDefinition.setExecutionType(executionType);
result = createEmptyDagDefine(loginUser, processDefinition);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
@@ -2136,7 +2239,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return result;
}
- protected Map<String, Object> createDagSchedule(User loginUser, ProcessDefinition processDefinition, String scheduleJson) {
+ protected Map<String, Object> createDagSchedule(User loginUser, ProcessDefinition processDefinition,
+ String scheduleJson) {
Map<String, Object> result = new HashMap<>();
Schedule scheduleObj = JSONUtils.parseObject(scheduleJson, Schedule.class);
if (scheduleObj == null) {
@@ -2155,16 +2259,20 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, scheduleObj.getCrontab());
return result;
}
- scheduleObj.setWarningType(scheduleObj.getWarningType() == null ? WarningType.NONE : scheduleObj.getWarningType());
+ scheduleObj
+ .setWarningType(scheduleObj.getWarningType() == null ? WarningType.NONE : scheduleObj.getWarningType());
scheduleObj.setWarningGroupId(scheduleObj.getWarningGroupId() == 0 ? 1 : scheduleObj.getWarningGroupId());
- scheduleObj.setFailureStrategy(scheduleObj.getFailureStrategy() == null ? FailureStrategy.CONTINUE : scheduleObj.getFailureStrategy());
+ scheduleObj.setFailureStrategy(
+ scheduleObj.getFailureStrategy() == null ? FailureStrategy.CONTINUE : scheduleObj.getFailureStrategy());
scheduleObj.setCreateTime(now);
scheduleObj.setUpdateTime(now);
scheduleObj.setUserId(loginUser.getId());
scheduleObj.setReleaseState(ReleaseState.OFFLINE);
- scheduleObj.setProcessInstancePriority(scheduleObj.getProcessInstancePriority() == null ? Priority.MEDIUM : scheduleObj.getProcessInstancePriority());
+ scheduleObj.setProcessInstancePriority(scheduleObj.getProcessInstancePriority() == null ? Priority.MEDIUM
+ : scheduleObj.getProcessInstancePriority());
scheduleObj.setWorkerGroup(scheduleObj.getWorkerGroup() == null ? "default" : scheduleObj.getWorkerGroup());
- scheduleObj.setEnvironmentCode(scheduleObj.getEnvironmentCode() == null ? -1 : scheduleObj.getEnvironmentCode());
+ scheduleObj
+ .setEnvironmentCode(scheduleObj.getEnvironmentCode() == null ? -1 : scheduleObj.getEnvironmentCode());
scheduleMapper.insert(scheduleObj);
putMsg(result, Status.SUCCESS);
@@ -2202,8 +2310,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
String otherParamsJson,
ProcessExecutionTypeEnum executionType) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_UPDATE);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_UPDATE);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -2237,11 +2346,14 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
return result;
}
}
- ProcessDefinition processDefinitionDeepCopy = JSONUtils.parseObject(JSONUtils.toJsonString(processDefinition), ProcessDefinition.class);
+ ProcessDefinition processDefinitionDeepCopy =
+ JSONUtils.parseObject(JSONUtils.toJsonString(processDefinition), ProcessDefinition.class);
processDefinition.set(projectCode, name, description, globalParams, "", timeout, tenantId);
processDefinition.setExecutionType(executionType);
- List<ProcessTaskRelationLog> taskRelationList = processTaskRelationLogMapper.queryByProcessCodeAndVersion(processDefinition.getCode(), processDefinition.getVersion());
- result = updateDagDefine(loginUser, taskRelationList, processDefinition, processDefinitionDeepCopy, Lists.newArrayList(), otherParamsJson);
+ List<ProcessTaskRelationLog> taskRelationList = processTaskRelationLogMapper
+ .queryByProcessCodeAndVersion(processDefinition.getCode(), processDefinition.getVersion());
+ result = updateDagDefine(loginUser, taskRelationList, processDefinition, processDefinitionDeepCopy,
+ Lists.newArrayList(), otherParamsJson);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -2260,9 +2372,9 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
protected Map<String, Object> updateDagSchedule(User loginUser,
- long projectCode,
- long processDefinitionCode,
- String scheduleJson) {
+ long projectCode,
+ long processDefinitionCode,
+ String scheduleJson) {
Map<String, Object> result = new HashMap<>();
Schedule schedule = JSONUtils.parseObject(scheduleJson, Schedule.class);
if (schedule == null) {
@@ -2270,9 +2382,11 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
throw new ServiceException(Status.DATA_IS_NOT_VALID);
}
// set default value
- FailureStrategy failureStrategy = schedule.getFailureStrategy() == null ? FailureStrategy.CONTINUE : schedule.getFailureStrategy();
+ FailureStrategy failureStrategy =
+ schedule.getFailureStrategy() == null ? FailureStrategy.CONTINUE : schedule.getFailureStrategy();
WarningType warningType = schedule.getWarningType() == null ? WarningType.NONE : schedule.getWarningType();
- Priority processInstancePriority = schedule.getProcessInstancePriority() == null ? Priority.MEDIUM : schedule.getProcessInstancePriority();
+ Priority processInstancePriority =
+ schedule.getProcessInstancePriority() == null ? Priority.MEDIUM : schedule.getProcessInstancePriority();
int warningGroupId = schedule.getWarningGroupId() == 0 ? 1 : schedule.getWarningGroupId();
String workerGroup = schedule.getWorkerGroup() == null ? "default" : schedule.getWorkerGroup();
long environmentCode = schedule.getEnvironmentCode() == null ? -1 : schedule.getEnvironmentCode();
@@ -2284,16 +2398,16 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
param.setTimezoneId(schedule.getTimezoneId());
return schedulerService.updateScheduleByProcessDefinitionCode(
- loginUser,
- projectCode,
- processDefinitionCode,
- JSONUtils.toJsonString(param),
- warningType,
- warningGroupId,
- failureStrategy,
- processInstancePriority,
- workerGroup,
- environmentCode);
+ loginUser,
+ projectCode,
+ processDefinitionCode,
+ JSONUtils.toJsonString(param),
+ warningType,
+ warningGroupId,
+ failureStrategy,
+ processInstancePriority,
+ workerGroup,
+ environmentCode);
}
/**
@@ -2307,10 +2421,12 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
*/
@Transactional
@Override
- public Map<String, Object> releaseWorkflowAndSchedule(User loginUser, long projectCode, long code, ReleaseState releaseState) {
+ public Map<String, Object> releaseWorkflowAndSchedule(User loginUser, long projectCode, long code,
+ ReleaseState releaseState) {
Project project = projectMapper.queryByCode(projectCode);
- //check user access for project
- Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,WORKFLOW_ONLINE_OFFLINE);
+ // check user access for project
+ Map<String, Object> result =
+ projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_ONLINE_OFFLINE);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
@@ -2332,7 +2448,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
}
switch (releaseState) {
case ONLINE:
- List<ProcessTaskRelation> relationList = processService.findRelationByCode(code, processDefinition.getVersion());
+ List<ProcessTaskRelation> relationList =
+ processService.findRelationByCode(code, processDefinition.getVersion());
if (CollectionUtils.isEmpty(relationList)) {
putMsg(result, Status.PROCESS_DAG_IS_EMPTY);
return result;
@@ -2345,7 +2462,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
processDefinition.setReleaseState(releaseState);
int updateProcess = processDefinitionMapper.updateById(processDefinition);
if (updateProcess > 0) {
- logger.info("set schedule offline, project code: {}, schedule id: {}, process definition code: {}", projectCode, scheduleObj.getId(), code);
+ logger.info("set schedule offline, project code: {}, schedule id: {}, process definition code: {}",
+ projectCode, scheduleObj.getId(), code);
// set status
scheduleObj.setReleaseState(ReleaseState.OFFLINE);
int updateSchedule = scheduleMapper.updateById(scheduleObj);
@@ -2372,7 +2490,8 @@ public class ProcessDefinitionServiceImpl extends BaseServiceImpl implements Pro
* @param otherParamsJson
*/
@Override
- public void saveOtherRelation(User loginUser, ProcessDefinition processDefinition, Map<String, Object> result, String otherParamsJson) {
+ public void saveOtherRelation(User loginUser, ProcessDefinition processDefinition, Map<String, Object> result,
+ String otherParamsJson) {
}
diff --git a/dolphinscheduler-api/src/main/resources/application.yaml b/dolphinscheduler-api/src/main/resources/application.yaml
index 642b7acbbc..23db3389f1 100644
--- a/dolphinscheduler-api/src/main/resources/application.yaml
+++ b/dolphinscheduler-api/src/main/resources/application.yaml
@@ -65,7 +65,7 @@ spring:
properties:
org.quartz.threadPool:threadPriority: 5
org.quartz.jobStore.isClustered: true
- org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX
+ org.quartz.jobStore.class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
org.quartz.scheduler.instanceId: AUTO
org.quartz.jobStore.tablePrefix: QRTZ_
org.quartz.jobStore.acquireTriggersWithinLock: true
diff --git a/dolphinscheduler-bom/pom.xml b/dolphinscheduler-bom/pom.xml
index e142747ee7..6c4540d028 100644
--- a/dolphinscheduler-bom/pom.xml
+++ b/dolphinscheduler-bom/pom.xml
@@ -15,7 +15,6 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -25,12 +24,12 @@
<version>dev-SNAPSHOT</version>
</parent>
<artifactId>dolphinscheduler-bom</artifactId>
- <name>${project.artifactId}</name>
<packaging>pom</packaging>
-
+ <name>${project.artifactId}</name>
+
<properties>
<netty.version>4.1.53.Final</netty.version>
- <spring-boot.version>2.5.6</spring-boot.version>
+ <spring-boot.version>2.6.1</spring-boot.version>
<spring.version>5.3.19</spring.version>
<java-websocket.version>1.5.1</java-websocket.version>
<mybatis-plus.version>3.2.0</mybatis-plus.version>
@@ -49,7 +48,7 @@
<commons-collections4.version>4.1</commons-collections4.version>
<httpclient.version>4.5.13</httpclient.version>
<httpcore.version>4.4.15</httpcore.version>
- <jackson.version>2.10.5</jackson.version>
+ <jackson.version>2.13.0</jackson.version>
<protostuff.version>1.7.2</protostuff.version>
<byte-buddy.version>1.9.16</byte-buddy.version>
<logback.version>1.2.11</logback.version>
@@ -83,15 +82,15 @@
<commons-compress.version>1.21</commons-compress.version>
<commons-math3.version>3.1.1</commons-math3.version>
<error_prone_annotations.version>2.5.1</error_prone_annotations.version>
- <kubernetes.version>5.8.0</kubernetes.version>
+ <kubernetes.version>5.10.2</kubernetes.version>
<hibernate-validator.version>6.2.2.Final</hibernate-validator.version>
<aws-sdk.version>1.12.160</aws-sdk.version>
<joda-time.version>2.10.13</joda-time.version>
<okhttp.version>3.14.9</okhttp.version>
<json-path.version>2.7.0</json-path.version>
-
+ <spring-cloud-dependencies.version>2021.0.3</spring-cloud-dependencies.version>
</properties>
-
+
<dependencyManagement>
<dependencies>
<!-- netty -->
@@ -99,15 +98,15 @@
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>${netty.version}</version>
- <scope>import</scope>
<type>pom</type>
+ <scope>import</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>${netty.version}</version>
</dependency>
-
+
<!-- spring -->
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -147,7 +146,7 @@
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>org.java-websocket</groupId>
<artifactId>Java-WebSocket</artifactId>
@@ -169,7 +168,7 @@
<artifactId>mybatis-plus-annotation</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
-
+
<!-- quartz-->
<dependency>
<groupId>org.quartz-scheduler</groupId>
@@ -181,13 +180,13 @@
<artifactId>cron-utils</artifactId>
<version>${cron-utils.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>${druid.version}</version>
</dependency>
-
+
<!-- Zookeeper -->
<dependency>
<groupId>org.apache.zookeeper</groupId>
@@ -199,8 +198,8 @@
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
- <artifactId>netty</artifactId>
<groupId>io.netty</groupId>
+ <artifactId>netty</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.spotbugs</groupId>
@@ -246,7 +245,7 @@
<artifactId>curator-test</artifactId>
<version>${curator-test.version}</version>
</dependency>
-
+
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
@@ -282,7 +281,7 @@
<artifactId>commons-email</artifactId>
<version>${commons-email.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
@@ -309,7 +308,7 @@
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
-
+
<!--protostuff-->
<dependency>
<groupId>io.protostuff</groupId>
@@ -321,33 +320,33 @@
<artifactId>protostuff-runtime</artifactId>
<version>${protostuff.version}</version>
</dependency>
-
+
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${byte-buddy.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>${reflections.version}</version>
</dependency>
-
+
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql-connector.version}</version>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>${oracle-jdbc.version}</version>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
@@ -375,7 +374,7 @@
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
</dependency>
-
+
<!--excel poi-->
<dependency>
<groupId>org.apache.poi</groupId>
@@ -387,7 +386,7 @@
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
-
+
<!-- hadoop -->
<dependency>
<groupId>org.apache.hadoop</groupId>
@@ -395,12 +394,12 @@
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
- <artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
- <artifactId>com.sun.jersey</artifactId>
<groupId>jersey-json</groupId>
+ <artifactId>com.sun.jersey</artifactId>
</exclusion>
<exclusion>
<groupId>junit</groupId>
@@ -427,37 +426,37 @@
<artifactId>hadoop-yarn-common</artifactId>
<version>${hadoop.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>${commons-collections4.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
-
+
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>${hive-jdbc.version}</version>
</dependency>
-
+
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
@@ -477,31 +476,31 @@
</exclusion>
</exclusions>
</dependency>
-
+
<dependency>
<groupId>ru.yandex.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>
<version>${clickhouse-jdbc.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>${mssql-jdbc.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-jdbc</artifactId>
<version>${presto-jdbc.version}</version>
</dependency>
-
+
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet-api.version}</version>
</dependency>
-
+
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
@@ -512,49 +511,49 @@
<artifactId>springfox-swagger2</artifactId>
<version>${springfox.version}</version>
</dependency>
-
+
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox.version}</version>
</dependency>
-
+
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>${swagger-models.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.github.rholder</groupId>
<artifactId>guava-retrying</artifactId>
<version>${guava-retry.version}</version>
</dependency>
-
+
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${activation.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>${javax-mail}</version>
</dependency>
-
+
<dependency>
<groupId>net.sf.py4j</groupId>
<artifactId>py4j</artifactId>
<version>${py4j.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
@@ -575,7 +574,7 @@
<artifactId>error_prone_annotations</artifactId>
<version>${error_prone_annotations.version}</version>
</dependency>
-
+
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client</artifactId>
@@ -587,7 +586,7 @@
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-emr</artifactId>
@@ -598,26 +597,33 @@
<artifactId>joda-time</artifactId>
<version>${joda-time.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>${aws-sdk.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>${okhttp.version}</version>
</dependency>
-
+
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>${json-path.version}</version>
</dependency>
-
+
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-dependencies</artifactId>
+ <version>${spring-cloud-dependencies.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
</dependencies>
-
+
</dependencyManagement>
-</project>
\ No newline at end of file
+</project>
diff --git a/dolphinscheduler-dist/release-docs/LICENSE b/dolphinscheduler-dist/release-docs/LICENSE
index e688d655dc..0771979158 100644
--- a/dolphinscheduler-dist/release-docs/LICENSE
+++ b/dolphinscheduler-dist/release-docs/LICENSE
@@ -218,7 +218,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
accessors-smart 2.4.7: https://github.com/netplex/json-smart-v2, Apache 2.0
apacheds-i18n 2.0.0-M15: https://mvnrepository.com/artifact/org.apache.directory.server/apacheds-i18n/2.0.0-M15, Apache 2.0
apacheds-kerberos-codec 2.0.0-M15: https://mvnrepository.com/artifact/org.apache.directory.server/apacheds-kerberos-codec/2.0.0-M15, Apache 2.0
- tomcat-embed-el 9.0.54: https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-el/9.0.54, Apache 2.0
+ tomcat-embed-el 9.0.55: https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-el/9.0.55, Apache 2.0
api-asn1-api 1.0.0-M20: https://mvnrepository.com/artifact/org.apache.directory.api/api-asn1-api/1.0.0-M20, Apache 2.0
api-util 1.0.0-M20: https://mvnrepository.com/artifact/org.apache.directory.api/api-util/1.0.0-M20, Apache 2.0
audience-annotations 0.5.0: https://mvnrepository.com/artifact/org.apache.yetus/audience-annotations/0.5.0, Apache 2.0
@@ -255,7 +255,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
derby 10.14.2.0: https://github.com/apache/derby, Apache 2.0
druid 1.1.14: https://mvnrepository.com/artifact/com.alibaba/druid/1.1.14, Apache 2.0
error_prone_annotations 2.1.3 https://mvnrepository.com/artifact/com.google.errorprone/error_prone_annotations/2.1.3, Apache 2.0
- gson 2.8.8: https://github.com/google/gson, Apache 2.0
+ gson 2.8.9: https://github.com/google/gson, Apache 2.0
guava 24.1-jre: https://mvnrepository.com/artifact/com.google.guava/guava/24.1-jre, Apache 2.0
guava-retrying 2.0.0: https://mvnrepository.com/artifact/com.github.rholder/guava-retrying/2.0.0, Apache 2.0
hadoop-annotations 2.7.3:https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-annotations/2.7.3, Apache 2.0
@@ -284,14 +284,14 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
httpclient 4.5.13: https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.13, Apache 2.0
httpcore 4.4.15: https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore/4.4.15, Apache 2.0
httpmime 4.5.13: https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime/4.5.13, Apache 2.0
- jackson-annotations 2.10.5: https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations/2.10.5, Apache 2.0
- jackson-core 2.10.5: https://github.com/FasterXML/jackson-core, Apache 2.0
+ jackson-annotations 2.13.0: https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations/2.13.0, Apache 2.0
+ jackson-core 2.13.0: https://github.com/FasterXML/jackson-core, Apache 2.0
jackson-core-asl 1.9.13: https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-core-asl/1.9.13, Apache 2.0
- jackson-databind 2.10.5: https://github.com/FasterXML/jackson-databind, Apache 2.0
- jackson-datatype-jdk8 2.12.5: https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.12.5, Apache 2.0
- jackson-datatype-jsr310 2.12.5: https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.12.5, Apache 2.0
+ jackson-databind 2.13.0: https://github.com/FasterXML/jackson-databind, Apache 2.0
+ jackson-datatype-jdk8 2.13.0: https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.13.0, Apache 2.0
+ jackson-datatype-jsr310 2.13.0: https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.13.0, Apache 2.0
jackson-mapper-asl 1.9.13: https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-mapper-asl/1.9.13, Apache 2.0
- jackson-module-parameter-names 2.12.5: https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-parameter-names/2.12.5, Apache 2.0
+ jackson-module-parameter-names 2.13.0: https://mvnrepository.com/artifact/com.fasterxml.jackson.module/jackson-module-parameter-names/2.13.0, Apache 2.0
javax.jdo-3.2.0-m3: https://mvnrepository.com/artifact/org.datanucleus/javax.jdo/3.2.0-m3, Apache 2.0
java-xmlbuilder 0.4 : https://mvnrepository.com/artifact/com.jamesmurty.utils/java-xmlbuilder/0.4, Apache 2.0
jdo-api 3.0.1: https://mvnrepository.com/artifact/javax.jdo/jdo-api/3.0.1, Apache 2.0
@@ -346,27 +346,27 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
snappy 0.2: https://mvnrepository.com/artifact/org.iq80.snappy/snappy/0.2, Apache 2.0
snappy-java 1.0.4.1: https://github.com/xerial/snappy-java, Apache 2.0
SparseBitSet 1.2: https://mvnrepository.com/artifact/com.zaxxer/SparseBitSet/1.2, Apache 2.0
- spring-aop 5.3.12: https://mvnrepository.com/artifact/org.springframework/spring-aop/5.3.12, Apache 2.0
+ spring-aop 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-aop/5.3.13, Apache 2.0
spring-beans 5.3.19: https://mvnrepository.com/artifact/org.springframework/spring-beans/5.3.19, Apache 2.0
- spring-boot 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot/2.5.6, Apache 2.0
- spring-boot-actuator 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-actuator/2.5.6, Apache 2.0
- spring-boot-actuator-autoconfigure 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-actuator-autoconfigure/2.5.6, Apache 2.0
- spring-boot-configuration-processor 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor/2.5.6, Apache 2.0
- spring-boot-autoconfigure 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure/2.5.6, Apache 2.0
- spring-boot-starter 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter/2.5.6, Apache 2.0
- spring-boot-starter-actuator 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator/2.5.6, Apache 2.0
- spring-boot-starter-aop 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-aop/2.5.6, Apache 2.0
- spring-boot-starter-jdbc 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jdbc/2.5.6, Apache 2.0
- spring-boot-starter-jetty 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jetty/2.5.6, Apache 2.0
- spring-boot-starter-json 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-json/2.5.6, Apache 2.0
- spring-boot-starter-logging 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-logging/2.5.6, Apache 2.0
- spring-boot-starter-quartz 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-quartz/2.5.6, Apache 2.0
- spring-boot-starter-web 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web/2.5.6, Apache 2.0
- spring-boot-starter-cache 2.5.6: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-cache/2.5.6, Apache 2.0
+ spring-boot 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot/2.6.1, Apache 2.0
+ spring-boot-actuator 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-actuator/2.6.1, Apache 2.0
+ spring-boot-actuator-autoconfigure 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-actuator-autoconfigure/2.6.1, Apache 2.0
+ spring-boot-configuration-processor 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-configuration-processor/2.6.1, Apache 2.0
+ spring-boot-autoconfigure 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure/2.6.1, Apache 2.0
+ spring-boot-starter 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter/2.6.1, Apache 2.0
+ spring-boot-starter-actuator 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-actuator/2.6.1, Apache 2.0
+ spring-boot-starter-aop 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-aop/2.6.1, Apache 2.0
+ spring-boot-starter-jdbc 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jdbc/2.6.1, Apache 2.0
+ spring-boot-starter-jetty 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jetty/2.6.1, Apache 2.0
+ spring-boot-starter-json 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-json/2.6.1, Apache 2.0
+ spring-boot-starter-logging 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-logging/2.6.1, Apache 2.0
+ spring-boot-starter-quartz 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-quartz/2.6.1, Apache 2.0
+ spring-boot-starter-web 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web/2.6.1, Apache 2.0
+ spring-boot-starter-cache 2.6.1: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-cache/2.6.1, Apache 2.0
spring-context 5.3.19: https://mvnrepository.com/artifact/org.springframework/spring-context/5.3.19, Apache 2.0
- spring-context-support 5.3.12: https://mvnrepository.com/artifact/org.springframework/spring-context-support/5.3.12, Apache 2.0
+ spring-context-support 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-context-support/5.3.13, Apache 2.0
spring-core 5.3.19: https://mvnrepository.com/artifact/org.springframework/spring-core/5.3.19, Apache 2.0
- spring-expression 5.3.12: https://mvnrepository.com/artifact/org.springframework/spring-expression/5.3.12, Apache 2.0
+ spring-expression 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-expression/5.3.13, Apache 2.0
springfox-core 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-core/2.9.2, Apache 2.0
springfox-schema 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-schema/2.9.2, Apache 2.0
springfox-spi 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-spi/2.9.2, Apache 2.0
@@ -374,18 +374,18 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
springfox-swagger2 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-swagger2/2.9.2, Apache 2.0
springfox-swagger-common 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-swagger-common/2.9.2, Apache 2.0
springfox-swagger-ui 2.9.2: https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui/2.9.2, Apache 2.0
- spring-jcl 5.3.12: https://mvnrepository.com/artifact/org.springframework/spring-jcl/5.3.12, Apache 2.0
+ spring-jcl 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-jcl/5.3.13, Apache 2.0
spring-jdbc 5.3.19: https://mvnrepository.com/artifact/org.springframework/spring-jdbc/5.3.19, Apache 2.0
spring-plugin-core 1.2.0.RELEASE: https://mvnrepository.com/artifact/org.springframework.plugin/spring-plugin-core/1.2.0.RELEASE, Apache 2.0
spring-plugin-metadata 1.2.0.RELEASE: https://mvnrepository.com/artifact/org.springframework.plugin/spring-plugin-metadata/1.2.0.RELEASE, Apache 2.0
spring-tx 5.3.19: https://mvnrepository.com/artifact/org.springframework/spring-tx/5.3.19, Apache 2.0
- spring-web 5.3.12: https://mvnrepository.com/artifact/org.springframework/spring-web/5.3.12, Apache 2.0
- spring-webmvc 5.3.12: https://mvnrepository.com/artifact/org.springframework/spring-webmvc/5.3.12, Apache 2.0
+ spring-web 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-web/5.3.13, Apache 2.0
+ spring-webmvc 5.3.13: https://mvnrepository.com/artifact/org.springframework/spring-webmvc/5.3.13, Apache 2.0
swagger-annotations 1.5.20: https://mvnrepository.com/artifact/io.swagger/swagger-annotations/1.5.20, Apache 2.0
swagger-bootstrap-ui 1.9.3: https://mvnrepository.com/artifact/com.github.xiaoymin/swagger-bootstrap-ui/1.9.3, Apache 2.0
swagger-models 1.5.24: https://mvnrepository.com/artifact/io.swagger/swagger-models/1.5.24, Apache 2.0
tephra-api 0.6.0: https://mvnrepository.com/artifact/co.cask.tephra/tephra-api/0.6.0, Apache 2.0
- tomcat-embed-el 9.0.54: https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-el/9.0.54, Apache 2.0
+ tomcat-embed-el 9.0.55: https://mvnrepository.com/artifact/org.apache.tomcat.embed/tomcat-embed-el/9.0.55, Apache 2.0
xercesImpl 2.9.1: https://mvnrepository.com/artifact/xerces/xercesImpl/2.9.1, Apache 2.0
xmlbeans 3.1.0: https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans/3.1.0, Apache 2.0
xml-apis 1.3.04: https://mvnrepository.com/artifact/xml-apis/xml-apis/1.3.04, Apache 2.0 and W3C
@@ -397,30 +397,30 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
protostuff-collectionschema 1.7.2: https://github.com/protostuff/protostuff/protostuff-collectionschema Apache-2.0
prometheus client_java(simpleclient) 0.12.0: https://github.com/prometheus/client_java, Apache 2.0
snowflake snowflake-2010: https://github.com/twitter-archive/snowflake/tree/snowflake-2010, Apache 2.0
- kubernetes-client 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-client/5.8.0, Apache 2.0
- kubernetes-model-admissionregistration 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-admissionregistration/5.8.0, Apache 2.0
- kubernetes-model-apiextensions 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-apiextensions/5.8.0, Apache 2.0
- kubernetes-model-apps 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-apps/5.8.0, Apache 2.0
- kubernetes-model-autoscaling 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-autoscaling/5.8.0, Apache 2.0
- kubernetes-model-batch 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-autoscaling/5.8.0, Apache 2.0
- kubernetes-model-certificates 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-certificates/5.8.0, Apache 2.0
- kubernetes-model-common 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-common/5.8.0, Apache 2.0
- kubernetes-model-coordination 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-coordination/5.8.0, Apache 2.0
- kubernetes-model-core 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-core/5.8.0, Apache 2.0
- kubernetes-model-discovery 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-discovery/5.8.0, Apache 2.0
- kubernetes-model-events 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-events/5.8.0, Apache 2.0
- kubernetes-model-extensions 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-extensions/5.8.0, Apache 2.0
- kubernetes-model-flowcontrol 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-flowcontrol/5.8.0, Apache 2.0
- kubernetes-model-metrics 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-metrics/5.8.0, Apache 2.0
- kubernetes-model-networking 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-networking/5.8.0, Apache 2.0
- kubernetes-model-node 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-node/5.8.0, Apache 2.0
- kubernetes-model-policy 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-policy/5.8.0, Apache 2.0
- kubernetes-model-rbac 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-rbac/5.8.0, Apache 2.0
- kubernetes-model-scheduling 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-scheduling/5.8.0, Apache 2.0
- kubernetes-model-storageclass 5.8.0: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-storageclass/5.8.0, Apache 2.0
+ kubernetes-client 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-client/5.10.2, Apache 2.0
+ kubernetes-model-admissionregistration 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-admissionregistration/5.10.2, Apache 2.0
+ kubernetes-model-apiextensions 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-apiextensions/5.10.2, Apache 2.0
+ kubernetes-model-apps 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-apps/5.10.2, Apache 2.0
+ kubernetes-model-autoscaling 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-autoscaling/5.10.2, Apache 2.0
+ kubernetes-model-batch 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-autoscaling/5.10.2, Apache 2.0
+ kubernetes-model-certificates 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-certificates/5.10.2, Apache 2.0
+ kubernetes-model-common 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-common/5.10.2, Apache 2.0
+ kubernetes-model-coordination 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-coordination/5.10.2, Apache 2.0
+ kubernetes-model-core 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-core/5.10.2, Apache 2.0
+ kubernetes-model-discovery 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-discovery/5.10.2, Apache 2.0
+ kubernetes-model-events 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-events/5.10.2, Apache 2.0
+ kubernetes-model-extensions 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-extensions/5.10.2, Apache 2.0
+ kubernetes-model-flowcontrol 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-flowcontrol/5.10.2, Apache 2.0
+ kubernetes-model-metrics 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-metrics/5.10.2, Apache 2.0
+ kubernetes-model-networking 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-networking/5.10.2, Apache 2.0
+ kubernetes-model-node 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-node/5.10.2, Apache 2.0
+ kubernetes-model-policy 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-policy/5.10.2, Apache 2.0
+ kubernetes-model-rbac 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-rbac/5.10.2, Apache 2.0
+ kubernetes-model-scheduling 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-scheduling/5.10.2, Apache 2.0
+ kubernetes-model-storageclass 5.10.2: https://mvnrepository.com/artifact/io.fabric8/kubernetes-model-storageclass/5.10.2, Apache 2.0
zjsonpatch 0.3.0 https://mvnrepository.com/artifact/io.fabric8/zjsonpatch/0.3.0, Apache 2.0
generex 1.0.2 https://mvnrepository.com/artifact/com.github.mifmif/generex/1.0.2, Apache 2.0
- jackson-dataformat-yaml 2.12.5 https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.12.5, Apache 2.0
+ jackson-dataformat-yaml 2.13.0 https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.13.0, Apache 2.0
logging-interceptor 3.14.9 https://mvnrepository.com/artifact/com.squareup.okhttp3/logging-interceptor/3.14.9, Apache 2.0
okhttp 3.14.3 https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp/3.14.3, Apache 2.0
okio 1.17.2 https://mvnrepository.com/artifact/com.squareup.okio/okio/1.17.2, Apache 2.0
@@ -429,7 +429,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
jboss-logging:jar 3.4.2.Final https://mvnrepository.com/artifact/org.jboss.logging/jboss-logging/3.4.2.Final, Apache 2.0
ion-java 1.0.2 https://mvnrepository.com/artifact/software.amazon.ion/ion-java/1.0.2 Apache 2.0
jmespath-java 1.12.160 https://mvnrepository.com/artifact/com.amazonaws/jmespath-java/1.12.160 Apache 2.0
- jackson-dataformat-cbor 2.12.5 https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/2.12.5 Apache 2.0
+ jackson-dataformat-cbor 2.13.0 https://mvnrepository.com/artifact/com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/2.13.0 Apache 2.0
aws-java-sdk-emr 1.12.160 https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-emr/1.12.160 Apache 2.0
aws-java-sdk-core 1.12.160 https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-core/1.12.160 Apache 2.0
aws-java-sdk-s3 1.12.160 https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-s3/1.12.160 Apache 2.0
diff --git a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
index 9ea9b6574b..ed4d6fb956 100644
--- a/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
+++ b/dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
@@ -38,6 +38,7 @@ import org.apache.dolphinscheduler.server.master.runner.task.TaskInstanceKey;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
@@ -79,6 +80,7 @@ public class StateWheelExecuteThread extends BaseDaemonThread {
@Autowired
private MasterConfig masterConfig;
+ @Lazy
@Autowired
private WorkflowExecuteThreadPool workflowExecuteThreadPool;
diff --git a/dolphinscheduler-master/src/main/resources/application.yaml b/dolphinscheduler-master/src/main/resources/application.yaml
index 9f191ccd25..ebb767912c 100644
--- a/dolphinscheduler-master/src/main/resources/application.yaml
+++ b/dolphinscheduler-master/src/main/resources/application.yaml
@@ -56,7 +56,7 @@ spring:
properties:
org.quartz.threadPool:threadPriority: 5
org.quartz.jobStore.isClustered: true
- org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX
+ org.quartz.jobStore.class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
org.quartz.scheduler.instanceId: AUTO
org.quartz.jobStore.tablePrefix: QRTZ_
org.quartz.jobStore.acquireTriggersWithinLock: true
diff --git a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
index 94618cbb42..4e2b898213 100644
--- a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
+++ b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
@@ -266,9 +266,6 @@ public class ProcessServiceImpl implements ProcessService {
@Autowired
private CuringParamsService curingGlobalParamsService;
- @Autowired
- private ProcessService processService;
-
/**
* handle Command (construct ProcessInstance from Command) , wrapped in transaction
*
@@ -1268,7 +1265,7 @@ public class ProcessServiceImpl implements ProcessService {
try {
// submit task to db
// Only want to use transaction here
- task = processService.submitTask(processInstance, taskInstance);
+ task = submitTask(processInstance, taskInstance);
if (task != null && task.getId() != 0) {
break;
}
diff --git a/dolphinscheduler-standalone-server/pom.xml b/dolphinscheduler-standalone-server/pom.xml
index dd4d756065..83b6b3b5e2 100644
--- a/dolphinscheduler-standalone-server/pom.xml
+++ b/dolphinscheduler-standalone-server/pom.xml
@@ -15,18 +15,29 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>dolphinscheduler</artifactId>
<groupId>org.apache.dolphinscheduler</groupId>
+ <artifactId>dolphinscheduler</artifactId>
<version>dev-SNAPSHOT</version>
</parent>
- <modelVersion>4.0.0</modelVersion>
-
+
<artifactId>dolphinscheduler-standalone-server</artifactId>
-
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.dolphinscheduler</groupId>
+ <artifactId>dolphinscheduler-bom</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
<dependencies>
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
@@ -44,17 +55,17 @@
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-alert-server</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-log-server</artifactId>
</dependency>
-
+
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId>
@@ -65,20 +76,17 @@
</exclusion>
</exclusions>
</dependency>
+
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-kubernetes-commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-kubernetes-fabric8-config</artifactId>
+ </dependency>
</dependencies>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.dolphinscheduler</groupId>
- <artifactId>dolphinscheduler-bom</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
+
<build>
<plugins>
<plugin>
@@ -96,10 +104,10 @@
<executions>
<execution>
<id>dolphinscheduler-standalone-server</id>
- <phase>package</phase>
<goals>
<goal>single</goal>
</goals>
+ <phase>package</phase>
<configuration>
<finalName>standalone-server</finalName>
<descriptors>
@@ -112,7 +120,7 @@
</plugin>
</plugins>
</build>
-
+
<profiles>
<profile>
<id>docker</id>
diff --git a/dolphinscheduler-standalone-server/src/main/resources/application.yaml b/dolphinscheduler-standalone-server/src/main/resources/application.yaml
index 5640467616..d952cbb5b1 100644
--- a/dolphinscheduler-standalone-server/src/main/resources/application.yaml
+++ b/dolphinscheduler-standalone-server/src/main/resources/application.yaml
@@ -49,7 +49,7 @@ spring:
properties:
org.quartz.threadPool:threadPriority: 5
org.quartz.jobStore.isClustered: true
- org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX
+ org.quartz.jobStore.class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
org.quartz.scheduler.instanceId: AUTO
org.quartz.jobStore.tablePrefix: QRTZ_
org.quartz.jobStore.acquireTriggersWithinLock: true
diff --git a/dolphinscheduler-standalone-server/src/main/resources/logback-spring.xml b/dolphinscheduler-standalone-server/src/main/resources/logback-spring.xml
index 0cdeabde5e..5c0acc39df 100644
--- a/dolphinscheduler-standalone-server/src/main/resources/logback-spring.xml
+++ b/dolphinscheduler-standalone-server/src/main/resources/logback-spring.xml
@@ -72,7 +72,7 @@
</sift>
</appender>
- <root level="INFO">
+ <root level="DEBUG">
<if condition="${DOCKER:-false}">
<then>
<appender-ref ref="STDOUT"/>
diff --git a/pom.xml b/pom.xml
index 76f697c4df..090000cd62 100644
--- a/pom.xml
+++ b/pom.xml
@@ -62,7 +62,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <spring.boot.version>2.5.6</spring.boot.version>
+ <spring.boot.version>2.6.1</spring.boot.version>
<java.version>1.8</java.version>
<junit.version>4.12</junit.version>
<spotbugs.version>3.1.12</spotbugs.version>
diff --git a/tools/dependencies/known-dependencies.txt b/tools/dependencies/known-dependencies.txt
index 60bfb995d3..a87548c009 100755
--- a/tools/dependencies/known-dependencies.txt
+++ b/tools/dependencies/known-dependencies.txt
@@ -50,7 +50,7 @@ datanucleus-core-4.1.6.jar
datanucleus-rdbms-4.1.7.jar
derby-10.14.2.0.jar
druid-1.2.4.jar
-gson-2.8.8.jar
+gson-2.8.9.jar
guava-24.1-jre.jar
guava-retrying-2.0.0.jar
h2-1.4.200.jar
@@ -81,14 +81,14 @@ httpclient-4.5.13.jar
httpcore-4.4.15.jar
httpmime-4.5.13.jar
j2objc-annotations-1.1.jar
-jackson-annotations-2.10.5.jar
-jackson-core-2.10.5.jar
+jackson-annotations-2.13.0.jar
+jackson-core-2.13.0.jar
jackson-core-asl-1.9.13.jar
-jackson-databind-2.10.5.jar
-jackson-datatype-jdk8-2.12.5.jar
-jackson-datatype-jsr310-2.12.5.jar
+jackson-databind-2.13.0.jar
+jackson-datatype-jdk8-2.13.0.jar
+jackson-datatype-jsr310-2.13.0.jar
jackson-mapper-asl-1.9.13.jar
-jackson-module-parameter-names-2.12.5.jar
+jackson-module-parameter-names-2.13.0.jar
jakarta.annotation-api-1.3.5.jar
jakarta.servlet-api-4.0.4.jar
jakarta.validation-api-2.0.2.jar
@@ -123,7 +123,7 @@ jna-5.10.0.jar
jna-platform-5.10.0.jar
joda-time-2.10.13.jar
jpam-1.1.jar
-jsch-0.1.42.jar
+jsch-0.1.55.jar
jsp-api-2.1.jar
jsqlparser-2.1.jar
jsr305-3.0.0.jar
@@ -137,8 +137,8 @@ logback-classic-1.2.11.jar
logback-core-1.2.11.jar
lz4-1.3.0.jar
mapstruct-1.2.0.Final.jar
-micrometer-core-1.7.5.jar
-micrometer-registry-prometheus-1.7.5.jar
+micrometer-core-1.8.0.jar
+micrometer-registry-prometheus-1.8.0.jar
mssql-jdbc-6.1.0.jre8.jar
mybatis-3.5.2.jar
mybatis-plus-3.2.0.jar
@@ -166,41 +166,46 @@ protostuff-collectionschema-1.7.2.jar
py4j-0.10.9.jar
quartz-2.3.2.jar
reflections-0.9.12.jar
-simpleclient-0.10.0.jar
-simpleclient_common-0.10.0.jar
+simpleclient-0.12.0.jar
+simpleclient_common-0.12.0.jar
+simpleclient_tracer_common-0.12.0.jar
+simpleclient_tracer_otel-0.12.0.jar
+simpleclient_tracer_otel_agent-0.12.0.jar
slf4j-api-1.7.5.jar
-snakeyaml-1.28.jar
+snakeyaml-1.29.jar
snappy-0.2.jar
snappy-java-1.0.4.1.jar
SparseBitSet-1.2.jar
-spring-aop-5.3.12.jar
+spring-aop-5.3.13.jar
spring-beans-5.3.19.jar
-spring-boot-2.5.6.jar
-spring-boot-actuator-2.5.6.jar
-spring-boot-actuator-autoconfigure-2.5.6.jar
-spring-boot-autoconfigure-2.5.6.jar
-spring-boot-configuration-processor-2.5.6.jar
-spring-boot-starter-2.5.6.jar
-spring-boot-starter-actuator-2.5.6.jar
-spring-boot-starter-aop-2.5.6.jar
-spring-boot-starter-jdbc-2.5.6.jar
-spring-boot-starter-jetty-2.5.6.jar
-spring-boot-starter-json-2.5.6.jar
-spring-boot-starter-logging-2.5.6.jar
-spring-boot-starter-quartz-2.5.6.jar
-spring-boot-starter-web-2.5.6.jar
-spring-boot-starter-cache-2.5.6.jar
+spring-boot-2.6.1.jar
+spring-boot-actuator-2.6.1.jar
+spring-boot-actuator-autoconfigure-2.6.1.jar
+spring-boot-autoconfigure-2.6.1.jar
+spring-boot-configuration-processor-2.6.1.jar
+spring-boot-starter-2.6.1.jar
+spring-boot-starter-actuator-2.6.1.jar
+spring-boot-starter-aop-2.6.1.jar
+spring-boot-starter-jdbc-2.6.1.jar
+spring-boot-starter-jetty-2.6.1.jar
+spring-boot-starter-json-2.6.1.jar
+spring-boot-starter-logging-2.6.1.jar
+spring-boot-starter-quartz-2.6.1.jar
+spring-boot-starter-web-2.6.1.jar
+spring-boot-starter-cache-2.6.1.jar
+spring-cloud-kubernetes-commons-2.1.3.jar
+spring-cloud-starter-kubernetes-fabric8-config-2.1.3.jar
spring-context-5.3.19.jar
-spring-context-support-5.3.12.jar
+spring-context-support-5.3.13.jar
spring-core-5.3.19.jar
-spring-expression-5.3.12.jar
-spring-jcl-5.3.12.jar
+spring-expression-5.3.13.jar
+spring-jcl-5.3.13.jar
spring-jdbc-5.3.19.jar
spring-plugin-core-1.2.0.RELEASE.jar
spring-plugin-metadata-1.2.0.RELEASE.jar
spring-tx-5.3.19.jar
-spring-web-5.3.12.jar
-spring-webmvc-5.3.12.jar
+spring-web-5.3.13.jar
+spring-webmvc-5.3.13.jar
springfox-core-2.9.2.jar
springfox-schema-2.9.2.jar
springfox-spi-2.9.2.jar
@@ -211,7 +216,7 @@ springfox-swagger2-2.9.2.jar
swagger-annotations-1.5.20.jar
swagger-bootstrap-ui-1.9.3.jar
swagger-models-1.5.24.jar
-tomcat-embed-el-9.0.54.jar
+tomcat-embed-el-9.0.55.jar
tephra-api-0.6.0.jar
transaction-api-1.1.jar
xercesImpl-2.9.1.jar
@@ -220,36 +225,36 @@ xmlbeans-3.1.0.jar
xmlenc-0.52.jar
zookeeper-3.4.14.jar
Java-WebSocket-1.5.1.jar
-kubernetes-client-5.8.0.jar
-kubernetes-model-admissionregistration-5.8.0.jar
-kubernetes-model-apiextensions-5.8.0.jar
-kubernetes-model-apps-5.8.0.jar
-kubernetes-model-autoscaling-5.8.0.jar
-kubernetes-model-batch-5.8.0.jar
-kubernetes-model-certificates-5.8.0.jar
-kubernetes-model-common-5.8.0.jar
-kubernetes-model-coordination-5.8.0.jar
-kubernetes-model-core-5.8.0.jar
-kubernetes-model-discovery-5.8.0.jar
-kubernetes-model-events-5.8.0.jar
-kubernetes-model-extensions-5.8.0.jar
-kubernetes-model-flowcontrol-5.8.0.jar
-kubernetes-model-metrics-5.8.0.jar
-kubernetes-model-networking-5.8.0.jar
-kubernetes-model-node-5.8.0.jar
-kubernetes-model-policy-5.8.0.jar
-kubernetes-model-rbac-5.8.0.jar
-kubernetes-model-scheduling-5.8.0.jar
-kubernetes-model-storageclass-5.8.0.jar
+kubernetes-client-5.10.2.jar
+kubernetes-model-admissionregistration-5.10.2.jar
+kubernetes-model-apiextensions-5.10.2.jar
+kubernetes-model-apps-5.10.2.jar
+kubernetes-model-autoscaling-5.10.2.jar
+kubernetes-model-batch-5.10.2.jar
+kubernetes-model-certificates-5.10.2.jar
+kubernetes-model-common-5.10.2.jar
+kubernetes-model-coordination-5.10.2.jar
+kubernetes-model-core-5.10.2.jar
+kubernetes-model-discovery-5.10.2.jar
+kubernetes-model-events-5.10.2.jar
+kubernetes-model-extensions-5.10.2.jar
+kubernetes-model-flowcontrol-5.10.2.jar
+kubernetes-model-metrics-5.10.2.jar
+kubernetes-model-networking-5.10.2.jar
+kubernetes-model-node-5.10.2.jar
+kubernetes-model-policy-5.10.2.jar
+kubernetes-model-rbac-5.10.2.jar
+kubernetes-model-scheduling-5.10.2.jar
+kubernetes-model-storageclass-5.10.2.jar
zjsonpatch-0.3.0.jar
automaton-1.11-8.jar
generex-1.0.2.jar
-jackson-dataformat-yaml-2.12.5.jar
+jackson-dataformat-yaml-2.13.0.jar
logging-interceptor-3.14.9.jar
okhttp-3.14.9.jar
okio-1.17.2.jar
jmespath-java-1.12.160.jar
-jackson-dataformat-cbor-2.12.5.jar
+jackson-dataformat-cbor-2.13.0.jar
ion-java-1.0.2.jar
aws-java-sdk-s3-1.12.160.jar
aws-java-sdk-kms-1.12.160.jar