status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
unknown
language
stringclasses
5 values
commit_datetime
unknown
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
List<ResourceInfo> resourceInfos = JSONUtils.toList(resourceListStr, ResourceInfo.class); List<ResourceInfo> updatedResourceInfos = resourceInfos .stream() .map(this::updateResourceInfo) .filter(Objects::nonNull) .collect(Collectors.toList()); taskParameters.put("resourceList", updatedResourceInfos); } // s taskDefinition.setTaskParams(JSONUtils.toJsonString(taskParameters)); } } /** * update {@link ResourceInfo} by given original ResourceInfo * * @param res origin resource info * @return {@link ResourceInfo} */ private ResourceInfo updateResourceInfo(ResourceInfo res) { ResourceInfo resourceInfo = null; // o if (res != null) { int resourceId = res.getId(); if (resourceId <= 0) { logger.error("invalid resourceId, {}", resourceId); return null; } resourceInfo = new ResourceInfo(); // g Resource resource = getResourceById(resourceId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
resourceInfo.setId(resourceId); resourceInfo.setRes(resource.getFileName()); resourceInfo.setResourceName(resource.getFullName()); if (logger.isInfoEnabled()) { logger.info("updated resource info {}", JSONUtils.toJsonString(resourceInfo)); } } return resourceInfo; } /** * get id list by task state * * @param instanceId instanceId * @param state state * @return task instance states */ public List<Integer> findTaskIdByInstanceState(int instanceId, ExecutionStatus state) { return taskInstanceMapper.queryTaskByProcessIdAndState(instanceId, state.ordinal()); } /** * find valid task list by process definition id * * @param processInstanceId processInstanceId * @return task instance list */ public List<TaskInstance> findValidTaskListByProcessId(Integer processInstanceId) { return taskInstanceMapper.findValidTaskListByProcessId(processInstanceId, Flag.YES); } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* find previous task list by work process id * * @param processInstanceId processInstanceId * @return task instance list */ public List<TaskInstance> findPreviousTaskListByWorkProcessId(Integer processInstanceId) { return taskInstanceMapper.findValidTaskListByProcessId(processInstanceId, Flag.NO); } /** * update work process instance map * * @param processInstanceMap processInstanceMap * @return update process instance result */ public int updateWorkProcessInstanceMap(ProcessInstanceMap processInstanceMap) { return processInstanceMapMapper.updateById(processInstanceMap); } /** * create work process instance map * * @param processInstanceMap processInstanceMap * @return create process instance result */ public int createWorkProcessInstanceMap(ProcessInstanceMap processInstanceMap) { int count = 0; if (processInstanceMap != null) { return processInstanceMapMapper.insert(processInstanceMap); } return count; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
/** * find work process map by parent process id and parent task id. * * @param parentWorkProcessId parentWorkProcessId * @param parentTaskId parentTaskId * @return process instance map */ public ProcessInstanceMap findWorkProcessMapByParent(Integer parentWorkProcessId, Integer parentTaskId) { return processInstanceMapMapper.queryByParentId(parentWorkProcessId, parentTaskId); } /** * delete work process map by parent process id * * @param parentWorkProcessId parentWorkProcessId * @return delete process map result */ public int deleteWorkProcessMapByParentId(int parentWorkProcessId) { return processInstanceMapMapper.deleteByParentProcessId(parentWorkProcessId); } /** * find sub process instance * * @param parentProcessId parentProcessId * @param parentTaskId parentTaskId * @return process instance */ public ProcessInstance findSubProcessInstance(Integer parentProcessId, Integer parentTaskId) { ProcessInstance processInstance = null; ProcessInstanceMap processInstanceMap = processInstanceMapMapper.queryByParentId(parentProcessId, parentTaskId); if (processInstanceMap == null || processInstanceMap.getProcessInstanceId() == 0) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
return processInstance; } processInstance = findProcessInstanceById(processInstanceMap.getProcessInstanceId()); return processInstance; } /** * find parent process instance * * @param subProcessId subProcessId * @return process instance */ public ProcessInstance findParentProcessInstance(Integer subProcessId) { ProcessInstance processInstance = null; ProcessInstanceMap processInstanceMap = processInstanceMapMapper.queryBySubProcessId(subProcessId); if (processInstanceMap == null || processInstanceMap.getProcessInstanceId() == 0) { return processInstance; } processInstance = findProcessInstanceById(processInstanceMap.getParentProcessInstanceId()); return processInstance; } /** * change task state * * @param state state * @param startTime startTime * @param host host * @param executePath executePath * @param logPath logPath * @param taskInstId taskInstId */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
public void changeTaskState(TaskInstance taskInstance, ExecutionStatus state, Date startTime, String host, String executePath, String logPath, int taskInstId) { taskInstance.setState(state); taskInstance.setStartTime(startTime); taskInstance.setHost(host); taskInstance.setExecutePath(executePath); taskInstance.setLogPath(logPath); saveTaskInstance(taskInstance); } /** * update process instance * * @param processInstance processInstance * @return update process instance result */ public int updateProcessInstance(ProcessInstance processInstance) { return processInstanceMapper.updateById(processInstance); } /** * change task state * * @param state state * @param endTime endTime * @param taskInstId taskInstId * @param varPool varPool */ public void changeTaskState(TaskInstance taskInstance, ExecutionStatus state, Date endTime,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
int processId, String appIds, int taskInstId, String varPool) { taskInstance.setPid(processId); taskInstance.setAppLink(appIds); taskInstance.setState(state); taskInstance.setEndTime(endTime); taskInstance.setVarPool(varPool); changeOutParam(taskInstance); saveTaskInstance(taskInstance); } /** * for show in page of taskInstance * * @param taskInstance */ public void changeOutParam(TaskInstance taskInstance) { if (StringUtils.isEmpty(taskInstance.getVarPool())) { return; } List<Property> properties = JSONUtils.toList(taskInstance.getVarPool(), Property.class); if (CollectionUtils.isEmpty(properties)) { return; } //if Map<String, Object> taskParams = JSONUtils.parseObject(taskInstance.getTaskParams(), new TypeReference<Map<String, Object>>() {}); Object localParams = taskParams.get(LOCAL_PARAMS); if (localParams == null) { return;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} List<Property> allParam = JSONUtils.toList(JSONUtils.toJsonString(localParams), Property.class); Map<String, String> outProperty = new HashMap<>(); for (Property info : properties) { if (info.getDirect() == Direct.OUT) { outProperty.put(info.getProp(), info.getValue()); } } for (Property info : allParam) { if (info.getDirect() == Direct.OUT) { String paramName = info.getProp(); info.setValue(outProperty.get(paramName)); } } taskParams.put(LOCAL_PARAMS, allParam); taskInstance.setTaskParams(JSONUtils.toJsonString(taskParams)); } /** * convert integer list to string list * * @param intList intList * @return string list */ public List<String> convertIntListToString(List<Integer> intList) { if (intList == null) { return new ArrayList<>(); } List<String> result = new ArrayList<>(intList.size()); for (Integer intVar : intList) { result.add(String.valueOf(intVar));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} return result; } /** * query schedule by id * * @param id id * @return schedule */ public Schedule querySchedule(int id) { return scheduleMapper.selectById(id); } /** * query Schedule by processDefinitionCode * * @param processDefinitionCode processDefinitionCode * @see Schedule */ public List<Schedule> queryReleaseSchedulerListByProcessDefinitionCode(long processDefinitionCode) { return scheduleMapper.queryReleaseSchedulerListByProcessDefinitionCode(processDefinitionCode); } /** * query need failover process instance * * @param host host * @return process instance list */ public List<ProcessInstance> queryNeedFailoverProcessInstances(String host) { return processInstanceMapper.queryByHostAndStatus(host, stateArray); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
/** * process need failover process instance * * @param processInstance processInstance */ @Transactional(rollbackFor = RuntimeException.class) public void processNeedFailoverProcessInstances(ProcessInstance processInstance) { //1 processInstance.setHost(Constants.NULL); processInstanceMapper.updateById(processInstance); ProcessDefinition processDefinition = findProcessDefinition(processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion()); //2 Command cmd = new Command(); cmd.setProcessDefinitionCode(processDefinition.getCode()); cmd.setProcessDefinitionVersion(processDefinition.getVersion()); cmd.setProcessInstanceId(processInstance.getId()); cmd.setCommandParam(String.format("{\"%s\":%d}", Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING, processInstance.getId())); cmd.setExecutorId(processInstance.getExecutorId()); cmd.setCommandType(CommandType.RECOVER_TOLERANCE_FAULT_PROCESS); createCommand(cmd); } /** * query all need failover task instances by host * * @param host host * @return task instance list */ public List<TaskInstance> queryNeedFailoverTaskInstances(String host) { return taskInstanceMapper.queryByHostAndStatus(host, stateArray);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} /** * find data source by id * * @param id id * @return datasource */ public DataSource findDataSourceById(int id) { return dataSourceMapper.selectById(id); } /** * update process instance state by id * * @param processInstanceId processInstanceId * @param executionStatus executionStatus * @return update process result */ public int updateProcessInstanceState(Integer processInstanceId, ExecutionStatus executionStatus) { ProcessInstance instance = processInstanceMapper.selectById(processInstanceId); instance.setState(executionStatus); return processInstanceMapper.updateById(instance); } /** * find process instance by the task id * * @param taskId taskId * @return process instance */ public ProcessInstance findProcessInstanceByTaskId(int taskId) { TaskInstance taskInstance = taskInstanceMapper.selectById(taskId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if (taskInstance != null) { return processInstanceMapper.selectById(taskInstance.getProcessInstanceId()); } return null; } /** * find udf function list by id list string * * @param ids ids * @return udf function list */ public List<UdfFunc> queryUdfFunListByIds(int[] ids) { return udfFuncMapper.queryUdfByIdStr(ids, null); } /** * find tenant code by resource name * * @param resName resource name * @param resourceType resource type * @return tenant code */ public String queryTenantCodeByResName(String resName, ResourceType resourceType) { // i String fullName = resName.startsWith("/") ? resName : String.format("/%s", resName); List<Resource> resourceList = resourceMapper.queryResource(fullName, resourceType.ordinal()); if (CollectionUtils.isEmpty(resourceList)) { return StringUtils.EMPTY; } int userId = resourceList.get(0).getUserId(); User user = userMapper.selectById(userId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if (Objects.isNull(user)) { return StringUtils.EMPTY; } Tenant tenant = tenantMapper.selectById(user.getTenantId()); if (Objects.isNull(tenant)) { return StringUtils.EMPTY; } return tenant.getTenantCode(); } /** * find schedule list by process define codes. * * @param codes codes * @return schedule list */ public List<Schedule> selectAllByProcessDefineCode(long[] codes) { return scheduleMapper.selectAllByProcessDefineArray(codes); } /** * find last scheduler process instance in the date interval * * @param definitionCode definitionCode * @param dateInterval dateInterval * @return process instance */ public ProcessInstance findLastSchedulerProcessInterval(Long definitionCode, DateInterval dateInterval) { return processInstanceMapper.queryLastSchedulerProcess(definitionCode, dateInterval.getStartTime(), dateInterval.getEndTime()); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
/** * find last manual process instance interval * * @param definitionCode process definition code * @param dateInterval dateInterval * @return process instance */ public ProcessInstance findLastManualProcessInterval(Long definitionCode, DateInterval dateInterval) { return processInstanceMapper.queryLastManualProcess(definitionCode, dateInterval.getStartTime(), dateInterval.getEndTime()); } /** * find last running process instance * * @param definitionCode process definition code * @param startTime start time * @param endTime end time * @return process instance */ public ProcessInstance findLastRunningProcess(Long definitionCode, Date startTime, Date endTime) { return processInstanceMapper.queryLastRunningProcess(definitionCode, startTime, endTime, stateArray); } /** * query user queue by process instance id * * @param processInstanceId processInstanceId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return queue */ public String queryUserQueueByProcessInstanceId(int processInstanceId) { String queue = ""; ProcessInstance processInstance = processInstanceMapper.selectById(processInstanceId); if (processInstance == null) { return queue; } User executor = userMapper.selectById(processInstance.getExecutorId()); if (executor != null) { queue = executor.getQueue(); } return queue; } /** * query project name and user name by processInstanceId. * * @param processInstanceId processInstanceId * @return projectName and userName */ public ProjectUser queryProjectWithUserByProcessInstanceId(int processInstanceId) { return projectMapper.queryProjectWithUserByProcessInstanceId(processInstanceId); } /** * get task worker group * * @param taskInstance taskInstance * @return workerGroupId */ public String getTaskWorkerGroup(TaskInstance taskInstance) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
String workerGroup = taskInstance.getWorkerGroup(); if (StringUtils.isNotBlank(workerGroup)) { return workerGroup; } int processInstanceId = taskInstance.getProcessInstanceId(); ProcessInstance processInstance = findProcessInstanceById(processInstanceId); if (processInstance != null) { return processInstance.getWorkerGroup(); } logger.info("task : {} will use default worker group", taskInstance.getId()); return Constants.DEFAULT_WORKER_GROUP; } /** * get have perm project list * * @param userId userId * @return project list */ public List<Project> getProjectListHavePerm(int userId) { List<Project> createProjects = projectMapper.queryProjectCreatedByUser(userId); List<Project> authedProjects = projectMapper.queryAuthedProjectListByUserId(userId); if (createProjects == null) { createProjects = new ArrayList<>(); } if (authedProjects != null) { createProjects.addAll(authedProjects); } return createProjects; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* list unauthorized udf function * * @param userId user id * @param needChecks data source id array * @return unauthorized udf function list */ public <T> List<T> listUnauthorized(int userId, T[] needChecks, AuthorizationType authorizationType) { List<T> resultList = new ArrayList<>(); if (Objects.nonNull(needChecks) && needChecks.length > 0) { Set<T> originResSet = new HashSet<>(Arrays.asList(needChecks)); switch (authorizationType) { case RESOURCE_FILE_ID: case UDF_FILE: List<Resource> ownUdfResources = resourceMapper.listAuthorizedResourceById(userId, needChecks); addAuthorizedResources(ownUdfResources, userId); Set<Integer> authorizedResourceFiles = ownUdfResources.stream().map(Resource::getId).collect(toSet()); originResSet.removeAll(authorizedResourceFiles); break; case RESOURCE_FILE_NAME: List<Resource> ownResources = resourceMapper.listAuthorizedResource(userId, needChecks); addAuthorizedResources(ownResources, userId); Set<String> authorizedResources = ownResources.stream().map(Resource::getFullName).collect(toSet()); originResSet.removeAll(authorizedResources); break; case DATASOURCE: Set<Integer> authorizedDatasources = dataSourceMapper.listAuthorizedDataSource(userId, needChecks).stream().map(DataSource::getId).collect(toSet()); originResSet.removeAll(authorizedDatasources); break; case UDF: Set<Integer> authorizedUdfs = udfFuncMapper.listAuthorizedUdfFunc(userId, needChecks).stream().map(UdfFunc::getId).collect(toSet());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
originResSet.removeAll(authorizedUdfs); break; default: break; } resultList.addAll(originResSet); } return resultList; } /** * get user by user id * * @param userId user id * @return User */ public User getUserById(int userId) { return userMapper.selectById(userId); } /** * get resource by resource id * * @param resourceId resource id * @return Resource */ public Resource getResourceById(int resourceId) { return resourceMapper.selectById(resourceId); } /** * list resources by ids *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param resIds resIds * @return resource list */ public List<Resource> listResourceByIds(Integer[] resIds) { return resourceMapper.listResourceByIds(resIds); } /** * format task app id in task instance */ public String formatTaskAppId(TaskInstance taskInstance) { ProcessInstance processInstance = findProcessInstanceById(taskInstance.getProcessInstanceId()); if (processInstance == null) { return ""; } ProcessDefinition definition = findProcessDefinition(processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion()); if (definition == null) { return ""; } return String.format("%s_%s_%s", definition.getId(), processInstance.getId(), taskInstance.getId()); } /** * switch process definition version to process definition log version */ public int switchVersion(ProcessDefinition processDefinition, ProcessDefinitionLog processDefinitionLog) { if (null == processDefinition || null == processDefinitionLog) { return Constants.DEFINITION_FAILURE; } processDefinitionLog.setId(processDefinition.getId()); processDefinitionLog.setReleaseState(ReleaseState.OFFLINE); processDefinitionLog.setFlag(Flag.YES);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
int result = processDefineMapper.updateById(processDefinitionLog); if (result > 0) { result = switchProcessTaskRelationVersion(processDefinitionLog); if (result <= 0) { return Constants.DEFINITION_FAILURE; } } return result; } public int switchProcessTaskRelationVersion(ProcessDefinition processDefinition) { List<ProcessTaskRelation> processTaskRelationList = processTaskRelationMapper.queryByProcessCode(processDefinition.getProjectCode(), processDefinition.getCode()); if (!processTaskRelationList.isEmpty()) { processTaskRelationMapper.deleteByCode(processDefinition.getProjectCode(), processDefinition.getCode()); } List<ProcessTaskRelationLog> processTaskRelationLogList = processTaskRelationLogMapper.queryByProcessCodeAndVersion(processDefinition.getCode(), processDefinition.getVersion()); return processTaskRelationMapper.batchInsert(processTaskRelationLogList); } /** * get resource ids * * @param taskDefinition taskDefinition * @return resource ids */ public String getResourceIds(TaskDefinition taskDefinition) { Set<Integer> resourceIds = null; AbstractParameters params = TaskParametersUtils.getParameters(taskDefinition.getTaskType(), taskDefinition.getTaskParams()); if (params != null && CollectionUtils.isNotEmpty(params.getResourceFilesList())) { resourceIds = params.getResourceFilesList(). stream() .filter(t -> t.getId() != 0)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
.map(ResourceInfo::getId) .collect(Collectors.toSet()); } if (CollectionUtils.isEmpty(resourceIds)) { return StringUtils.EMPTY; } return StringUtils.join(resourceIds, ","); } public int saveTaskDefine(User operator, long projectCode, List<TaskDefinitionLog> taskDefinitionLogs) { Date now = new Date(); List<TaskDefinitionLog> newTaskDefinitionLogs = new ArrayList<>(); List<TaskDefinitionLog> updateTaskDefinitionLogs = new ArrayList<>(); for (TaskDefinitionLog taskDefinitionLog : taskDefinitionLogs) { taskDefinitionLog.setProjectCode(projectCode); taskDefinitionLog.setUpdateTime(now); taskDefinitionLog.setOperateTime(now); taskDefinitionLog.setOperator(operator.getId()); taskDefinitionLog.setResourceIds(getResourceIds(taskDefinitionLog)); if (taskDefinitionLog.getCode() > 0 && taskDefinitionLog.getVersion() > 0) { TaskDefinitionLog definitionCodeAndVersion = taskDefinitionLogMapper .queryByDefinitionCodeAndVersion(taskDefinitionLog.getCode(), taskDefinitionLog.getVersion()); if (definitionCodeAndVersion != null) { if (!taskDefinitionLog.equals(definitionCodeAndVersion)) { taskDefinitionLog.setUserId(definitionCodeAndVersion.getUserId()); Integer version = taskDefinitionLogMapper.queryMaxVersionForDefinition(taskDefinitionLog.getCode()); taskDefinitionLog.setVersion(version + 1); taskDefinitionLog.setCreateTime(definitionCodeAndVersion.getCreateTime()); updateTaskDefinitionLogs.add(taskDefinitionLog); } continue;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} } taskDefinitionLog.setUserId(operator.getId()); taskDefinitionLog.setVersion(Constants.VERSION_FIRST); taskDefinitionLog.setCreateTime(now); if (taskDefinitionLog.getCode() == 0) { try { taskDefinitionLog.setCode(SnowFlakeUtils.getInstance().nextId()); } catch (SnowFlakeException e) { logger.error("Task code get error, ", e); return Constants.DEFINITION_FAILURE; } } newTaskDefinitionLogs.add(taskDefinitionLog); } int insertResult = 0; int updateResult = 0; for (TaskDefinitionLog taskDefinitionToUpdate : updateTaskDefinitionLogs) { TaskDefinition task = taskDefinitionMapper.queryByCode(taskDefinitionToUpdate.getCode()); if (task == null) { newTaskDefinitionLogs.add(taskDefinitionToUpdate); } else { insertResult += taskDefinitionLogMapper.insert(taskDefinitionToUpdate); taskDefinitionToUpdate.setId(task.getId()); updateResult += taskDefinitionMapper.updateById(taskDefinitionToUpdate); } } if (!newTaskDefinitionLogs.isEmpty()) { updateResult += taskDefinitionMapper.batchInsert(newTaskDefinitionLogs); insertResult += taskDefinitionLogMapper.batchInsert(newTaskDefinitionLogs);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} return (insertResult & updateResult) > 0 ? 1 : Constants.EXIT_CODE_SUCCESS; } /** * save processDefinition (including create or update processDefinition) */ public int saveProcessDefine(User operator, ProcessDefinition processDefinition, Boolean isFromProcessDefine) { ProcessDefinitionLog processDefinitionLog = new ProcessDefinitionLog(processDefinition); Integer version = processDefineLogMapper.queryMaxVersionForDefinition(processDefinition.getCode()); int insertVersion = version == null || version == 0 ? Constants.VERSION_FIRST : version + 1; processDefinitionLog.setVersion(insertVersion); processDefinitionLog.setReleaseState(isFromProcessDefine ? ReleaseState.OFFLINE : ReleaseState.ONLINE); processDefinitionLog.setOperator(operator.getId()); processDefinitionLog.setOperateTime(processDefinition.getUpdateTime()); int insertLog = processDefineLogMapper.insert(processDefinitionLog); int result; if (0 == processDefinition.getId()) { result = processDefineMapper.insert(processDefinitionLog); } else { processDefinitionLog.setId(processDefinition.getId()); result = processDefineMapper.updateById(processDefinitionLog); } return (insertLog & result) > 0 ? insertVersion : 0; } /** * save task relations */ public int saveTaskRelation(User operator, long projectCode, long processDefinitionCode, int processDefinitionVersion, List<ProcessTaskRelationLog> taskRelationList, List<TaskDefinitionLog> taskDefinitionLogs) { Map<Long, TaskDefinitionLog> taskDefinitionLogMap = null;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if (CollectionUtils.isNotEmpty(taskDefinitionLogs)) { taskDefinitionLogMap = taskDefinitionLogs.stream() .collect(Collectors.toMap(TaskDefinition::getCode, taskDefinitionLog -> taskDefinitionLog)); } Date now = new Date(); for (ProcessTaskRelationLog processTaskRelationLog : taskRelationList) { processTaskRelationLog.setProjectCode(projectCode); processTaskRelationLog.setProcessDefinitionCode(processDefinitionCode); processTaskRelationLog.setProcessDefinitionVersion(processDefinitionVersion); if (taskDefinitionLogMap != null) { TaskDefinitionLog taskDefinitionLog = taskDefinitionLogMap.get(processTaskRelationLog.getPreTaskCode()); if (taskDefinitionLog != null) { processTaskRelationLog.setPreTaskVersion(taskDefinitionLog.getVersion()); } processTaskRelationLog.setPostTaskVersion(taskDefinitionLogMap.get(processTaskRelationLog.getPostTaskCode()).getVersion()); } processTaskRelationLog.setCreateTime(now); processTaskRelationLog.setUpdateTime(now); processTaskRelationLog.setOperator(operator.getId()); processTaskRelationLog.setOperateTime(now); } List<ProcessTaskRelation> processTaskRelationList = processTaskRelationMapper.queryByProcessCode(projectCode, processDefinitionCode); if (!processTaskRelationList.isEmpty()) { Set<Integer> processTaskRelationSet = processTaskRelationList.stream().map(ProcessTaskRelation::hashCode).collect(toSet()); Set<Integer> taskRelationSet = taskRelationList.stream().map(ProcessTaskRelationLog::hashCode).collect(toSet()); if (CollectionUtils.isEqualCollection(processTaskRelationSet, taskRelationSet)) { return Constants.EXIT_CODE_SUCCESS; } processTaskRelationMapper.deleteByCode(projectCode, processDefinitionCode); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
int result = processTaskRelationMapper.batchInsert(taskRelationList); int resultLog = processTaskRelationLogMapper.batchInsert(taskRelationList); return (result & resultLog) > 0 ? Constants.EXIT_CODE_SUCCESS : Constants.EXIT_CODE_FAILURE; } public boolean isTaskOnline(long taskCode) { List<ProcessTaskRelation> processTaskRelationList = processTaskRelationMapper.queryByTaskCode(taskCode); if (!processTaskRelationList.isEmpty()) { Set<Long> processDefinitionCodes = processTaskRelationList .stream() .map(ProcessTaskRelation::getProcessDefinitionCode) .collect(Collectors.toSet()); List<ProcessDefinition> processDefinitionList = processDefineMapper.queryByCodes(processDefinitionCodes); // c for (ProcessDefinition processDefinition : processDefinitionList) { if (processDefinition.getReleaseState() == ReleaseState.ONLINE) { return true; } } } return false; } /** * Generate the DAG Graph based on the process definition id * * @param processDefinition process definition * @return dag graph */ public DAG<String, TaskNode, TaskNodeRelation> genDagGraph(ProcessDefinition processDefinition) { List<ProcessTaskRelation> processTaskRelations = processTaskRelationMapper.queryByProcessCode(processDefinition.getProjectCode(), processDefinition.getCode()); List<TaskNode> taskNodeList = transformTask(processTaskRelations, Lists.newArrayList());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
ProcessDag processDag = DagHelper.getProcessDag(taskNodeList, new ArrayList<>(processTaskRelations)); // G return DagHelper.buildDagGraph(processDag); } /** * generate DagData */ public DagData genDagData(ProcessDefinition processDefinition) { List<ProcessTaskRelation> processTaskRelations = processTaskRelationMapper.queryByProcessCode(processDefinition.getProjectCode(), processDefinition.getCode()); List<TaskDefinitionLog> taskDefinitionLogList = genTaskDefineList(processTaskRelations); List<TaskDefinition> taskDefinitions = taskDefinitionLogList.stream() .map(taskDefinitionLog -> JSONUtils.parseObject(JSONUtils.toJsonString(taskDefinitionLog), TaskDefinition.class)) .collect(Collectors.toList()); return new DagData(processDefinition, processTaskRelations, taskDefinitions); } public List<TaskDefinitionLog> genTaskDefineList(List<ProcessTaskRelation> processTaskRelations) { Set<TaskDefinition> taskDefinitionSet = new HashSet<>(); for (ProcessTaskRelation processTaskRelation : processTaskRelations) { if (processTaskRelation.getPreTaskCode() > 0) { taskDefinitionSet.add(new TaskDefinition(processTaskRelation.getPreTaskCode(), processTaskRelation.getPreTaskVersion())); } if (processTaskRelation.getPostTaskCode() > 0) { taskDefinitionSet.add(new TaskDefinition(processTaskRelation.getPostTaskCode(), processTaskRelation.getPostTaskVersion())); } } return taskDefinitionLogMapper.queryByTaskDefinitions(taskDefinitionSet); } /** * find task definition by code and version */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
public TaskDefinition findTaskDefinition(long taskCode, int taskDefinitionVersion) { return taskDefinitionLogMapper.queryByDefinitionCodeAndVersion(taskCode, taskDefinitionVersion); } /** * find process task relation list by projectCode and processDefinitionCode */ public List<ProcessTaskRelation> findRelationByCode(long projectCode, long processDefinitionCode) { return processTaskRelationMapper.queryByProcessCode(projectCode, processDefinitionCode); } /** * add authorized resources * * @param ownResources own resources * @param userId userId */ private void addAuthorizedResources(List<Resource> ownResources, int userId) { List<Integer> relationResourceIds = resourceUserMapper.queryResourcesIdListByUserIdAndPerm(userId, 7); List<Resource> relationResources = CollectionUtils.isNotEmpty(relationResourceIds) ? resourceMapper.queryResourceListById(relationResourceIds) : new ArrayList<>(); ownResources.addAll(relationResources); } /** * Use temporarily before refactoring taskNode */ public List<TaskNode> transformTask(List<ProcessTaskRelation> taskRelationList, List<TaskDefinitionLog> taskDefinitionLogs) { Map<Long, List<Long>> taskCodeMap = new HashMap<>(); for (ProcessTaskRelation processTaskRelation : taskRelationList) { taskCodeMap.compute(processTaskRelation.getPostTaskCode(), (k, v) -> { if (v == null) { v = new ArrayList<>(); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if (processTaskRelation.getPreTaskCode() != 0L) { v.add(processTaskRelation.getPreTaskCode()); } return v; }); } if (CollectionUtils.isEmpty(taskDefinitionLogs)) { taskDefinitionLogs = genTaskDefineList(taskRelationList); } Map<Long, TaskDefinitionLog> taskDefinitionLogMap = taskDefinitionLogs.stream() .collect(Collectors.toMap(TaskDefinitionLog::getCode, taskDefinitionLog -> taskDefinitionLog)); List<TaskNode> taskNodeList = new ArrayList<>(); for (Entry<Long, List<Long>> code : taskCodeMap.entrySet()) { TaskDefinitionLog taskDefinitionLog = taskDefinitionLogMap.get(code.getKey()); if (taskDefinitionLog != null) { TaskNode taskNode = new TaskNode(); taskNode.setCode(taskDefinitionLog.getCode()); taskNode.setVersion(taskDefinitionLog.getVersion()); taskNode.setName(taskDefinitionLog.getName()); taskNode.setDesc(taskDefinitionLog.getDescription()); taskNode.setType(taskDefinitionLog.getTaskType().toUpperCase()); taskNode.setRunFlag(taskDefinitionLog.getFlag() == Flag.YES ? Constants.FLOWNODE_RUN_FLAG_NORMAL : Constants.FLOWNODE_RUN_FLAG_FORBIDDEN); taskNode.setMaxRetryTimes(taskDefinitionLog.getFailRetryTimes()); taskNode.setRetryInterval(taskDefinitionLog.getFailRetryInterval()); Map<String, Object> taskParamsMap = taskNode.taskParamsToJsonObj(taskDefinitionLog.getTaskParams()); taskNode.setConditionResult(JSONUtils.toJsonString(taskParamsMap.get(Constants.CONDITION_RESULT))); taskNode.setSwitchResult(JSONUtils.toJsonString(taskParamsMap.get(Constants.SWITCH_RESULT))); taskNode.setDependence(JSONUtils.toJsonString(taskParamsMap.get(Constants.DEPENDENCE))); taskParamsMap.remove(Constants.CONDITION_RESULT); taskParamsMap.remove(Constants.DEPENDENCE);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,471
[Feature][Master] Cache Process definition in master
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description in order to reduce the db query times, cache process definitions in master. procesDefinitionCacheMaps: {key: code-version, value: processDefintion} ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6471
https://github.com/apache/dolphinscheduler/pull/6511
bddf3e6f2c811c3ae6623bb588414173f0132c57
cea8ae69916039b55e84482b5c0703f3c62ef9c5
"2021-10-09T06:08:19Z"
java
"2021-10-13T03:36:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
taskNode.setParams(JSONUtils.toJsonString(taskParamsMap)); taskNode.setTaskInstancePriority(taskDefinitionLog.getTaskPriority()); taskNode.setWorkerGroup(taskDefinitionLog.getWorkerGroup()); taskNode.setEnvironmentCode(taskDefinitionLog.getEnvironmentCode()); taskNode.setTimeout(JSONUtils.toJsonString(new TaskTimeoutParameter(taskDefinitionLog.getTimeoutFlag() == TimeoutFlag.OPEN, taskDefinitionLog.getTimeoutNotifyStrategy(), taskDefinitionLog.getTimeout()))); taskNode.setDelayTime(taskDefinitionLog.getDelayTime()); taskNode.setPreTasks(JSONUtils.toJsonString(code.getValue().stream().map(taskDefinitionLogMap::get).map(TaskDefinition::getCode).collect(Collectors.toList()))); taskNodeList.add(taskNode); } } return taskNodeList; } public Map<ProcessInstance, TaskInstance> notifyProcessList(int processId, int taskId) { HashMap<ProcessInstance, TaskInstance> processTaskMap = new HashMap<>(); //fi ProcessInstanceMap processInstanceMap = processInstanceMapMapper.queryBySubProcessId(processId); if (processInstanceMap == null) { return processTaskMap; } ProcessInstance fatherProcess = this.findProcessInstanceById(processInstanceMap.getParentProcessInstanceId()); TaskInstance fatherTask = this.findTaskInstanceById(processInstanceMap.getParentTaskInstanceId()); if (fatherProcess != null) { processTaskMap.put(fatherProcess, fatherTask); } return processTaskMap; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.dao.entity; import com.fasterxml.jackson.core.type.TypeReference; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
import org.apache.dolphinscheduler.common.enums.Flag; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.TaskType; import org.apache.dolphinscheduler.common.task.dependent.DependentParameters; import org.apache.dolphinscheduler.common.task.switchtask.SwitchParameters; import org.apache.dolphinscheduler.common.utils.JSONUtils; import java.io.Serializable; import java.util.Date; import java.util.Map; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; /** * task instance */ @TableName("t_ds_task_instance") public class TaskInstance implements Serializable { /** * id */ @TableId(value = "id", type = IdType.AUTO) private int id; /** * task name */ private String name; /** * task type
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
*/ private String taskType; /** * process instance id */ private int processInstanceId; /** * task code */ private long taskCode; /** * task definition version */ private int taskDefinitionVersion; /** * process instance name */ @TableField(exist = false) private String processInstanceName; /** * state */ private ExecutionStatus state; /** * task first submit time. */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date firstSubmitTime; /** * task submit time
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
*/ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date submitTime; /** * task start time */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date startTime; /** * task end time */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date endTime; /** * task host */ private String host; /** * task shell execute path and the resource down from hdfs * default path: $base_run_dir/processInstanceId/taskInstanceId/retryTimes */ private String executePath; /** * task log path * default path: $base_run_dir/processInstanceId/taskInstanceId/retryTimes */ private String logPath; /** * retry times */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
private int retryTimes; /** * alert flag */ private Flag alertFlag; /** * process instance */ @TableField(exist = false) private ProcessInstance processInstance; /** * process definition */ @TableField(exist = false) private ProcessDefinition processDefine; /** * task definition */ @TableField(exist = false) private TaskDefinition taskDefine; /** * process id */ private int pid; /** * appLink */ private String appLink; /** * flag
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
*/ private Flag flag; /** * dependency */ @TableField(exist = false) private DependentParameters dependency; /** * switch dependency */ @TableField(exist = false) private SwitchParameters switchDependency; /** * duration */ @TableField(exist = false) private String duration; /** * max retry times */ private int maxRetryTimes; /** * task retry interval, unit: minute */ private int retryInterval; /** * task intance priority */ private Priority taskInstancePriority; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
* process intance priority */ @TableField(exist = false) private Priority processInstancePriority; /** * dependent state */ @TableField(exist = false) private String dependentResult; /** * workerGroup */ private String workerGroup; /** * environment code */ private Long environmentCode; /** * environment config */ private String environmentConfig; /** * executor id */ private int executorId; /** * varPool string */ private String varPool; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
* executor name */ @TableField(exist = false) private String executorName; @TableField(exist = false) private Map<String, String> resources; /** * delay execution time. */ private int delayTime; /** * task params */ private String taskParams; /** * dry run flag */ private int dryRun; public void init(String host, Date startTime, String executePath) { this.host = host; this.startTime = startTime; this.executePath = executePath; } public String getVarPool() { return varPool; } public void setVarPool(String varPool) { this.varPool = varPool; } public ProcessInstance getProcessInstance() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
return processInstance; } public void setProcessInstance(ProcessInstance processInstance) { this.processInstance = processInstance; } public ProcessDefinition getProcessDefine() { return processDefine; } public void setProcessDefine(ProcessDefinition processDefine) { this.processDefine = processDefine; } public TaskDefinition getTaskDefine() { return taskDefine; } public void setTaskDefine(TaskDefinition taskDefine) { this.taskDefine = taskDefine; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getTaskType() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
return taskType; } public void setTaskType(String taskType) { this.taskType = taskType; } public int getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(int processInstanceId) { this.processInstanceId = processInstanceId; } public ExecutionStatus getState() { return state; } public void setState(ExecutionStatus state) { this.state = state; } public Date getFirstSubmitTime() { return firstSubmitTime; } public void setFirstSubmitTime(Date firstSubmitTime) { this.firstSubmitTime = firstSubmitTime; } public Date getSubmitTime() { return submitTime; } public void setSubmitTime(Date submitTime) { this.submitTime = submitTime; } public Date getStartTime() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public String getHost() { return host; } public void setHost(String host) { this.host = host; } public String getExecutePath() { return executePath; } public void setExecutePath(String executePath) { this.executePath = executePath; } public String getLogPath() { return logPath; } public void setLogPath(String logPath) { this.logPath = logPath; } public Flag getAlertFlag() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
return alertFlag; } public void setAlertFlag(Flag alertFlag) { this.alertFlag = alertFlag; } public int getRetryTimes() { return retryTimes; } public void setRetryTimes(int retryTimes) { this.retryTimes = retryTimes; } public Boolean isTaskSuccess() { return this.state == ExecutionStatus.SUCCESS; } public int getPid() { return pid; } public void setPid(int pid) { this.pid = pid; } public String getAppLink() { return appLink; } public void setAppLink(String appLink) { this.appLink = appLink; } public Long getEnvironmentCode() { return this.environmentCode; } public void setEnvironmentCode(Long environmentCode) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
this.environmentCode = environmentCode; } public String getEnvironmentConfig() { return this.environmentConfig; } public void setEnvironmentConfig(String environmentConfig) { this.environmentConfig = environmentConfig; } public DependentParameters getDependency() { if (this.dependency == null) { Map<String, Object> taskParamsMap = JSONUtils.parseObject(this.getTaskParams(), new TypeReference<Map<String, Object>>() {}); this.dependency = JSONUtils.parseObject((String) taskParamsMap.get(Constants.DEPENDENCE), DependentParameters.class); } return this.dependency; } public void setDependency(DependentParameters dependency) { this.dependency = dependency; } public SwitchParameters getSwitchDependency() { if (this.switchDependency == null) { Map<String, Object> taskParamsMap = JSONUtils.parseObject(this.getTaskParams(), new TypeReference<Map<String, Object>>() {}); this.switchDependency = JSONUtils.parseObject((String) taskParamsMap.get(Constants.SWITCH_RESULT), SwitchParameters.class); } return this.switchDependency; } public void setSwitchDependency(SwitchParameters switchDependency) { Map<String, Object> taskParamsMap = JSONUtils.parseObject(this.getTaskParams(), new TypeReference<Map<String, Object>>() {}); taskParamsMap.put(Constants.SWITCH_RESULT,JSONUtils.toJsonString(switchDependency)); this.setTaskParams(JSONUtils.toJsonString(taskParamsMap)); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
public Flag getFlag() { return flag; } public void setFlag(Flag flag) { this.flag = flag; } public String getProcessInstanceName() { return processInstanceName; } public void setProcessInstanceName(String processInstanceName) { this.processInstanceName = processInstanceName; } public String getDuration() { return duration; } public void setDuration(String duration) { this.duration = duration; } public int getMaxRetryTimes() { return maxRetryTimes; } public void setMaxRetryTimes(int maxRetryTimes) { this.maxRetryTimes = maxRetryTimes; } public int getRetryInterval() { return retryInterval; } public void setRetryInterval(int retryInterval) { this.retryInterval = retryInterval; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
public int getExecutorId() { return executorId; } public void setExecutorId(int executorId) { this.executorId = executorId; } public String getExecutorName() { return executorName; } public void setExecutorName(String executorName) { this.executorName = executorName; } public int getDryRun() { return dryRun; } public void setDryRun(int dryRun) { this.dryRun = dryRun; } public boolean isTaskComplete() { return this.getState().typeIsPause() || this.getState().typeIsSuccess() || this.getState().typeIsCancel() || (this.getState().typeIsFailure() && !taskCanRetry()); } public Map<String, String> getResources() { return resources; } public void setResources(Map<String, String> resources) { this.resources = resources; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
public boolean isSubProcess() { return TaskType.SUB_PROCESS.getDesc().equalsIgnoreCase(this.taskType); } public boolean isDependTask() { return TaskType.DEPENDENT.getDesc().equalsIgnoreCase(this.taskType); } public boolean isConditionsTask() { return TaskType.CONDITIONS.getDesc().equalsIgnoreCase(this.taskType); } public boolean isSwitchTask() { return TaskType.SWITCH.getDesc().equalsIgnoreCase(this.taskType); } /** * determine if you can try again * * @return can try result */ public boolean taskCanRetry() { if (this.isSubProcess()) { return false; } if (this.getState() == ExecutionStatus.NEED_FAULT_TOLERANCE) { return true; } else { return (this.getState().typeIsFailure() && this.getRetryTimes() < this.getMaxRetryTimes()); } } public Priority getTaskInstancePriority() { return taskInstancePriority;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
} public void setTaskInstancePriority(Priority taskInstancePriority) { this.taskInstancePriority = taskInstancePriority; } public Priority getProcessInstancePriority() { return processInstancePriority; } public void setProcessInstancePriority(Priority processInstancePriority) { this.processInstancePriority = processInstancePriority; } public String getWorkerGroup() { return workerGroup; } public void setWorkerGroup(String workerGroup) { this.workerGroup = workerGroup; } public String getDependentResult() { return dependentResult; } public void setDependentResult(String dependentResult) { this.dependentResult = dependentResult; } public int getDelayTime() { return delayTime; } public void setDelayTime(int delayTime) { this.delayTime = delayTime; } @Override public String toString() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
return "TaskInstance{" + "id=" + id + ", name='" + name + '\'' + ", taskType='" + taskType + '\'' + ", processInstanceId=" + processInstanceId + ", processInstanceName='" + processInstanceName + '\'' + ", state=" + state + ", firstSubmitTime=" + firstSubmitTime + ", submitTime=" + submitTime + ", startTime=" + startTime + ", endTime=" + endTime + ", host='" + host + '\'' + ", executePath='" + executePath + '\'' + ", logPath='" + logPath + '\'' + ", retryTimes=" + retryTimes + ", alertFlag=" + alertFlag + ", processInstance=" + processInstance + ", processDefine=" + processDefine + ", pid=" + pid + ", appLink='" + appLink + '\'' + ", flag=" + flag + ", dependency='" + dependency + '\'' + ", duration=" + duration + ", maxRetryTimes=" + maxRetryTimes + ", retryInterval=" + retryInterval + ", taskInstancePriority=" + taskInstancePriority + ", processInstancePriority=" + processInstancePriority + ", dependentResult='" + dependentResult + '\'' + ", workerGroup='" + workerGroup + '\'' + ", environmentCode=" + environmentCode
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/TaskInstance.java
+ ", environmentConfig='" + environmentConfig + '\'' + ", executorId=" + executorId + ", executorName='" + executorName + '\'' + ", delayTime=" + delayTime + ", dryRun=" + dryRun + '}'; } public long getTaskCode() { return taskCode; } public void setTaskCode(long taskCode) { this.taskCode = taskCode; } public int getTaskDefinitionVersion() { return taskDefinitionVersion; } public void setTaskDefinitionVersion(int taskDefinitionVersion) { this.taskDefinitionVersion = taskDefinitionVersion; } public String getTaskParams() { return taskParams; } public void setTaskParams(String taskParams) { this.taskParams = taskParams; } public boolean isFirstRun() { return endTime == null; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.runner; import org.apache.dolphinscheduler.common.Constants;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java
import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.enums.StateEvent; import org.apache.dolphinscheduler.common.enums.StateEventType; import org.apache.dolphinscheduler.common.thread.Stopper; import org.apache.dolphinscheduler.common.thread.ThreadUtils; import org.apache.dolphinscheduler.common.utils.NetUtils; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.remote.command.StateEventChangeCommand; import org.apache.dolphinscheduler.remote.processor.StateEventCallbackService; import org.apache.dolphinscheduler.server.master.config.MasterConfig; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.commons.lang.StringUtils; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; @Service public class EventExecuteService extends Thread { private static final Logger logger = LoggerFactory.getLogger(EventExecuteService.class);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java
/** * dolphinscheduler database interface */ @Autowired private ProcessService processService; @Autowired private MasterConfig masterConfig; private ExecutorService eventExecService; /** * */ private StateEventCallbackService stateEventCallbackService; private ConcurrentHashMap<Integer, WorkflowExecuteThread> processInstanceExecMaps; private ConcurrentHashMap<String, WorkflowExecuteThread> eventHandlerMap = new ConcurrentHashMap(); ListeningExecutorService listeningExecutorService; public void init(ConcurrentHashMap<Integer, WorkflowExecuteThread> processInstanceExecMaps) { eventExecService = ThreadUtils.newDaemonFixedThreadExecutor("MasterEventExecution", masterConfig.getMasterExecThreads()); this.processInstanceExecMaps = processInstanceExecMaps; listeningExecutorService = MoreExecutors.listeningDecorator(eventExecService); this.stateEventCallbackService = SpringApplicationContext.getBean(StateEventCallbackService.class); } @Override public synchronized void start() { super.setName("EventServiceStarted"); super.start(); } public void close() { eventExecService.shutdown(); logger.info("event service stopped..."); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java
@Override public void run() { logger.info("Event service started"); while (Stopper.isRunning()) { try { eventHandler(); TimeUnit.MILLISECONDS.sleep(Constants.SLEEP_TIME_MILLIS); } catch (Exception e) { logger.error("Event service thread error", e); } } } private void eventHandler() { for (WorkflowExecuteThread workflowExecuteThread : this.processInstanceExecMaps.values()) { if (workflowExecuteThread.eventSize() == 0 || StringUtils.isEmpty(workflowExecuteThread.getKey()) || eventHandlerMap.containsKey(workflowExecuteThread.getKey())) { continue; } int processInstanceId = workflowExecuteThread.getProcessInstance().getId(); logger.info("handle process instance : {} events, count:{}", processInstanceId, workflowExecuteThread.eventSize()); logger.info("already exists handler process size:{}", this.eventHandlerMap.size()); eventHandlerMap.put(workflowExecuteThread.getKey(), workflowExecuteThread); ListenableFuture future = this.listeningExecutorService.submit(workflowExecuteThread); FutureCallback futureCallback = new FutureCallback() { @Override public void onSuccess(Object o) { if (workflowExecuteThread.workFlowFinish()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java
processInstanceExecMaps.remove(processInstanceId); notifyProcessChanged(); logger.info("process instance {} finished.", processInstanceId); } if (workflowExecuteThread.getProcessInstance().getId() != processInstanceId) { processInstanceExecMaps.remove(processInstanceId); processInstanceExecMaps.put(workflowExecuteThread.getProcessInstance().getId(), workflowExecuteThread); } eventHandlerMap.remove(workflowExecuteThread.getKey()); } private void notifyProcessChanged() { Map<ProcessInstance, TaskInstance> fatherMaps = processService.notifyProcessList(processInstanceId, 0); for (ProcessInstance processInstance : fatherMaps.keySet()) { String address = NetUtils.getAddr(masterConfig.getListenPort()); if (processInstance.getHost().equalsIgnoreCase(address)) { notifyMyself(processInstance, fatherMaps.get(processInstance)); } else { notifyProcess(processInstance, fatherMaps.get(processInstance)); } } } private void notifyMyself(ProcessInstance processInstance, TaskInstance taskInstance) { logger.info("notify process {} task {} state change", processInstance.getId(), taskInstance.getId()); if (!processInstanceExecMaps.containsKey(processInstance.getId())) { return; } WorkflowExecuteThread workflowExecuteThreadNotify = processInstanceExecMaps.get(processInstance.getId()); StateEvent stateEvent = new StateEvent(); stateEvent.setTaskInstanceId(taskInstance.getId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/EventExecuteService.java
stateEvent.setType(StateEventType.TASK_STATE_CHANGE); stateEvent.setProcessInstanceId(processInstance.getId()); stateEvent.setExecutionStatus(ExecutionStatus.RUNNING_EXECUTION); workflowExecuteThreadNotify.addStateEvent(stateEvent); } private void notifyProcess(ProcessInstance processInstance, TaskInstance taskInstance) { String host = processInstance.getHost(); if (StringUtils.isEmpty(host)) { logger.info("process {} host is empty, cannot notify task {} now.", processInstance.getId(), taskInstance.getId()); return; } String address = host.split(":")[0]; int port = Integer.parseInt(host.split(":")[1]); logger.info("notify process {} task {} state change, host:{}", processInstance.getId(), taskInstance.getId(), host); StateEventChangeCommand stateEventChangeCommand = new StateEventChangeCommand( processInstanceId, 0, workflowExecuteThread.getProcessInstance().getState(), processInstance.getId(), taskInstance.getId() ); stateEventCallbackService.sendResult(address, port, stateEventChangeCommand.convert2Command()); } @Override public void onFailure(Throwable throwable) { } }; Futures.addCallback(future, futureCallback, this.listeningExecutorService); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
* distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.runner; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.enums.StateEvent; import org.apache.dolphinscheduler.common.enums.StateEventType; import org.apache.dolphinscheduler.common.enums.TimeoutFlag; import org.apache.dolphinscheduler.common.thread.Stopper; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.hadoop.util.ThreadUtil; import java.util.concurrent.ConcurrentHashMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * 1. timeout check wheel * 2. dependent task check wheel */ public class StateWheelExecuteThread extends Thread { private static final Logger logger = LoggerFactory.getLogger(StateWheelExecuteThread.class); ConcurrentHashMap<Integer, ProcessInstance> processInstanceCheckList; ConcurrentHashMap<Integer, TaskInstance> taskInstanceCheckList; private ConcurrentHashMap<Integer, WorkflowExecuteThread> processInstanceExecMaps; private int stateCheckIntervalSecs; public StateWheelExecuteThread(ConcurrentHashMap<Integer, ProcessInstance> processInstances,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
ConcurrentHashMap<Integer, TaskInstance> taskInstances, ConcurrentHashMap<Integer, WorkflowExecuteThread> processInstanceExecMaps, int stateCheckIntervalSecs) { this.processInstanceCheckList = processInstances; this.taskInstanceCheckList = taskInstances; this.processInstanceExecMaps = processInstanceExecMaps; this.stateCheckIntervalSecs = stateCheckIntervalSecs; } @Override public void run() { logger.info("state wheel thread start"); while (Stopper.isRunning()) { try { checkProcess(); checkTask(); } catch (Exception e) { logger.error("state wheel thread check error:", e); } ThreadUtil.sleepAtLeastIgnoreInterrupts(stateCheckIntervalSecs); } } public boolean addProcess(ProcessInstance processInstance) { this.processInstanceCheckList.put(processInstance.getId(), processInstance); return true; } public boolean addTask(TaskInstance taskInstance) { this.taskInstanceCheckList.put(taskInstance.getId(), taskInstance); return true; } private void checkTask() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
if (taskInstanceCheckList.isEmpty()) { return; } for (TaskInstance taskInstance : this.taskInstanceCheckList.values()) { if (TimeoutFlag.OPEN == taskInstance.getTaskDefine().getTimeoutFlag()) { long timeRemain = DateUtils.getRemainTime(taskInstance.getStartTime(), taskInstance.getTaskDefine().getTimeout() * Constants.SEC_2_MINUTES_TIME_UNIT); if (0 <= timeRemain && processTimeout(taskInstance)) { taskInstanceCheckList.remove(taskInstance.getId()); return; } } if (taskInstance.isSubProcess() || taskInstance.isDependTask()) { processDependCheck(taskInstance); } } } private void checkProcess() { if (processInstanceCheckList.isEmpty()) { return; } for (ProcessInstance processInstance : this.processInstanceCheckList.values()) { long timeRemain = DateUtils.getRemainTime(processInstance.getStartTime(), processInstance.getTimeout() * Constants.SEC_2_MINUTES_TIME_UNIT); if (0 <= timeRemain && processTimeout(processInstance)) { processInstanceCheckList.remove(processInstance.getId()); } } } private void putEvent(StateEvent stateEvent) { if (!processInstanceExecMaps.containsKey(stateEvent.getProcessInstanceId())) { return;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/StateWheelExecuteThread.java
} WorkflowExecuteThread workflowExecuteThread = this.processInstanceExecMaps.get(stateEvent.getProcessInstanceId()); workflowExecuteThread.addStateEvent(stateEvent); } private boolean processDependCheck(TaskInstance taskInstance) { StateEvent stateEvent = new StateEvent(); stateEvent.setType(StateEventType.TASK_STATE_CHANGE); stateEvent.setProcessInstanceId(taskInstance.getProcessInstanceId()); stateEvent.setTaskInstanceId(taskInstance.getId()); stateEvent.setExecutionStatus(ExecutionStatus.RUNNING_EXECUTION); putEvent(stateEvent); return true; } private boolean processTimeout(TaskInstance taskInstance) { StateEvent stateEvent = new StateEvent(); stateEvent.setType(StateEventType.TASK_TIMEOUT); stateEvent.setProcessInstanceId(taskInstance.getProcessInstanceId()); stateEvent.setTaskInstanceId(taskInstance.getId()); putEvent(stateEvent); return true; } private boolean processTimeout(ProcessInstance processInstance) { StateEvent stateEvent = new StateEvent(); stateEvent.setType(StateEventType.PROCESS_TIMEOUT); stateEvent.setProcessInstanceId(processInstance.getId()); putEvent(stateEvent); return true; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
/* * Lcensed to the Apache Software Foundaton (ASF) under one or more * contrbutor lcense agreements. See the NOTICE fle dstrbuted wth * ths work for addtonal nformaton regardng copyrght ownershp. * The ASF lcenses ths fle to You under the Apache Lcense, Verson 2.0 * (the "Lcense"); you may not use ths fle except n complance wth * the Lcense. You may obtan a copy of the Lcense at * * http://www.apache.org/lcenses/LICENSE-2.0 * * Unless requred by applcable law or agreed to n wrtng, software * dstrbuted under the Lcense s dstrbuted on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ether express or mpled. * See the Lcense for the specfc language governng permssons and * lmtatons under the Lcense. */ package org.apache.dolphnscheduler.server.master.runner; mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE; mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_RECOVERY_START_NODE_STRING; mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_START_NODE_NAMES; mport statc org.apache.dolphnscheduler.common.Constants.DEFAULT_WORKER_GROUP; mport statc org.apache.dolphnscheduler.common.Constants.SEC_2_MINUTES_TIME_UNIT; mport org.apache.dolphnscheduler.common.Constants; mport org.apache.dolphnscheduler.common.enums.CommandType; mport org.apache.dolphnscheduler.common.enums.DependResult; mport org.apache.dolphnscheduler.common.enums.Drect; mport org.apache.dolphnscheduler.common.enums.ExecutonStatus; mport org.apache.dolphnscheduler.common.enums.FalureStrategy; mport org.apache.dolphnscheduler.common.enums.Flag; mport org.apache.dolphnscheduler.common.enums.Prorty; mport org.apache.dolphnscheduler.common.enums.StateEvent; mport org.apache.dolphnscheduler.common.enums.StateEventType; mport org.apache.dolphnscheduler.common.enums.TaskDependType; mport org.apache.dolphnscheduler.common.enums.TaskTmeoutStrategy; mport org.apache.dolphnscheduler.common.enums.TmeoutFlag; mport org.apache.dolphnscheduler.common.graph.DAG; mport org.apache.dolphnscheduler.common.model.TaskNode; mport org.apache.dolphnscheduler.common.model.TaskNodeRelaton; mport org.apache.dolphnscheduler.common.process.ProcessDag; mport org.apache.dolphnscheduler.common.process.Property; mport org.apache.dolphnscheduler.common.thread.ThreadUtls; mport org.apache.dolphnscheduler.common.utls.CollectonUtls; mport org.apache.dolphnscheduler.common.utls.DateUtls; mport org.apache.dolphnscheduler.common.utls.JSONUtls; mport org.apache.dolphnscheduler.common.utls.NetUtls; mport org.apache.dolphnscheduler.common.utls.ParameterUtls; mport org.apache.dolphnscheduler.dao.entty.Envronment;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
mport org.apache.dolphnscheduler.dao.entty.ProcessDefnton; mport org.apache.dolphnscheduler.dao.entty.ProcessInstance; mport org.apache.dolphnscheduler.dao.entty.ProjectUser; mport org.apache.dolphnscheduler.dao.entty.Schedule; mport org.apache.dolphnscheduler.dao.entty.TaskDefnton; mport org.apache.dolphnscheduler.dao.entty.TaskInstance; mport org.apache.dolphnscheduler.dao.utls.DagHelper; mport org.apache.dolphnscheduler.remote.command.HostUpdateCommand; mport org.apache.dolphnscheduler.remote.utls.Host; mport org.apache.dolphnscheduler.server.master.confg.MasterConfg; mport org.apache.dolphnscheduler.server.master.dspatch.executor.NettyExecutorManager; mport org.apache.dolphnscheduler.server.master.runner.task.ITaskProcessor; mport org.apache.dolphnscheduler.server.master.runner.task.TaskActon; mport org.apache.dolphnscheduler.server.master.runner.task.TaskProcessorFactory; mport org.apache.dolphnscheduler.servce.alert.ProcessAlertManager; mport org.apache.dolphnscheduler.servce.process.ProcessServce; mport org.apache.dolphnscheduler.servce.quartz.cron.CronUtls; mport org.apache.dolphnscheduler.servce.queue.PeerTaskInstancePrortyQueue; mport org.apache.commons.lang.StrngUtls; mport java.utl.ArrayLst; mport java.utl.Arrays; mport java.utl.Collecton; mport java.utl.Date; mport java.utl.HashMap; mport java.utl.Iterator; mport java.utl.Lst; mport java.utl.Map; mport java.utl.Objects; mport java.utl.Set; mport java.utl.concurrent.ConcurrentHashMap;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
mport java.utl.concurrent.ConcurrentLnkedQueue; mport java.utl.concurrent.ExecutorServce; mport org.slf4j.Logger; mport org.slf4j.LoggerFactory; mport com.google.common.collect.HashBasedTable; mport com.google.common.collect.Lsts; mport com.google.common.collect.Table; /** * master exec thread,splt dag */ publc class WorkflowExecuteThread mplements Runnable { /** * logger of WorkflowExecuteThread */ prvate statc fnal Logger logger = LoggerFactory.getLogger(WorkflowExecuteThread.class); /** * runng TaskNode */ prvate fnal Map<Integer, ITaskProcessor> actveTaskProcessorMaps = new ConcurrentHashMap<>(); /** * task exec servce */ prvate fnal ExecutorServce taskExecServce; /** * process nstance */ prvate ProcessInstance processInstance; /** * submt falure nodes */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
prvate boolean taskFaledSubmt = false; /** * recover node d lst */ prvate Lst<TaskInstance> recoverNodeIdLst = new ArrayLst<>(); /** * error task lst */ prvate Map<Strng, TaskInstance> errorTaskLst = new ConcurrentHashMap<>(); /** * complete task lst */ prvate Map<Strng, TaskInstance> completeTaskLst = new ConcurrentHashMap<>(); /** * ready to submt task queue */ prvate PeerTaskInstancePrortyQueue readyToSubmtTaskQueue = new PeerTaskInstancePrortyQueue(); /** * depend faled task map */ prvate Map<Strng, TaskInstance> dependFaledTask = new ConcurrentHashMap<>(); /** * forbdden task map */ prvate Map<Strng, TaskNode> forbddenTaskLst = new ConcurrentHashMap<>(); /** * skp task map */ prvate Map<Strng, TaskNode> skpTaskNodeLst = new ConcurrentHashMap<>(); /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
* recover tolerance fault task lst */ prvate Lst<TaskInstance> recoverToleranceFaultTaskLst = new ArrayLst<>(); /** * alert manager */ prvate ProcessAlertManager processAlertManager; /** * the object of DAG */ prvate DAG<Strng, TaskNode, TaskNodeRelaton> dag; /** * process servce */ prvate ProcessServce processServce; /** * master confg */ prvate MasterConfg masterConfg; /** * */ prvate NettyExecutorManager nettyExecutorManager; prvate ConcurrentLnkedQueue<StateEvent> stateEvents = new ConcurrentLnkedQueue<>(); prvate Lst<Date> complementLstDate = Lsts.newLnkedLst(); prvate Table<Integer, Long, TaskInstance> taskInstanceHashMap = HashBasedTable.create(); prvate ProcessDefnton processDefnton; prvate Strng key; prvate ConcurrentHashMap<Integer, TaskInstance> taskTmeoutCheckLst; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
* start flag, true: start nodes submt completely * */ prvate boolean sStart = false; /** * constructor of WorkflowExecuteThread * * @param processInstance processInstance * @param processServce processServce * @param nettyExecutorManager nettyExecutorManager * @param taskTmeoutCheckLst */ publc WorkflowExecuteThread(ProcessInstance processInstance , ProcessServce processServce , NettyExecutorManager nettyExecutorManager , ProcessAlertManager processAlertManager , MasterConfg masterConfg , ConcurrentHashMap<Integer, TaskInstance> taskTmeoutCheckLst) { ths.processServce = processServce; ths.processInstance = processInstance; ths.masterConfg = masterConfg; nt masterTaskExecNum = masterConfg.getMasterExecTaskNum(); ths.taskExecServce = ThreadUtls.newDaemonFxedThreadExecutor("Master-Task-Exec-Thread", masterTaskExecNum); ths.nettyExecutorManager = nettyExecutorManager; ths.processAlertManager = processAlertManager; ths.taskTmeoutCheckLst = taskTmeoutCheckLst; } @Overrde publc vod run() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
try { startProcess(); handleEvents(); } catch (Excepton e) { logger.error("handler error:", e); } } /** * the process start nodes are submtted completely. * @return */ publc boolean sStart() { return ths.sStart; } prvate vod handleEvents() { whle (ths.stateEvents.sze() > 0) { try { StateEvent stateEvent = ths.stateEvents.peek(); f (stateEventHandler(stateEvent)) { ths.stateEvents.remove(stateEvent); } } catch (Excepton e) { logger.error("state handle error:", e); } } } publc Strng getKey() { f (StrngUtls.sNotEmpty(key) || ths.processDefnton == null) { return key;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
} key = Strng.format("%d_%d_%d", ths.processDefnton.getCode(), ths.processDefnton.getVerson(), ths.processInstance.getId()); return key; } publc boolean addStateEvent(StateEvent stateEvent) { f (processInstance.getId() != stateEvent.getProcessInstanceId()) { logger.nfo("state event would be abounded :{}", stateEvent.toStrng()); return false; } ths.stateEvents.add(stateEvent); return true; } publc nt eventSze() { return ths.stateEvents.sze(); } publc ProcessInstance getProcessInstance() { return ths.processInstance; } prvate boolean stateEventHandler(StateEvent stateEvent) { logger.nfo("process event: {}", stateEvent.toStrng()); f (!checkStateEvent(stateEvent)) { return false; } boolean result = false; swtch (stateEvent.getType()) { case PROCESS_STATE_CHANGE: result = processStateChangeHandler(stateEvent);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
break; case TASK_STATE_CHANGE: result = taskStateChangeHandler(stateEvent); break; case PROCESS_TIMEOUT: result = processTmeout(); break; case TASK_TIMEOUT: result = taskTmeout(stateEvent); break; default: break; } f (result) { ths.stateEvents.remove(stateEvent); } return result; } prvate boolean taskTmeout(StateEvent stateEvent) { f (taskInstanceHashMap.contansRow(stateEvent.getTaskInstanceId())) { return true; } TaskInstance taskInstance = taskInstanceHashMap .row(stateEvent.getTaskInstanceId()) .values() .terator().next(); f (TmeoutFlag.CLOSE == taskInstance.getTaskDefne().getTmeoutFlag()) { return true; } TaskTmeoutStrategy taskTmeoutStrategy = taskInstance.getTaskDefne().getTmeoutNotfyStrategy();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
f (TaskTmeoutStrategy.FAILED == taskTmeoutStrategy) { ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(stateEvent.getTaskInstanceId()); taskProcessor.acton(TaskActon.TIMEOUT); return false; } else { processAlertManager.sendTaskTmeoutAlert(processInstance, taskInstance, taskInstance.getTaskDefne()); return true; } } prvate boolean processTmeout() { ths.processAlertManager.sendProcessTmeoutAlert(ths.processInstance, ths.processDefnton); return true; } prvate boolean taskStateChangeHandler(StateEvent stateEvent) { TaskInstance task = processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId()); f (stateEvent.getExecutonStatus().typeIsFnshed()) { taskFnshed(task); } else f (actveTaskProcessorMaps.contansKey(stateEvent.getTaskInstanceId())) { ITaskProcessor TaskProcessor = actveTaskProcessorMaps.get(stateEvent.getTaskInstanceId()); TaskProcessor.run(); f (TaskProcessor.taskState().typeIsFnshed()) { task = processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId()); taskFnshed(task); } } else { logger.error("state handler error: {}", stateEvent.toStrng()); } return true; } prvate vod taskFnshed(TaskInstance task) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
logger.nfo("work flow {} task {} state:{} ", processInstance.getId(), task.getId(), task.getState()); f (task.taskCanRetry()) { addTaskToStandByLst(task); return; } ProcessInstance processInstance = processServce.fndProcessInstanceById(ths.processInstance.getId()); completeTaskLst.put(Long.toStrng(task.getTaskCode()), task); actveTaskProcessorMaps.remove(task.getId()); taskTmeoutCheckLst.remove(task.getId()); f (task.getState().typeIsSuccess()) { processInstance.setVarPool(task.getVarPool()); processServce.saveProcessInstance(processInstance); submtPostNode(Long.toStrng(task.getTaskCode())); } else f (task.getState().typeIsFalure()) { f (task.sCondtonsTask() || DagHelper.haveCondtonsAfterNode(Long.toStrng(task.getTaskCode()), dag)) { submtPostNode(Long.toStrng(task.getTaskCode())); } else { errorTaskLst.put(Long.toStrng(task.getTaskCode()), task); f (processInstance.getFalureStrategy() == FalureStrategy.END) { kllAllTasks(); } } } ths.updateProcessInstanceState(); } prvate boolean checkStateEvent(StateEvent stateEvent) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
f (ths.processInstance.getId() != stateEvent.getProcessInstanceId()) { logger.error("msmatch process nstance d: {}, state event:{}", ths.processInstance.getId(), stateEvent.toStrng()); return false; } return true; } prvate boolean processStateChangeHandler(StateEvent stateEvent) { try { logger.nfo("process:{} state {} change to {}", processInstance.getId(), processInstance.getState(), stateEvent.getExecutonStatus()); processInstance = processServce.fndProcessInstanceById(ths.processInstance.getId()); f (processComplementData()) { return true; } f (stateEvent.getExecutonStatus().typeIsFnshed()) { endProcess(); } f (processInstance.getState() == ExecutonStatus.READY_STOP) { kllAllTasks(); } return true; } catch (Excepton e) { logger.error("process state change error:", e); } return true; } prvate boolean processComplementData() throws Excepton { f (!needComplementProcess()) { return false;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
} Date scheduleDate = processInstance.getScheduleTme(); f (scheduleDate == null) { scheduleDate = complementLstDate.get(0); } else f (processInstance.getState().typeIsFnshed()) { endProcess(); f (complementLstDate.sze() <= 0) { logger.nfo("process complement end. process d:{}", processInstance.getId()); return true; } nt ndex = complementLstDate.ndexOf(scheduleDate); f (ndex >= complementLstDate.sze() - 1 || !processInstance.getState().typeIsSuccess()) { logger.nfo("process complement end. process d:{}", processInstance.getId()); return true; } logger.nfo("process complement contnue. process d:{}, schedule tme:{} complementLstDate:{}", processInstance.getId(), processInstance.getScheduleTme(), complementLstDate.toStrng()); scheduleDate = complementLstDate.get(ndex + 1); processInstance.setId(0); } processInstance.setScheduleTme(scheduleDate); Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam()); f (cmdParam.contansKey(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING)) { cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING); processInstance.setCommandParam(JSONUtls.toJsonStrng(cmdParam)); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
processInstance.setState(ExecutonStatus.RUNNING_EXECUTION); processInstance.setGlobalParams(ParameterUtls.curngGlobalParams( processDefnton.getGlobalParamMap(), processDefnton.getGlobalParamLst(), CommandType.COMPLEMENT_DATA, processInstance.getScheduleTme())); processInstance.setStartTme(new Date()); processInstance.setEndTme(null); processServce.saveProcessInstance(processInstance); ths.taskInstanceHashMap.clear(); startProcess(); return true; } prvate boolean needComplementProcess() { f (processInstance.sComplementData() && Flag.NO == processInstance.getIsSubProcess()) { return true; } return false; } prvate vod startProcess() throws Excepton { f (ths.taskInstanceHashMap.sze() == 0) { sStart = false; buldFlowDag(); ntTaskQueue(); submtPostNode(null); sStart = true; } } /** * process end handle
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
*/ prvate vod endProcess() { ths.stateEvents.clear(); processInstance.setEndTme(new Date()); processServce.updateProcessInstance(processInstance); f (processInstance.getState().typeIsWatngThread()) { processServce.createRecoveryWatngThreadCommand(null, processInstance); } Lst<TaskInstance> taskInstances = processServce.fndValdTaskLstByProcessId(processInstance.getId()); ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId()); processAlertManager.sendAlertProcessInstance(processInstance, taskInstances, projectUser); } /** * generate process dag * * @throws Excepton excepton */ prvate vod buldFlowDag() throws Excepton { f (ths.dag != null) { return; } processDefnton = processServce.fndProcessDefnton(processInstance.getProcessDefntonCode(), processInstance.getProcessDefntonVerson()); recoverNodeIdLst = getStartTaskInstanceLst(processInstance.getCommandParam()); Lst<TaskNode> taskNodeLst = processServce.transformTask(processServce.fndRelatonByCode(processDefnton.getProjectCode(), processDefnton.getCode()), Lsts.newArrayLst()); forbddenTaskLst.clear(); taskNodeLst.forEach(taskNode -> { f (taskNode.sForbdden()) { forbddenTaskLst.put(Long.toStrng(taskNode.getCode()), taskNode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
} }); Lst<Strng> recoveryNodeCodeLst = getRecoveryNodeCodeLst(); Lst<Strng> startNodeNameLst = parseStartNodeName(processInstance.getCommandParam()); ProcessDag processDag = generateFlowDag(taskNodeLst, startNodeNameLst, recoveryNodeCodeLst, processInstance.getTaskDependType()); f (processDag == null) { logger.error("processDag s null"); return; } dag = DagHelper.buldDagGraph(processDag); } /** * nt task queue */ prvate vod ntTaskQueue() { taskFaledSubmt = false; actveTaskProcessorMaps.clear(); dependFaledTask.clear(); completeTaskLst.clear(); errorTaskLst.clear(); Lst<TaskInstance> taskInstanceLst = processServce.fndValdTaskLstByProcessId(processInstance.getId()); for (TaskInstance task : taskInstanceLst) { f (task.sTaskComplete()) { completeTaskLst.put(Long.toStrng(task.getTaskCode()), task); } f (task.sCondtonsTask() || DagHelper.haveCondtonsAfterNode(Long.toStrng(task.getTaskCode()), dag)) { contnue;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
} f (task.getState().typeIsFalure() && !task.taskCanRetry()) { errorTaskLst.put(Long.toStrng(task.getTaskCode()), task); } } f (processInstance.sComplementData() && complementLstDate.sze() == 0) { Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam()); f (cmdParam != null && cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)) { Date start = DateUtls.strngToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE)); Date end = DateUtls.strngToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE)); Lst<Schedule> schedules = processServce.queryReleaseSchedulerLstByProcessDefntonCode(processInstance.getProcessDefntonCode()); f (complementLstDate.sze() == 0 && needComplementProcess()) { complementLstDate = CronUtls.getSelfFreDateLst(start, end, schedules); logger.nfo(" process defnton code:{} complement data: {}", processInstance.getProcessDefntonCode(), complementLstDate.toStrng()); f (complementLstDate.sze() > 0 && Flag.NO == processInstance.getIsSubProcess()) { processInstance.setScheduleTme(complementLstDate.get(0)); processInstance.setGlobalParams(ParameterUtls.curngGlobalParams( processDefnton.getGlobalParamMap(), processDefnton.getGlobalParamLst(), CommandType.COMPLEMENT_DATA, processInstance.getScheduleTme())); processServce.updateProcessInstance(processInstance); } } } } } /** * submt task to execute *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
* @param taskInstance task nstance * @return TaskInstance */ prvate TaskInstance submtTaskExec(TaskInstance taskInstance) { try { ITaskProcessor taskProcessor = TaskProcessorFactory.getTaskProcessor(taskInstance.getTaskType()); f (taskInstance.getState() == ExecutonStatus.RUNNING_EXECUTION && taskProcessor.getType().equalsIgnoreCase(Constants.COMMON_TASK_TYPE)) { notfyProcessHostUpdate(taskInstance); } boolean submt = taskProcessor.submt(taskInstance, processInstance, masterConfg.getMasterTaskCommtRetryTmes(), masterConfg.getMasterTaskCommtInterval()); f (submt) { ths.taskInstanceHashMap.put(taskInstance.getId(), taskInstance.getTaskCode(), taskInstance); actveTaskProcessorMaps.put(taskInstance.getId(), taskProcessor); taskProcessor.run(); addTmeoutCheck(taskInstance); TaskDefnton taskDefnton = processServce.fndTaskDefnton( taskInstance.getTaskCode(), taskInstance.getTaskDefntonVerson()); taskInstance.setTaskDefne(taskDefnton); f (taskProcessor.taskState().typeIsFnshed()) { StateEvent stateEvent = new StateEvent(); stateEvent.setProcessInstanceId(ths.processInstance.getId()); stateEvent.setTaskInstanceId(taskInstance.getId()); stateEvent.setExecutonStatus(taskProcessor.taskState()); stateEvent.setType(StateEventType.TASK_STATE_CHANGE); ths.stateEvents.add(stateEvent); } return taskInstance; } else {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
logger.error("process d:{} name:{} submt standby task d:{} name:{} faled!", processInstance.getId(), processInstance.getName(), taskInstance.getId(), taskInstance.getName()); return null; } } catch (Excepton e) { logger.error("submt standby task error", e); return null; } } prvate vod notfyProcessHostUpdate(TaskInstance taskInstance) { f (StrngUtls.sEmpty(taskInstance.getHost())) { return; } try { HostUpdateCommand hostUpdateCommand = new HostUpdateCommand(); hostUpdateCommand.setProcessHost(NetUtls.getAddr(masterConfg.getLstenPort())); hostUpdateCommand.setTaskInstanceId(taskInstance.getId()); Host host = new Host(taskInstance.getHost()); nettyExecutorManager.doExecute(host, hostUpdateCommand.convert2Command()); } catch (Excepton e) { logger.error("notfy process host update", e); } } prvate vod addTmeoutCheck(TaskInstance taskInstance) { TaskDefnton taskDefnton = processServce.fndTaskDefnton( taskInstance.getTaskCode(), taskInstance.getTaskDefntonVerson() ); taskInstance.setTaskDefne(taskDefnton);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
f (TmeoutFlag.OPEN == taskDefnton.getTmeoutFlag()) { ths.taskTmeoutCheckLst.put(taskInstance.getId(), taskInstance); return; } f (taskInstance.sDependTask() || taskInstance.sSubProcess()) { ths.taskTmeoutCheckLst.put(taskInstance.getId(), taskInstance); } } /** * fnd task nstance n db. * n case submt more than one same name task n the same tme. * * @param taskCode task code * @param taskVerson task verson * @return TaskInstance */ prvate TaskInstance fndTaskIfExsts(Long taskCode, nt taskVerson) { Lst<TaskInstance> taskInstanceLst = processServce.fndValdTaskLstByProcessId(ths.processInstance.getId()); for (TaskInstance taskInstance : taskInstanceLst) { f (taskInstance.getTaskCode() == taskCode && taskInstance.getTaskDefntonVerson() == taskVerson) { return taskInstance; } } return null; } /** * encapsulaton task * * @param processInstance process nstance * @param taskNode taskNode
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
* @return TaskInstance */ prvate TaskInstance createTaskInstance(ProcessInstance processInstance, TaskNode taskNode) { TaskInstance taskInstance = fndTaskIfExsts(taskNode.getCode(), taskNode.getVerson()); f (taskInstance == null) { taskInstance = new TaskInstance(); taskInstance.setTaskCode(taskNode.getCode()); taskInstance.setTaskDefntonVerson(taskNode.getVerson()); taskInstance.setName(taskNode.getName()); taskInstance.setState(ExecutonStatus.SUBMITTED_SUCCESS); taskInstance.setProcessInstanceId(processInstance.getId()); taskInstance.setTaskType(taskNode.getType().toUpperCase()); taskInstance.setAlertFlag(Flag.NO); taskInstance.setStartTme(null); taskInstance.setFlag(Flag.YES); taskInstance.setDryRun(processInstance.getDryRun()); taskInstance.setRetryTmes(0); taskInstance.setMaxRetryTmes(taskNode.getMaxRetryTmes()); taskInstance.setRetryInterval(taskNode.getRetryInterval());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
taskInstance.setTaskParams(taskNode.getTaskParams()); f (taskNode.getTaskInstanceProrty() == null) { taskInstance.setTaskInstanceProrty(Prorty.MEDIUM); } else { taskInstance.setTaskInstanceProrty(taskNode.getTaskInstanceProrty()); } Strng processWorkerGroup = processInstance.getWorkerGroup(); processWorkerGroup = StrngUtls.sBlank(processWorkerGroup) ? DEFAULT_WORKER_GROUP : processWorkerGroup; Strng taskWorkerGroup = StrngUtls.sBlank(taskNode.getWorkerGroup()) ? processWorkerGroup : taskNode.getWorkerGroup(); Long processEnvronmentCode = Objects.sNull(processInstance.getEnvronmentCode()) ? -1 : processInstance.getEnvronmentCode(); Long taskEnvronmentCode = Objects.sNull(taskNode.getEnvronmentCode()) ? processEnvronmentCode : taskNode.getEnvronmentCode(); f (!processWorkerGroup.equals(DEFAULT_WORKER_GROUP) && taskWorkerGroup.equals(DEFAULT_WORKER_GROUP)) { taskInstance.setWorkerGroup(processWorkerGroup); taskInstance.setEnvronmentCode(processEnvronmentCode); } else { taskInstance.setWorkerGroup(taskWorkerGroup); taskInstance.setEnvronmentCode(taskEnvronmentCode); } f (!taskInstance.getEnvronmentCode().equals(-1L)) { Envronment envronment = processServce.fndEnvronmentByCode(taskInstance.getEnvronmentCode()); f (Objects.nonNull(envronment) && StrngUtls.sNotEmpty(envronment.getConfg())) { taskInstance.setEnvronmentConfg(envronment.getConfg()); } } taskInstance.setDelayTme(taskNode.getDelayTme()); } return taskInstance;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
} publc vod getPreVarPool(TaskInstance taskInstance, Set<Strng> preTask) { Map<Strng, Property> allProperty = new HashMap<>(); Map<Strng, TaskInstance> allTaskInstance = new HashMap<>(); f (CollectonUtls.sNotEmpty(preTask)) { for (Strng preTaskName : preTask) { TaskInstance preTaskInstance = completeTaskLst.get(preTaskName); f (preTaskInstance == null) { contnue; } Strng preVarPool = preTaskInstance.getVarPool(); f (StrngUtls.sNotEmpty(preVarPool)) { Lst<Property> propertes = JSONUtls.toLst(preVarPool, Property.class); for (Property nfo : propertes) { setVarPoolValue(allProperty, allTaskInstance, preTaskInstance, nfo); } } } f (allProperty.sze() > 0) { taskInstance.setVarPool(JSONUtls.toJsonStrng(allProperty.values())); } } } prvate vod setVarPoolValue(Map<Strng, Property> allProperty, Map<Strng, TaskInstance> allTaskInstance, TaskInstance preTaskInstance, Property thsProperty) { thsProperty.setDrect(Drect.IN); Strng proName = thsProperty.getProp(); f (allProperty.contansKey(proName)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
Property otherPro = allProperty.get(proName); f (StrngUtls.sEmpty(thsProperty.getValue())) { allProperty.put(proName, otherPro); } else f (StrngUtls.sNotEmpty(otherPro.getValue())) { TaskInstance otherTask = allTaskInstance.get(proName); f (otherTask.getEndTme().getTme() > preTaskInstance.getEndTme().getTme()) { allProperty.put(proName, thsProperty); allTaskInstance.put(proName, preTaskInstance); } else { allProperty.put(proName, otherPro); } } else { allProperty.put(proName, thsProperty); allTaskInstance.put(proName, preTaskInstance); } } else { allProperty.put(proName, thsProperty); allTaskInstance.put(proName, preTaskInstance); } } prvate vod submtPostNode(Strng parentNodeCode) { Set<Strng> submtTaskNodeLst = DagHelper.parsePostNodes(parentNodeCode, skpTaskNodeLst, dag, completeTaskLst); Lst<TaskInstance> taskInstances = new ArrayLst<>(); for (Strng taskNode : submtTaskNodeLst) { TaskNode taskNodeObject = dag.getNode(taskNode); f (taskInstanceHashMap.contansColumn(taskNodeObject.getCode())) { contnue;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
} TaskInstance task = createTaskInstance(processInstance, taskNodeObject); taskInstances.add(task); } for (TaskInstance task : taskInstances) { f (readyToSubmtTaskQueue.contans(task)) { contnue; } f (completeTaskLst.contansKey(Long.toStrng(task.getTaskCode()))) { logger.nfo("task {} has already run success", task.getName()); contnue; } f (task.getState().typeIsPause() || task.getState().typeIsCancel()) { logger.nfo("task {} stopped, the state s {}", task.getName(), task.getState()); } else { addTaskToStandByLst(task); } } submtStandByTask(); updateProcessInstanceState(); } /** * determne whether the dependences of the task node are complete * * @return DependResult */ prvate DependResult sTaskDepsComplete(Strng taskCode) { Collecton<Strng> startNodes = dag.getBegnNode();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
f (startNodes.contans(taskCode)) { return DependResult.SUCCESS; } TaskNode taskNode = dag.getNode(taskCode); Lst<Strng> depCodeLst = taskNode.getDepLst(); for (Strng depsNode : depCodeLst) { f (!dag.contansNode(depsNode) || forbddenTaskLst.contansKey(depsNode) || skpTaskNodeLst.contansKey(depsNode)) { contnue; } f (!completeTaskLst.contansKey(depsNode)) { return DependResult.WAITING; } ExecutonStatus depTaskState = completeTaskLst.get(depsNode).getState(); f (depTaskState.typeIsPause() || depTaskState.typeIsCancel()) { return DependResult.NON_EXEC; } f (taskNode.sCondtonsTask()) { contnue; } f (!dependTaskSuccess(depsNode, taskCode)) { return DependResult.FAILED; } } logger.nfo("taskCode: {} completeDependTaskLst: {}", taskCode, Arrays.toStrng(completeTaskLst.keySet().toArray())); return DependResult.SUCCESS; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
/** * depend node s completed, but here need check the condton task branch s the next node */ prvate boolean dependTaskSuccess(Strng dependNodeName, Strng nextNodeName) { f (dag.getNode(dependNodeName).sCondtonsTask()) { Lst<Strng> nextTaskLst = DagHelper.parseCondtonTask(dependNodeName, skpTaskNodeLst, dag, completeTaskLst); f (!nextTaskLst.contans(nextNodeName)) { return false; } } else { ExecutonStatus depTaskState = completeTaskLst.get(dependNodeName).getState(); f (depTaskState.typeIsFalure()) { return false; } } return true; } /** * query task nstance by complete state * * @param state state * @return task nstance lst */ prvate Lst<TaskInstance> getCompleteTaskByState(ExecutonStatus state) { Lst<TaskInstance> resultLst = new ArrayLst<>(); for (Map.Entry<Strng, TaskInstance> entry : completeTaskLst.entrySet()) { f (entry.getValue().getState() == state) { resultLst.add(entry.getValue()); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
} return resultLst; } /** * where there are ongong tasks * * @param state state * @return ExecutonStatus */ prvate ExecutonStatus runnngState(ExecutonStatus state) { f (state == ExecutonStatus.READY_STOP || state == ExecutonStatus.READY_PAUSE || state == ExecutonStatus.WAITING_THREAD || state == ExecutonStatus.DELAY_EXECUTION) { return state; } else { return ExecutonStatus.RUNNING_EXECUTION; } } /** * exsts falure task,contans submt falure、dependency falure,execute falure(retry after) * * @return Boolean whether has faled task */ prvate boolean hasFaledTask() { f (ths.taskFaledSubmt) { return true; } f (ths.errorTaskLst.sze() > 0) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
return true; } return ths.dependFaledTask.sze() > 0; } /** * process nstance falure * * @return Boolean whether process nstance faled */ prvate boolean processFaled() { f (hasFaledTask()) { f (processInstance.getFalureStrategy() == FalureStrategy.END) { return true; } f (processInstance.getFalureStrategy() == FalureStrategy.CONTINUE) { return readyToSubmtTaskQueue.sze() == 0 || actveTaskProcessorMaps.sze() == 0; } } return false; } /** * whether task for watng thread * * @return Boolean whether has watng thread task */ prvate boolean hasWatngThreadTask() { Lst<TaskInstance> watngLst = getCompleteTaskByState(ExecutonStatus.WAITING_THREAD); return CollectonUtls.sNotEmpty(watngLst); } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
* prepare for pause * 1,faled retry task n the preparaton queue , returns to falure drectly * 2,exsts pause task,complement not completed, pendng submsson of tasks, return to suspenson * 3,success * * @return ExecutonStatus */ prvate ExecutonStatus processReadyPause() { f (hasRetryTaskInStandBy()) { return ExecutonStatus.FAILURE; } Lst<TaskInstance> pauseLst = getCompleteTaskByState(ExecutonStatus.PAUSE); f (CollectonUtls.sNotEmpty(pauseLst) || !sComplementEnd() || readyToSubmtTaskQueue.sze() > 0) { return ExecutonStatus.PAUSE; } else { return ExecutonStatus.SUCCESS; } } /** * generate the latest process nstance status by the tasks state * * @param nstance * @return process nstance executon status */ prvate ExecutonStatus getProcessInstanceState(ProcessInstance nstance) { ExecutonStatus state = nstance.getState(); f (actveTaskProcessorMaps.sze() > 0 || hasRetryTaskInStandBy()) { // actve
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
return runnngState(state); } // process falure f (processFaled()) { return ExecutonStatus.FAILURE; } // watng thread f (hasWatngThreadTask()) { return ExecutonStatus.WAITING_THREAD; } // pause f (state == ExecutonStatus.READY_PAUSE) { return processReadyPause(); } // stop f (state == ExecutonStatus.READY_STOP) { Lst<TaskInstance> stopLst = getCompleteTaskByState(ExecutonStatus.STOP); Lst<TaskInstance> kllLst = getCompleteTaskByState(ExecutonStatus.KILL); f (CollectonUtls.sNotEmpty(stopLst) || CollectonUtls.sNotEmpty(kllLst) || !sComplementEnd()) { return ExecutonStatus.STOP; } else { return ExecutonStatus.SUCCESS; } } // success f (state == ExecutonStatus.RUNNING_EXECUTION) { Lst<TaskInstance> kllTasks = getCompleteTaskByState(ExecutonStatus.KILL); f (readyToSubmtTaskQueue.sze() > 0) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
//tasks cu return ExecutonStatus.RUNNING_EXECUTION; } else f (CollectonUtls.sNotEmpty(kllTasks)) { // tasks m return ExecutonStatus.FAILURE; } else { // f the return ExecutonStatus.SUCCESS; } } return state; } /** * whether complement end * * @return Boolean whether s complement end */ prvate boolean sComplementEnd() { f (!processInstance.sComplementData()) { return true; } try { Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam()); Date endTme = DateUtls.getScheduleDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE)); return processInstance.getScheduleTme().equals(endTme); } catch (Excepton e) { logger.error("complement end faled ", e); return false; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
/** * updateProcessInstance process nstance state * after each batch of tasks s executed, the status of the process nstance s updated */ prvate vod updateProcessInstanceState() { ProcessInstance nstance = processServce.fndProcessInstanceById(processInstance.getId()); ExecutonStatus state = getProcessInstanceState(nstance); f (processInstance.getState() != state) { logger.nfo( "work flow process nstance [d: {}, name:{}], state change from {} to {}, cmd type: {}", processInstance.getId(), processInstance.getName(), processInstance.getState(), state, processInstance.getCommandType()); nstance.setState(state); processServce.updateProcessInstance(nstance); processInstance = nstance; StateEvent stateEvent = new StateEvent(); stateEvent.setExecutonStatus(processInstance.getState()); stateEvent.setProcessInstanceId(ths.processInstance.getId()); stateEvent.setType(StateEventType.PROCESS_STATE_CHANGE); ths.processStateChangeHandler(stateEvent); } } /** * get task dependency result * * @param taskInstance task nstance * @return DependResult */ prvate DependResult getDependResultForTask(TaskInstance taskInstance) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
return sTaskDepsComplete(Long.toStrng(taskInstance.getTaskCode())); } /** * add task to standby lst * * @param taskInstance task nstance */ prvate vod addTaskToStandByLst(TaskInstance taskInstance) { logger.nfo("add task to stand by lst: {}", taskInstance.getName()); try { readyToSubmtTaskQueue.put(taskInstance); } catch (Excepton e) { logger.error("add task nstance to readyToSubmtTaskQueue error, taskName: {}", taskInstance.getName(), e); } } /** * remove task from stand by lst * * @param taskInstance task nstance */ prvate vod removeTaskFromStandbyLst(TaskInstance taskInstance) { logger.nfo("remove task from stand by lst, d: {} name:{}", taskInstance.getId(), taskInstance.getName()); try { readyToSubmtTaskQueue.remove(taskInstance); } catch (Excepton e) { logger.error("remove task nstance from readyToSubmtTaskQueue error, task d:{}, Name: {}", taskInstance.getId(), taskInstance.getName(), e);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
} } /** * has retry task n standby * * @return Boolean whether has retry task n standby */ prvate boolean hasRetryTaskInStandBy() { for (Iterator<TaskInstance> ter = readyToSubmtTaskQueue.terator(); ter.hasNext(); ) { f (ter.next().getState().typeIsFalure()) { return true; } } return false; } /** * close the on gong tasks */ prvate vod kllAllTasks() { logger.nfo("kll called on process nstance d: {}, num: {}", processInstance.getId(), actveTaskProcessorMaps.sze()); for (nt taskId : actveTaskProcessorMaps.keySet()) { TaskInstance taskInstance = processServce.fndTaskInstanceById(taskId); f (taskInstance == null || taskInstance.getState().typeIsFnshed()) { contnue; } ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskId); taskProcessor.acton(TaskActon.STOP); f (taskProcessor.taskState().typeIsFnshed()) { StateEvent stateEvent = new StateEvent();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
stateEvent.setType(StateEventType.TASK_STATE_CHANGE); stateEvent.setProcessInstanceId(ths.processInstance.getId()); stateEvent.setTaskInstanceId(taskInstance.getId()); stateEvent.setExecutonStatus(taskProcessor.taskState()); ths.addStateEvent(stateEvent); } } } publc boolean workFlowFnsh() { return ths.processInstance.getState().typeIsFnshed(); } /** * whether the retry nterval s tmed out * * @param taskInstance task nstance * @return Boolean */ prvate boolean retryTaskIntervalOverTme(TaskInstance taskInstance) { f (taskInstance.getState() != ExecutonStatus.FAILURE) { return true; } f (taskInstance.getId() == 0 || taskInstance.getMaxRetryTmes() == 0 || taskInstance.getRetryInterval() == 0) { return true; } Date now = new Date(); long faledTmeInterval = DateUtls.dfferSec(now, taskInstance.getEndTme());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
// task retry does not over tme, return false return taskInstance.getRetryInterval() * SEC_2_MINUTES_TIME_UNIT < faledTmeInterval; } /** * handlng the lst of tasks to be submtted */ prvate vod submtStandByTask() { try { nt length = readyToSubmtTaskQueue.sze(); for (nt = 0; < length; ++) { TaskInstance task = readyToSubmtTaskQueue.peek(); f (task == null) { contnue; } // stop ta f (task.taskCanRetry()) { TaskInstance retryTask = processServce.fndTaskInstanceById(task.getId()); f (retryTask != null && retryTask.getState().equals(ExecutonStatus.FORCED_SUCCESS)) { task.setState(retryTask.getState()); logger.nfo("task: {} has been forced success, put t nto complete task lst and stop retryng", task.getName()); removeTaskFromStandbyLst(task); completeTaskLst.put(Long.toStrng(task.getTaskCode()), task); submtPostNode(Long.toStrng(task.getTaskCode())); contnue; } } //nt var f (task.sFrstRun()) { //get pre Set<Strng> preTask = dag.getPrevousNodes(Long.toStrng(task.getTaskCode()));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
getPreVarPool(task, preTask); } DependResult dependResult = getDependResultForTask(task); f (DependResult.SUCCESS == dependResult) { f (retryTaskIntervalOverTme(task)) { TaskInstance taskInstance = submtTaskExec(task); f (taskInstance == null) { ths.taskFaledSubmt = true; } else { removeTaskFromStandbyLst(task); } } } else f (DependResult.FAILED == dependResult) { // f the dependFaledTask.put(Long.toStrng(task.getTaskCode()), task); removeTaskFromStandbyLst(task); logger.nfo("task {},d:{} depend result : {}", task.getName(), task.getId(), dependResult); } else f (DependResult.NON_EXEC == dependResult) { // for som removeTaskFromStandbyLst(task); logger.nfo("remove task {},d:{} , because depend result : {}", task.getName(), task.getId(), dependResult); } } } catch (Excepton e) { logger.error("submt standby task error", e); } } /** * get recovery task nstance *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
* @param taskId task d * @return recovery task nstance */ prvate TaskInstance getRecoveryTaskInstance(Strng taskId) { f (!StrngUtls.sNotEmpty(taskId)) { return null; } try { Integer ntId = Integer.valueOf(taskId); TaskInstance task = processServce.fndTaskInstanceById(ntId); f (task == null) { logger.error("start node d cannot be found: {}", taskId); } else { return task; } } catch (Excepton e) { logger.error("get recovery task nstance faled ", e); } return null; } /** * get start task nstance lst * * @param cmdParam command param * @return task nstance lst */ prvate Lst<TaskInstance> getStartTaskInstanceLst(Strng cmdParam) { Lst<TaskInstance> nstanceLst = new ArrayLst<>(); Map<Strng, Strng> paramMap = JSONUtls.toMap(cmdParam); f (paramMap != null && paramMap.contansKey(CMD_PARAM_RECOVERY_START_NODE_STRING)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
6,543
[Bug] [Master] process instance state is always running when failure task exists
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### What you expected to happen the process instance state is failed when failed task exists. ### How to reproduce process instance state is always running when failure task exists. the failure task setting: retry times: 1, retry interval: 1 minute ### Anything else _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/6543
https://github.com/apache/dolphinscheduler/pull/6547
ba4cb9d22ad02ba4927fd23ea811c82639261e69
52a550b6aefa5652f17b7bbc9e056a83efa23c8a
"2021-10-15T08:39:19Z"
java
"2021-10-15T10:04:04Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
Strng[] dLst = paramMap.get(CMD_PARAM_RECOVERY_START_NODE_STRING).splt(Constants.COMMA); for (Strng nodeId : dLst) { TaskInstance task = getRecoveryTaskInstance(nodeId); f (task != null) { nstanceLst.add(task); } } } return nstanceLst; } /** * parse "StartNodeNameLst" from cmd param * * @param cmdParam command param * @return start node name lst */ prvate Lst<Strng> parseStartNodeName(Strng cmdParam) { Lst<Strng> startNodeNameLst = new ArrayLst<>(); Map<Strng, Strng> paramMap = JSONUtls.toMap(cmdParam); f (paramMap == null) { return startNodeNameLst; } f (paramMap.contansKey(CMD_PARAM_START_NODE_NAMES)) { startNodeNameLst = Arrays.asLst(paramMap.get(CMD_PARAM_START_NODE_NAMES).splt(Constants.COMMA)); } return startNodeNameLst; } /** * generate start node code lst from parsng command param; * f "StartNodeIdLst" exsts n command param, return StartNodeIdLst