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
timestamp[us, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} ProcessInstanceMap instanceMap = setProcessInstanceMap(parentProcessInstance, task); TaskNode taskNode = JSONUtils.parseObject(task.getTaskJson(), TaskNode.class); Map<String, String> subProcessParam = JSONUtils.toMap(taskNode.getParams()); Integer childDefineId = Integer.parseInt(subProcessParam.get(Constants.CMDPARAM_SUB_PROCESS_DEFINE_ID)); ProcessInstance childInstance = findSubProcessInstance(parentProcessInstance.getId(), task.getId()); CommandType fatherType = parentProcessInstance.getCommandType(); CommandType commandType = fatherType; if(childInstance == null || commandType == CommandType.REPEAT_RUNNING){ String fatherHistoryCommand = parentProcessInstance.getHistoryCmd(); if(fatherHistoryCommand.startsWith(CommandType.SCHEDULER.toString()) || fatherHistoryCommand.startsWith(CommandType.COMPLEMENT_DATA.toString())){ commandType = CommandType.valueOf(fatherHistoryCommand.split(Constants.COMMA)[0]); } } if(childInstance != null){ childInstance.setState(ExecutionStatus.SUBMITTED_SUCCESS); updateProcessInstance(childInstance); } String processMapStr = JSONUtils.toJson(instanceMap); Map<String, String> cmdParam = JSONUtils.toMap(processMapStr); if(commandType == CommandType.COMPLEMENT_DATA || (childInstance != null && childInstance.isComplementData())){ Map<String, String> parentParam = JSONUtils.toMap(parentProcessInstance.getCommandParam()); String endTime = parentParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE); String startTime = parentParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE); cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, endTime);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, startTime); processMapStr = JSONUtils.toJson(cmdParam); } updateSubProcessDefinitionByParent(parentProcessInstance, childDefineId); Command command = new Command(); command.setWarningType(parentProcessInstance.getWarningType()); command.setWarningGroupId(parentProcessInstance.getWarningGroupId()); command.setFailureStrategy(parentProcessInstance.getFailureStrategy()); command.setProcessDefinitionId(childDefineId); command.setScheduleTime(parentProcessInstance.getScheduleTime()); command.setExecutorId(parentProcessInstance.getExecutorId()); command.setCommandParam(processMapStr); command.setCommandType(commandType); command.setProcessInstancePriority(parentProcessInstance.getProcessInstancePriority()); createCommand(command); logger.info("sub process command created: {} ", command.toString()); } /** * update sub process definition * @param parentProcessInstance parentProcessInstance * @param childDefinitionId childDefinitionId */ private void updateSubProcessDefinitionByParent(ProcessInstance parentProcessInstance, int childDefinitionId) { ProcessDefinition fatherDefinition = this.findProcessDefineById(parentProcessInstance.getProcessDefinitionId()); ProcessDefinition childDefinition = this.findProcessDefineById(childDefinitionId); if(childDefinition != null && fatherDefinition != null){ childDefinition.setReceivers(fatherDefinition.getReceivers()); childDefinition.setReceiversCc(fatherDefinition.getReceiversCc()); processDefineMapper.updateById(childDefinition); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} /** * submit task to mysql * @param taskInstance taskInstance * @param processInstance processInstance * @return task instance */ public TaskInstance submitTaskInstanceToDB(TaskInstance taskInstance, ProcessInstance processInstance){ ExecutionStatus processInstanceState = processInstance.getState(); if(taskInstance.getState().typeIsFailure()){ if(taskInstance.isSubProcess()){ taskInstance.setRetryTimes(taskInstance.getRetryTimes() + 1 ); }else { if( processInstanceState != ExecutionStatus.READY_STOP && processInstanceState != ExecutionStatus.READY_PAUSE){ taskInstance.setFlag(Flag.NO); updateTaskInstance(taskInstance); if(taskInstance.getState() != ExecutionStatus.NEED_FAULT_TOLERANCE){ taskInstance.setRetryTimes(taskInstance.getRetryTimes() + 1 ); } taskInstance.setEndTime(null); taskInstance.setStartTime(new Date()); taskInstance.setFlag(Flag.YES); taskInstance.setHost(null); taskInstance.setId(0); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
taskInstance.setExecutorId(processInstance.getExecutorId()); taskInstance.setProcessInstancePriority(processInstance.getProcessInstancePriority()); taskInstance.setState(getSubmitTaskState(taskInstance, processInstanceState)); taskInstance.setSubmitTime(new Date()); boolean saveResult = saveTaskInstance(taskInstance); if(!saveResult){ return null; } return taskInstance; } /** * ${processInstancePriority}_${processInstanceId}_${taskInstancePriority}_${taskInstanceId}_${task executed by ip1},${ip2}... * The tasks with the highest priority are selected by comparing the priorities of the above four levels from high to low. * @param taskInstance taskInstance * @return task zk queue str */ public String taskZkInfo(TaskInstance taskInstance) { String taskWorkerGroup = getTaskWorkerGroup(taskInstance); ProcessInstance processInstance = this.findProcessInstanceById(taskInstance.getProcessInstanceId()); if(processInstance == null){ logger.error("process instance is null. please check the task info, task id: " + taskInstance.getId()); return ""; } StringBuilder sb = new StringBuilder(100); sb.append(processInstance.getProcessInstancePriority().ordinal()).append(Constants.UNDERLINE) .append(taskInstance.getProcessInstanceId()).append(Constants.UNDERLINE) .append(taskInstance.getTaskInstancePriority().ordinal()).append(Constants.UNDERLINE) .append(taskInstance.getId()).append(Constants.UNDERLINE) .append(taskInstance.getWorkerGroup()); return sb.toString();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} /** * get submit task instance state by the work process state * cannot modify the task state when running/kill/submit success, or this * task instance is already exists in task queue . * return pause if work process state is ready pause * return stop if work process state is ready stop * if all of above are not satisfied, return submit success * * @param taskInstance taskInstance * @param processInstanceState processInstanceState * @return process instance state */ public ExecutionStatus getSubmitTaskState(TaskInstance taskInstance, ExecutionStatus processInstanceState){ ExecutionStatus state = taskInstance.getState(); if( state == ExecutionStatus.RUNNING_EXEUTION || state == ExecutionStatus.KILL || checkTaskExistsInTaskQueue(taskInstance) ){ return state; } if( processInstanceState == ExecutionStatus.READY_PAUSE){ state = ExecutionStatus.PAUSE; }else if(processInstanceState == ExecutionStatus.READY_STOP
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
|| !checkProcessStrategy(taskInstance)) { state = ExecutionStatus.KILL; }else{ state = ExecutionStatus.SUBMITTED_SUCCESS; } return state; } /** * check process instance strategy * @param taskInstance taskInstance * @return check strategy result */ private boolean checkProcessStrategy(TaskInstance taskInstance){ ProcessInstance processInstance = this.findProcessInstanceById(taskInstance.getProcessInstanceId()); FailureStrategy failureStrategy = processInstance.getFailureStrategy(); if(failureStrategy == FailureStrategy.CONTINUE){ return true; } List<TaskInstance> taskInstances = this.findValidTaskListByProcessId(taskInstance.getProcessInstanceId()); for(TaskInstance task : taskInstances){ if(task.getState() == ExecutionStatus.FAILURE){ return false; } } return true; } /** * check the task instance existing in queue * @param taskInstance taskInstance * @return whether taskinstance exists queue
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
*/ public boolean checkTaskExistsInTaskQueue(TaskInstance taskInstance){ if(taskInstance.isSubProcess()){ return false; } String taskZkInfo = taskZkInfo(taskInstance); return false; } /** * create a new process instance * @param processInstance processInstance */ public void createProcessInstance(ProcessInstance processInstance){ if (processInstance != null){ processInstanceMapper.insert(processInstance); } } /** * insert or update work process instance to data base * @param processInstance processInstance */ public void saveProcessInstance(ProcessInstance processInstance){ if (processInstance == null){ logger.error("save error, process instance is null!"); return ; } if(processInstance.getId() != 0){ processInstanceMapper.updateById(processInstance); }else{ createProcessInstance(processInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} } /** * insert or update command * @param command command * @return save command result */ public int saveCommand(Command command){ if(command.getId() != 0){ return commandMapper.updateById(command); }else{ return commandMapper.insert(command); } } /** * insert or update task instance * @param taskInstance taskInstance * @return save task instance result */ public boolean saveTaskInstance(TaskInstance taskInstance){ if(taskInstance.getId() != 0){ return updateTaskInstance(taskInstance); }else{ return createTaskInstance(taskInstance); } } /** * insert task instance * @param taskInstance taskInstance * @return create task instance result
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
*/ public boolean createTaskInstance(TaskInstance taskInstance) { int count = taskInstanceMapper.insert(taskInstance); return count > 0; } /** * update task instance * @param taskInstance taskInstance * @return update task instance result */ public boolean updateTaskInstance(TaskInstance taskInstance){ int count = taskInstanceMapper.updateById(taskInstance); return count > 0; } /** * delete a command by id * @param id id */ public void delCommandByid(int id) { commandMapper.deleteById(id); } /** * find task instance by id * @param taskId task id * @return task intance */ public TaskInstance findTaskInstanceById(Integer taskId){ return taskInstanceMapper.selectById(taskId); } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* package task instance,associate processInstance and processDefine * @param taskInstId taskInstId * @return task instance */ public TaskInstance getTaskInstanceDetailByTaskId(int taskInstId){ // TaskInstance taskInstance = findTaskInstanceById(taskInstId); if(taskInstance == null){ return taskInstance; } // ProcessInstance processInstance = findProcessInstanceDetailById(taskInstance.getProcessInstanceId()); // ProcessDefinition processDefine = findProcessDefineById(taskInstance.getProcessDefinitionId()); taskInstance.setProcessInstance(processInstance); taskInstance.setProcessDefine(processDefine); return taskInstance; } /** * 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
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return task instance list */ public List<TaskInstance> findValidTaskListByProcessId(Integer processInstanceId){ return taskInstanceMapper.findValidTaskListByProcessId(processInstanceId, Flag.YES); } /** * 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){ Integer count = 0; if(processInstanceMap !=null){ return processInstanceMapMapper.insert(processInstanceMap);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} return count; } /** * 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
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
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 */ public void changeTaskState(ExecutionStatus state, Date startTime, String host, String executePath,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
String logPath, int taskInstId) { TaskInstance taskInstance = taskInstanceMapper.selectById(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); } /** * update the process instance * @param processInstanceId processInstanceId * @param processJson processJson * @param globalParams globalParams * @param scheduleTime scheduleTime * @param flag flag * @param locations locations * @param connects connects * @return update process instance result */ public int updateProcessInstance(Integer processInstanceId, String processJson,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
String globalParams, Date scheduleTime, Flag flag, String locations, String connects){ ProcessInstance processInstance = processInstanceMapper.queryDetailById(processInstanceId); if(processInstance!= null){ processInstance.setProcessInstanceJson(processJson); processInstance.setGlobalParams(globalParams); processInstance.setScheduleTime(scheduleTime); processInstance.setLocations(locations); processInstance.setConnects(connects); return processInstanceMapper.updateById(processInstance); } return 0; } /** * change task state * @param state state * @param endTime endTime * @param taskInstId taskInstId */ public void changeTaskState(ExecutionStatus state, Date endTime, int processId, String appIds, int taskInstId) { TaskInstance taskInstance = taskInstanceMapper.selectById(taskInstId); taskInstance.setPid(processId); taskInstance.setAppLink(appIds); taskInstance.setState(state); taskInstance.setEndTime(endTime); saveTaskInstance(taskInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} /** * 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<String>(intList.size()); for(Integer intVar : intList){ result.add(String.valueOf(intVar)); } return result; } /** * update pid and app links field by task instance id * @param taskInstId taskInstId * @param pid pid * @param appLinks appLinks */ public void updatePidByTaskInstId(int taskInstId, int pid,String appLinks) { TaskInstance taskInstance = taskInstanceMapper.selectById(taskInstId); taskInstance.setPid(pid); taskInstance.setAppLink(appLinks); saveTaskInstance(taskInstance); } /** * query schedule by id
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param id id * @return schedule */ public Schedule querySchedule(int id) { return scheduleMapper.selectById(id); } /** * query Schedule by processDefinitionId * @param processDefinitionId processDefinitionId * @see Schedule */ public List<Schedule> queryReleaseSchedulerListByProcessDefinitionId(int processDefinitionId) { return scheduleMapper.queryReleaseSchedulerListByProcessDefinitionId(processDefinitionId); } /** * query need failover process instance * @param host host * @return process instance list */ public List<ProcessInstance> queryNeedFailoverProcessInstances(String host){ return processInstanceMapper.queryByHostAndStatus(host, stateArray); } /** * process need failover process instance * @param processInstance processInstance */ @Transactional(rollbackFor = Exception.class) public void processNeedFailoverProcessInstances(ProcessInstance processInstance){ // processInstance.setHost("null");
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
processInstanceMapper.updateById(processInstance); // Command cmd = new Command(); cmd.setProcessDefinitionId(processInstance.getProcessDefinitionId()); cmd.setCommandParam(String.format("{\"%s\":%d}", Constants.CMDPARAM_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); } /** * 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
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @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); 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
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param resourceType resource type * @return tenant code */ public String queryTenantCodeByResName(String resName,ResourceType resourceType){ return resourceMapper.queryTenantCodeByResourceName(resName, resourceType.ordinal()); } /** * find schedule list by process define id. * @param ids ids * @return schedule list */ public List<Schedule> selectAllByProcessDefineId(int[] ids){ return scheduleMapper.selectAllByProcessDefineArray( ids); } /** * get dependency cycle by work process define id and scheduler fire time * @param masterId masterId * @param processDefinitionId processDefinitionId * @param scheduledFireTime the time the task schedule is expected to trigger * @return CycleDependency * @throws Exception if error throws Exception */ public CycleDependency getCycleDependency(int masterId, int processDefinitionId, Date scheduledFireTime) throws Exception { List<CycleDependency> list = getCycleDependencies(masterId,new int[]{processDefinitionId},scheduledFireTime); return list.size()>0 ? list.get(0) : null; } /** * get dependency cycle list by work process define id list and scheduler fire time * @param masterId masterId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param ids ids * @param scheduledFireTime the time the task schedule is expected to trigger * @return CycleDependency list * @throws Exception if error throws Exception */ public List<CycleDependency> getCycleDependencies(int masterId,int[] ids,Date scheduledFireTime) throws Exception { List<CycleDependency> cycleDependencyList = new ArrayList<CycleDependency>(); if(ArrayUtils.isEmpty(ids)){ logger.warn("ids[] is empty!is invalid!"); return cycleDependencyList; } if(scheduledFireTime == null){ logger.warn("scheduledFireTime is null!is invalid!"); return cycleDependencyList; } String strCrontab = ""; CronExpression depCronExpression; Cron depCron; List<Date> list; List<Schedule> schedules = this.selectAllByProcessDefineId(ids); // for(Schedule depSchedule:schedules){ strCrontab = depSchedule.getCrontab(); depCronExpression = CronUtils.parse2CronExpression(strCrontab); depCron = CronUtils.parse2Cron(strCrontab); CycleEnum cycleEnum = CronUtils.getMiniCycle(depCron); if(cycleEnum == null){ logger.error("{} is not valid",strCrontab); continue; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
Calendar calendar = Calendar.getInstance(); switch (cycleEnum){ /*case MINUTE: calendar.add(Calendar.MINUTE,-61);*/ case HOUR: calendar.add(Calendar.HOUR,-25); break; case DAY: calendar.add(Calendar.DATE,-32); break; case WEEK: calendar.add(Calendar.DATE,-32); break; case MONTH: calendar.add(Calendar.MONTH,-13); break; default: logger.warn("Dependent process definition's cycleEnum is {},not support!!", cycleEnum.name()); continue; } Date start = calendar.getTime(); if(depSchedule.getProcessDefinitionId() == masterId){ list = CronUtils.getSelfFireDateList(start, scheduledFireTime, depCronExpression); }else { list = CronUtils.getFireDateList(start, scheduledFireTime, depCronExpression); } if(list.size()>=1){ start = list.get(list.size()-1); CycleDependency dependency = new CycleDependency(depSchedule.getProcessDefinitionId(),start, CronUtils.getExpirationTime(start, cycleEnum), cycleEnum); cycleDependencyList.add(dependency);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} } return cycleDependencyList; } /** * find last scheduler process instance in the date interval * @param definitionId definitionId * @param dateInterval dateInterval * @return process instance */ public ProcessInstance findLastSchedulerProcessInterval(int definitionId, DateInterval dateInterval) { return processInstanceMapper.queryLastSchedulerProcess(definitionId, dateInterval.getStartTime(), dateInterval.getEndTime()); } /** * find last manual process instance interval * @param definitionId process definition id * @param dateInterval dateInterval * @return process instance */ public ProcessInstance findLastManualProcessInterval(int definitionId, DateInterval dateInterval) { return processInstanceMapper.queryLastManualProcess(definitionId, dateInterval.getStartTime(), dateInterval.getEndTime()); } /** * find last running process instance * @param definitionId process definition id * @param startTime start time
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param endTime end time * @return process instance */ public ProcessInstance findLastRunningProcess(int definitionId, Date startTime, Date endTime) { return processInstanceMapper.queryLastRunningProcess(definitionId, startTime, endTime, stateArray); } /** * query user queue by process instance id * @param processInstanceId processInstanceId * @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; } /** * get task worker group * @param taskInstance taskInstance * @return workerGroupId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
*/ public String getTaskWorkerGroup(TaskInstance taskInstance) { 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
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
/** * get have perm project ids * @param userId userId * @return project ids */ public List<Integer> getProjectIdListHavePerm(int userId){ List<Integer> projectIdList = new ArrayList<>(); for(Project project : getProjectListHavePerm(userId)){ projectIdList.add(project.getId()); } return projectIdList; } /** * 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<T>(); if (!ArrayUtils.isEmpty(needChecks)) { Set<T> originResSet = new HashSet<T>(Arrays.asList(needChecks)); switch (authorizationType){ case RESOURCE_FILE_ID: Set<Integer> authorizedResourceFiles = resourceMapper.listAuthorizedResourceById(userId, needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedResourceFiles); break; case RESOURCE_FILE_NAME: Set<String> authorizedResources = resourceMapper.listAuthorizedResource(userId, needChecks).stream().map(t -> t.getFullName()).collect(toSet()); originResSet.removeAll(authorizedResources);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
break; case UDF_FILE: Set<Integer> authorizedUdfFiles = resourceMapper.listAuthorizedResourceById(userId, needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedUdfFiles); break; case DATASOURCE: Set<Integer> authorizedDatasources = dataSourceMapper.listAuthorizedDataSource(userId,needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedDatasources); break; case UDF: Set<Integer> authorizedUdfs = udfFuncMapper.listAuthorizedUdfFunc(userId, needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedUdfs); break; } resultList.addAll(originResSet); } return resultList; } /** * get user by user id * @param userId user id * @return User */ public User getUserById(int userId){ return userMapper.queryDetailsById(userId); } /** * get resource by resoruce id * @param resoruceId resource id * @return Resource
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,581
[BUG] When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement
*For better global communication, please give priority to using English description, thx! * **Describe the bug** When the process involves sub-processes, the complement operation will only take the start time, and will repeat the number of days to perform the complement. **To Reproduce** Steps to reproduce the behavior, for example: 1. Create a simple sub-process, such as a shell 2. Create another main process and associate sub-processes 3. For complement operation, you can also make up only two days The specific operation is as follows: 1. Create subprocess, ![image](https://user-images.githubusercontent.com/10054719/80662237-5e165880-8ac3-11ea-9e47-ea97af1179ab.png) 2. Save subprocess and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662384-b6e5f100-8ac3-11ea-84f5-a307acc79f88.png) 3. Create the main process and create sub node as in main process ![image](https://user-images.githubusercontent.com/10054719/80662453-d715b000-8ac3-11ea-8186-b7a92a709c79.png) ![image](https://user-images.githubusercontent.com/10054719/80662492-f0b6f780-8ac3-11ea-9c0c-ed628b82772c.png) 4. Save main process and setting variables ![image](https://user-images.githubusercontent.com/10054719/80662523-07f5e500-8ac4-11ea-8b15-8df097cc5c76.png) 5. As follow. ![image](https://user-images.githubusercontent.com/10054719/80662545-193ef180-8ac4-11ea-8343-802808ad278f.png) 6. Then complement ![image](https://user-images.githubusercontent.com/10054719/80662594-3b387400-8ac4-11ea-96b1-75fa364ca167.png) 7. The result is as follows, the date printed is only the start date ![image](https://user-images.githubusercontent.com/10054719/80662665-67ec8b80-8ac4-11ea-9ae2-d082087efe6b.png) ![image](https://user-images.githubusercontent.com/10054719/80662670-6d49d600-8ac4-11ea-8487-608327a30654.png) ![image](https://user-images.githubusercontent.com/10054719/80662674-70dd5d00-8ac4-11ea-914d-096c12cbfb9c.png) 8. The timing of the main process is correct ![image](https://user-images.githubusercontent.com/10054719/80662741-9bc7b100-8ac4-11ea-9d4d-e05c54ca5a86.png) **Which version of Dolphin Scheduler:** -[1.2.1] - Stand-alone deployment
https://github.com/apache/dolphinscheduler/issues/2581
https://github.com/apache/dolphinscheduler/pull/2656
050dae7ca4a1b6243fbc0dd9c4018d45e1655566
d54aab5cd530b2e135a58fbd6b22564583b5abb8
2020-04-30T01:27:32Z
java
2020-05-09T07:03:02Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
*/ public Resource getResourceById(int resoruceId){ return resourceMapper.selectById(resoruceId); } /** * list resources by ids * @param resIds resIds * @return resource list */ public List<Resource> listResourceByIds(Integer[] resIds){ return resourceMapper.listResourceByIds(resIds); } /** * format task app id in task instance * @param taskInstance * @return */ public String formatTaskAppId(TaskInstance taskInstance){ ProcessDefinition definition = this.findProcessDefineById(taskInstance.getProcessDefinitionId()); ProcessInstance processInstanceById = this.findProcessInstanceById(taskInstance.getProcessInstanceId()); if(definition == null || processInstanceById == null){ return ""; } return String.format("%s_%s_%s", definition.getId(), processInstanceById.getId(), taskInstance.getId()); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.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.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
*/ package org.apache.dolphinscheduler.api.enums; import org.springframework.context.i18n.LocaleContextHolder; import java.util.Locale; /** * status enum */ public enum Status { SUCCESS(0, "success", "成功"), INTERNAL_SERVER_ERROR_ARGS(10000, "Internal Server Error: {0}", "服务端异常: {0}"), REQUEST_PARAMS_NOT_VALID_ERROR(10001, "request parameter {0} is not valid", "请求参数[{0}]无效"), TASK_TIMEOUT_PARAMS_ERROR(10002, "task timeout parameter is not valid", "任务超时参数无效"), USER_NAME_EXIST(10003, "user name already exists", "用户名已存在"), USER_NAME_NULL(10004,"user name is null", "用户名不能为空"), HDFS_OPERATION_ERROR(10006, "hdfs operation error", "hdfs操作错误"), TASK_INSTANCE_NOT_FOUND(10008, "task instance not found", "任务实例不存在"), TENANT_NAME_EXIST(10009, "tenant code already exists", "租户编码不能为空"), USER_NOT_EXIST(10010, "user {0} not exists", "用户[{0}]不存在"), ALERT_GROUP_NOT_EXIST(10011, "alarm group not found", "告警组不存在"), ALERT_GROUP_EXIST(10012, "alarm group already exists", "告警组名称已存在"), USER_NAME_PASSWD_ERROR(10013,"user name or password error", "用户名或密码错误"), LOGIN_SESSION_FAILED(10014,"create session failed!", "创建session失败"), DATASOURCE_EXIST(10015, "data source name already exists", "数据源名称已存在"), DATASOURCE_CONNECT_FAILED(10016, "data source connection failed", "建立数据源连接失败"), TENANT_NOT_EXIST(10017, "tenant not exists", "租户不存在"), PROJECT_NOT_FOUNT(10018, "project {0} not found ", "项目[{0}]不存在"), PROJECT_ALREADY_EXISTS(10019, "project {0} already exists", "项目名称[{0}]已存在"), TASK_INSTANCE_NOT_EXISTS(10020, "task instance {0} does not exist", "任务实例[{0}]不存在"), TASK_INSTANCE_NOT_SUB_WORKFLOW_INSTANCE(10021, "task instance {0} is not sub process instance", "任务实例[{0}]不是子流程实例"), SCHEDULE_CRON_NOT_EXISTS(10022, "scheduler crontab {0} does not exist", "调度配置定时表达式[{0}]不存在"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
SCHEDULE_CRON_ONLINE_FORBID_UPDATE(10023, "online status does not allow update operations", "调度配置上线状态不允许修改"), SCHEDULE_CRON_CHECK_FAILED(10024, "scheduler crontab expression validation failure: {0}", "调度配置定时表达式验证失败: {0}"), MASTER_NOT_EXISTS(10025, "master does not exist", "无可用master节点"), SCHEDULE_STATUS_UNKNOWN(10026, "unknown status: {0}", "未知状态: {0}"), CREATE_ALERT_GROUP_ERROR(10027,"create alert group error", "创建告警组错误"), QUERY_ALL_ALERTGROUP_ERROR(10028,"query all alertgroup error", "查询告警组错误"), LIST_PAGING_ALERT_GROUP_ERROR(10029,"list paging alert group error", "分页查询告警组错误"), UPDATE_ALERT_GROUP_ERROR(10030,"update alert group error", "更新告警组错误"), DELETE_ALERT_GROUP_ERROR(10031,"delete alert group error", "删除告警组错误"), ALERT_GROUP_GRANT_USER_ERROR(10032,"alert group grant user error", "告警组授权用户错误"), CREATE_DATASOURCE_ERROR(10033,"create datasource error", "创建数据源错误"), UPDATE_DATASOURCE_ERROR(10034,"update datasource error", "更新数据源错误"), QUERY_DATASOURCE_ERROR(10035,"query datasource error", "查询数据源错误"), CONNECT_DATASOURCE_FAILURE(10036,"connect datasource failure", "建立数据源连接失败"), CONNECTION_TEST_FAILURE(10037,"connection test failure", "测试数据源连接失败"), DELETE_DATA_SOURCE_FAILURE(10038,"delete data source failure", "删除数据源失败"), VERIFY_DATASOURCE_NAME_FAILURE(10039,"verify datasource name failure", "验证数据源名称失败"), UNAUTHORIZED_DATASOURCE(10040,"unauthorized datasource", "未经授权的数据源"), AUTHORIZED_DATA_SOURCE(10041,"authorized data source", "授权数据源失败"), LOGIN_SUCCESS(10042,"login success", "登录成功"), USER_LOGIN_FAILURE(10043,"user login failure", "用户登录失败"), LIST_WORKERS_ERROR(10044,"list workers error", "查询worker列表错误"), LIST_MASTERS_ERROR(10045,"list masters error", "查询master列表错误"), UPDATE_PROJECT_ERROR(10046,"update project error", "更新项目信息错误"), QUERY_PROJECT_DETAILS_BY_ID_ERROR(10047,"query project details by id error", "查询项目详细信息错误"), CREATE_PROJECT_ERROR(10048,"create project error", "创建项目错误"), LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR(10049,"login user query project list paging error", "分页查询项目列表错误"), DELETE_PROJECT_ERROR(10050,"delete project error", "删除项目错误"), QUERY_UNAUTHORIZED_PROJECT_ERROR(10051,"query unauthorized project error", "查询未授权项目错误"), QUERY_AUTHORIZED_PROJECT(10052,"query authorized project", "查询授权项目错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
QUERY_QUEUE_LIST_ERROR(10053,"query queue list error", "查询队列列表错误"), CREATE_RESOURCE_ERROR(10054,"create resource error", "创建资源错误"), UPDATE_RESOURCE_ERROR(10055,"update resource error", "更新资源错误"), QUERY_RESOURCES_LIST_ERROR(10056,"query resources list error", "查询资源列表错误"), QUERY_RESOURCES_LIST_PAGING(10057,"query resources list paging", "分页查询资源列表错误"), DELETE_RESOURCE_ERROR(10058,"delete resource error", "删除资源错误"), VERIFY_RESOURCE_BY_NAME_AND_TYPE_ERROR(10059,"verify resource by name and type error", "资源名称或类型验证错误"), VIEW_RESOURCE_FILE_ON_LINE_ERROR(10060,"view resource file online error", "查看资源文件错误"), CREATE_RESOURCE_FILE_ON_LINE_ERROR(10061,"create resource file online error", "创建资源文件错误"), RESOURCE_FILE_IS_EMPTY(10062,"resource file is empty", "资源文件内容不能为空"), EDIT_RESOURCE_FILE_ON_LINE_ERROR(10063,"edit resource file online error", "更新资源文件错误"), DOWNLOAD_RESOURCE_FILE_ERROR(10064,"download resource file error", "下载资源文件错误"), CREATE_UDF_FUNCTION_ERROR(10065 ,"create udf function error", "创建UDF函数错误"), VIEW_UDF_FUNCTION_ERROR( 10066,"view udf function error", "查询UDF函数错误"), UPDATE_UDF_FUNCTION_ERROR(10067,"update udf function error", "更新UDF函数错误"), QUERY_UDF_FUNCTION_LIST_PAGING_ERROR( 10068,"query udf function list paging error", "分页查询UDF函数列表错误"), QUERY_DATASOURCE_BY_TYPE_ERROR( 10069,"query datasource by type error", "查询数据源信息错误"), VERIFY_UDF_FUNCTION_NAME_ERROR( 10070,"verify udf function name error", "UDF函数名称验证错误"), DELETE_UDF_FUNCTION_ERROR( 10071,"delete udf function error", "删除UDF函数错误"), AUTHORIZED_FILE_RESOURCE_ERROR( 10072,"authorized file resource error", "授权资源文件错误"), AUTHORIZE_RESOURCE_TREE( 10073,"authorize resource tree display error","授权资源目录树错误"), UNAUTHORIZED_UDF_FUNCTION_ERROR( 10074,"unauthorized udf function error", "查询未授权UDF函数错误"), AUTHORIZED_UDF_FUNCTION_ERROR(10075,"authorized udf function error", "授权UDF函数错误"), CREATE_SCHEDULE_ERROR(10076,"create schedule error", "创建调度配置错误"), UPDATE_SCHEDULE_ERROR(10077,"update schedule error", "更新调度配置错误"), PUBLISH_SCHEDULE_ONLINE_ERROR(10078,"publish schedule online error", "上线调度配置错误"), OFFLINE_SCHEDULE_ERROR(10079,"offline schedule error", "下线调度配置错误"), QUERY_SCHEDULE_LIST_PAGING_ERROR(10080,"query schedule list paging error", "分页查询调度配置列表错误"), QUERY_SCHEDULE_LIST_ERROR(10081,"query schedule list error", "查询调度配置列表错误"), QUERY_TASK_LIST_PAGING_ERROR(10082,"query task list paging error", "分页查询任务列表错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
QUERY_TASK_RECORD_LIST_PAGING_ERROR(10083,"query task record list paging error", "分页查询任务记录错误"), CREATE_TENANT_ERROR(10084,"create tenant error", "创建租户错误"), QUERY_TENANT_LIST_PAGING_ERROR(10085,"query tenant list paging error", "分页查询租户列表错误"), QUERY_TENANT_LIST_ERROR(10086,"query tenant list error", "查询租户列表错误"), UPDATE_TENANT_ERROR(10087,"update tenant error", "更新租户错误"), DELETE_TENANT_BY_ID_ERROR(10088,"delete tenant by id error", "删除租户错误"), VERIFY_TENANT_CODE_ERROR(10089,"verify tenant code error", "租户编码验证错误"), CREATE_USER_ERROR(10090,"create user error", "创建用户错误"), QUERY_USER_LIST_PAGING_ERROR(10091,"query user list paging error", "分页查询用户列表错误"), UPDATE_USER_ERROR(10092,"update user error", "更新用户错误"), DELETE_USER_BY_ID_ERROR(10093,"delete user by id error", "删除用户错误"), GRANT_PROJECT_ERROR(10094,"grant project error", "授权项目错误"), GRANT_RESOURCE_ERROR(10095,"grant resource error", "授权资源错误"), GRANT_UDF_FUNCTION_ERROR(10096,"grant udf function error", "授权UDF函数错误"), GRANT_DATASOURCE_ERROR(10097,"grant datasource error", "授权数据源错误"), GET_USER_INFO_ERROR(10098,"get user info error", "获取用户信息错误"), USER_LIST_ERROR(10099,"user list error", "查询用户列表错误"), VERIFY_USERNAME_ERROR(10100,"verify username error", "用户名验证错误"), UNAUTHORIZED_USER_ERROR(10101,"unauthorized user error", "查询未授权用户错误"), AUTHORIZED_USER_ERROR(10102,"authorized user error", "查询授权用户错误"), QUERY_TASK_INSTANCE_LOG_ERROR(10103,"view task instance log error", "查询任务实例日志错误"), DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR(10104,"download task instance log file error", "下载任务日志文件错误"), CREATE_PROCESS_DEFINITION(10105,"create process definition", "创建工作流错误"), VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR(10106,"verify process definition name unique error", "工作流名称已存在"), UPDATE_PROCESS_DEFINITION_ERROR(10107,"update process definition error", "更新工作流定义错误"), RELEASE_PROCESS_DEFINITION_ERROR(10108,"release process definition error", "上线工作流错误"), QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR(10109,"query datail of process definition error", "查询工作流详细信息错误"), QUERY_PROCESS_DEFINITION_LIST(10110,"query process definition list", "查询工作流列表错误"), ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR(10111,"encapsulation treeview structure error", "查询工作流树形图数据错误"), GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR(10112,"get tasks list by process definition id error", "查询工作流定义节点信息错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR(10113,"query process instance list paging error", "分页查询工作流实例列表错误"), QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR(10114,"query task list by process instance id error", "查询任务实例列表错误"), UPDATE_PROCESS_INSTANCE_ERROR(10115,"update process instance error", "更新工作流实例错误"), QUERY_PROCESS_INSTANCE_BY_ID_ERROR(10116,"query process instance by id error", "查询工作流实例错误"), DELETE_PROCESS_INSTANCE_BY_ID_ERROR(10117,"delete process instance by id error", "删除工作流实例错误"), QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR(10118,"query sub process instance detail info by task id error", "查询子流程任务实例错误"), QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR(10119,"query parent process instance detail info by sub process instance id error", "查询子流程该工作流实例错误"), QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR(10120,"query process instance all variables error", "查询工作流自定义变量信息错误"), ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR(10121,"encapsulation process instance gantt structure error", "查询工作流实例甘特图数据错误"), QUERY_PROCESS_DEFINITION_LIST_PAGING_ERROR(10122,"query process definition list paging error", "分页查询工作流定义列表错误"), SIGN_OUT_ERROR(10123,"sign out error", "退出错误"), TENANT_CODE_HAS_ALREADY_EXISTS(10124,"tenant code has already exists", "租户编码已存在"), IP_IS_EMPTY(10125,"ip is empty", "IP地址不能为空"), SCHEDULE_CRON_REALEASE_NEED_NOT_CHANGE(10126, "schedule release is already {0}", "调度配置上线错误[{0}]"), CREATE_QUEUE_ERROR(10127, "create queue error", "创建队列错误"), QUEUE_NOT_EXIST(10128, "queue {0} not exists", "队列ID[{0}]不存在"), QUEUE_VALUE_EXIST(10129, "queue value {0} already exists", "队列值[{0}]已存在"), QUEUE_NAME_EXIST(10130, "queue name {0} already exists", "队列名称[{0}]已存在"), UPDATE_QUEUE_ERROR(10131, "update queue error", "更新队列信息错误"), NEED_NOT_UPDATE_QUEUE(10132, "no content changes, no updates are required", "数据未变更,不需要更新队列信息"), VERIFY_QUEUE_ERROR(10133,"verify queue error", "验证队列信息错误"), NAME_NULL(10134,"name must be not null", "名称不能为空"), NAME_EXIST(10135, "name {0} already exists", "名称[{0}]已存在"), SAVE_ERROR(10136, "save error", "保存错误"), DELETE_PROJECT_ERROR_DEFINES_NOT_NULL(10137, "please delete the process definitions in project first!", "请先删除全部工作流定义"), BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR(10117,"batch delete process instance by ids {0} error", "批量删除工作流实例错误"), PREVIEW_SCHEDULE_ERROR(10139,"preview schedule error", "预览调度配置错误"), PARSE_TO_CRON_EXPRESSION_ERROR(10140,"parse cron to cron expression error", "解析调度表达式错误"), SCHEDULE_START_TIME_END_TIME_SAME(10141,"The start time must not be the same as the end", "开始时间不能和结束时间一样"), DELETE_TENANT_BY_ID_FAIL(10142,"delete tenant by id fail, for there are {0} process instances in executing using it", "删除租户失败,有[{0}]个运行中的工作流实例正在使用"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
DELETE_TENANT_BY_ID_FAIL_DEFINES(10143,"delete tenant by id fail, for there are {0} process definitions using it", "删除租户失败,有[{0}]个工作流定义正在使用"), DELETE_TENANT_BY_ID_FAIL_USERS(10144,"delete tenant by id fail, for there are {0} users using it", "删除租户失败,有[{0}]个用户正在使用"), DELETE_WORKER_GROUP_BY_ID_FAIL(10145,"delete worker group by id fail, for there are {0} process instances in executing using it", "删除Worker分组失败,有[{0}]个运行中的工作流实例正在使用"), QUERY_WORKER_GROUP_FAIL(10146,"query worker group fail ", "查询worker分组失败"), DELETE_WORKER_GROUP_FAIL(10147,"delete worker group fail ", "删除worker分组失败"), COPY_PROCESS_DEFINITION_ERROR(10148,"copy process definition error", "复制工作流错误"), UDF_FUNCTION_NOT_EXIST(20001, "UDF function not found", "UDF函数不存在"), UDF_FUNCTION_EXISTS(20002, "UDF function already exists", "UDF函数已存在"), RESOURCE_NOT_EXIST(20004, "resource not exist", "资源不存在"), RESOURCE_EXIST(20005, "resource already exists", "资源已存在"), RESOURCE_SUFFIX_NOT_SUPPORT_VIEW(20006, "resource suffix do not support online viewing", "资源文件后缀不支持查看"), RESOURCE_SIZE_EXCEED_LIMIT(20007, "upload resource file size exceeds limit", "上传资源文件大小超过限制"), RESOURCE_SUFFIX_FORBID_CHANGE(20008, "resource suffix not allowed to be modified", "资源文件后缀不支持修改"), UDF_RESOURCE_SUFFIX_NOT_JAR(20009, "UDF resource suffix name must be jar", "UDF资源文件后缀名只支持[jar]"), HDFS_COPY_FAIL(20010, "hdfs copy {0} -> {1} fail", "hdfs复制失败:[{0}] -> [{1}]"), RESOURCE_FILE_EXIST(20011, "resource file {0} already exists in hdfs,please delete it or change name!", "资源文件[{0}]在hdfs中已存在,请删除或修改资源名"), RESOURCE_FILE_NOT_EXIST(20012, "resource file {0} not exists in hdfs!", "资源文件[{0}]在hdfs中不存在"), UDF_RESOURCE_IS_BOUND(20013, "udf resource file is bound by UDF functions:{0}","udf函数绑定了资源文件[{0}]"), RESOURCE_IS_USED(20014, "resource file is used by process definition","资源文件被上线的流程定义使用了"), PARENT_RESOURCE_NOT_EXIST(20015, "parent resource not exist","父资源文件不存在"), RESOURCE_NOT_EXIST_OR_NO_PERMISSION(20016, "resource not exist or no permission,please view the task node and remove error resource","请检查任务节点并移除无权限或者已删除的资源"), USER_NO_OPERATION_PERM(30001, "user has no operation privilege", "当前用户没有操作权限"), USER_NO_OPERATION_PROJECT_PERM(30002, "user {0} is not has project {1} permission", "当前用户[{0}]没有[{1}]项目的操作权限"), PROCESS_INSTANCE_NOT_EXIST(50001, "process instance {0} does not exist", "工作流实例[{0}]不存在"), PROCESS_INSTANCE_EXIST(50002, "process instance {0} already exists", "工作流实例[{0}]已存在"), PROCESS_DEFINE_NOT_EXIST(50003, "process definition {0} does not exist", "工作流定义[{0}]不存在"), PROCESS_DEFINE_NOT_RELEASE(50004, "process definition {0} not on line", "工作流定义[{0}]不是上线状态"), PROCESS_INSTANCE_ALREADY_CHANGED(50005, "the status of process instance {0} is already {1}", "工作流实例[{0}]的状态已经是[{1}]"), PROCESS_INSTANCE_STATE_OPERATION_ERROR(50006, "the status of process instance {0} is {1},Cannot perform {2} operation", "工作流实例[{0}]的状态是[{1}],无法执行[{2}]操作"), SUB_PROCESS_INSTANCE_NOT_EXIST(50007, "the task belong to process instance does not exist", "子工作流实例不存在"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
PROCESS_DEFINE_NOT_ALLOWED_EDIT(50008, "process definition {0} does not allow edit", "工作流定义[{0}]不允许修改"), PROCESS_INSTANCE_EXECUTING_COMMAND(50009, "process instance {0} is executing the command, please wait ...", "工作流实例[{0}]正在执行命令,请稍等..."), PROCESS_INSTANCE_NOT_SUB_PROCESS_INSTANCE(50010, "process instance {0} is not sub process instance", "工作流实例[{0}]不是子工作流实例"), TASK_INSTANCE_STATE_COUNT_ERROR(50011,"task instance state count error", "查询各状态任务实例数错误"), COUNT_PROCESS_INSTANCE_STATE_ERROR(50012,"count process instance state error", "查询各状态流程实例数错误"), COUNT_PROCESS_DEFINITION_USER_ERROR(50013,"count process definition user error", "查询各用户流程定义数错误"), START_PROCESS_INSTANCE_ERROR(50014,"start process instance error", "运行工作流实例错误"), EXECUTE_PROCESS_INSTANCE_ERROR(50015,"execute process instance error", "操作工作流实例错误"), CHECK_PROCESS_DEFINITION_ERROR(50016,"check process definition error", "检查工作流实例错误"), QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR(50017,"query recipients and copyers by process definition error", "查询收件人和抄送人错误"), DATA_IS_NOT_VALID(50017,"data {0} not valid", "数据[{0}]无效"), DATA_IS_NULL(50018,"data {0} is null", "数据[{0}]不能为空"), PROCESS_NODE_HAS_CYCLE(50019,"process node has cycle", "流程节点间存在循环依赖"), PROCESS_NODE_S_PARAMETER_INVALID(50020,"process node %s parameter invalid", "流程节点[%s]参数无效"), PROCESS_DEFINE_STATE_ONLINE(50021, "process definition {0} is already on line", "工作流定义[{0}]已上线"), DELETE_PROCESS_DEFINE_BY_ID_ERROR(50022,"delete process definition by id error", "删除工作流定义错误"), SCHEDULE_CRON_STATE_ONLINE(50023,"the status of schedule {0} is already on line", "调度配置[{0}]已上线"), DELETE_SCHEDULE_CRON_BY_ID_ERROR(50024,"delete schedule by id error", "删除调度配置错误"), BATCH_DELETE_PROCESS_DEFINE_ERROR(50025,"batch delete process definition error", "批量删除工作流定义错误"), BATCH_DELETE_PROCESS_DEFINE_BY_IDS_ERROR(50026,"batch delete process definition by ids {0} error", "批量删除工作流定义[{0}]错误"), TENANT_NOT_SUITABLE(50027,"there is not any tenant suitable, please choose a tenant available.", "没有合适的租户,请选择可用的租户"), EXPORT_PROCESS_DEFINE_BY_ID_ERROR(50028,"export process definition by id error", "导出工作流定义错误"), BATCH_EXPORT_PROCESS_DEFINE_BY_IDS_ERROR(50028,"batch export process definition by ids error", "批量导出工作流定义错误"), IMPORT_PROCESS_DEFINE_ERROR(50029,"import process definition error", "导入工作流定义错误"), HDFS_NOT_STARTUP(60001,"hdfs not startup", "hdfs未启用"), /** * for monitor */ QUERY_DATABASE_STATE_ERROR(70001,"query database state error", "查询数据库状态错误"), QUERY_ZOOKEEPER_STATE_ERROR(70002,"query zookeeper state error", "查询zookeeper状态错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
CREATE_ACCESS_TOKEN_ERROR(70010,"create access token error", "创建访问token错误"), GENERATE_TOKEN_ERROR(70011,"generate token error", "生成token错误"), QUERY_ACCESSTOKEN_LIST_PAGING_ERROR(70012,"query access token list paging error", "分页查询访问token列表错误"), UPDATE_ACCESS_TOKEN_ERROR(70013,"update access token error", "更新访问token错误"), DELETE_ACCESS_TOKEN_ERROR(70014,"delete access token error", "删除访问token错误"), ACCESS_TOKEN_NOT_EXIST(70015, "access token not exist", "访问token不存在"), COMMAND_STATE_COUNT_ERROR(80001,"task instance state count error", "查询各状态任务实例数错误"), QUEUE_COUNT_ERROR(90001,"queue count error", "查询队列数据错误"), KERBEROS_STARTUP_STATE(100001,"get kerberos startup state error", "获取kerberos启动状态错误"), ; private final int code; private final String enMsg; private final String zhMsg; private Status(int code, String enMsg, String zhMsg) { this.code = code; this.enMsg = enMsg; this.zhMsg = zhMsg; } public int getCode() { return this.code; } public String getMsg() { if (Locale.SIMPLIFIED_CHINESE.getLanguage().equals(LocaleContextHolder.getLocale().getLanguage())) { return this.zhMsg; } else { return this.enMsg; } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.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.api.service; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.serializer.SerializerFeature; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.commons.collections.BeanMap; import org.apache.dolphinscheduler.api.dto.resources.ResourceComponent; import org.apache.dolphinscheduler.api.dto.resources.filter.ResourceFilter; import org.apache.dolphinscheduler.api.dto.resources.visitor.ResourceTreeVisitor;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
import org.apache.dolphinscheduler.api.dto.resources.visitor.Visitor; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.exceptions.ServiceException; import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.api.utils.Result; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.ResourceType; import org.apache.dolphinscheduler.common.utils.*; import org.apache.dolphinscheduler.dao.entity.Resource; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.UdfFunc; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.*; import org.apache.dolphinscheduler.dao.utils.ResourceProcessDefinitionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; import java.text.MessageFormat; import java.util.*; import java.util.regex.Matcher; import java.util.stream.Collectors; import static org.apache.dolphinscheduler.common.Constants.*; /** * resources service */ @Service
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
public class ResourcesService extends BaseService { private static final Logger logger = LoggerFactory.getLogger(ResourcesService.class); @Autowired private ResourceMapper resourcesMapper; @Autowired private UdfFuncMapper udfFunctionMapper; @Autowired private TenantMapper tenantMapper; @Autowired private UserMapper userMapper; @Autowired private ResourceUserMapper resourceUserMapper; @Autowired private ProcessDefinitionMapper processDefinitionMapper; /** * create directory
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
* * @param loginUser login user * @param name alias * @param description description * @param type type * @param pid parent id * @param currentDir current directory * @return create directory result */ @Transactional(rollbackFor = Exception.class) public Result createDirectory(User loginUser, String name, String description, ResourceType type, int pid, String currentDir) { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } String fullName = currentDir.equals("/") ? String.format("%s%s",currentDir,name):String.format("%s/%s",currentDir,name); if (pid != -1) { Resource parentResource = resourcesMapper.selectById(pid); if (parentResource == null) { putMsg(result, Status.PARENT_RESOURCE_NOT_EXIST); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
if (!hasPerm(loginUser, parentResource.getUserId())) { putMsg(result, Status.USER_NO_OPERATION_PERM); return result; } } if (checkResourceExists(fullName, 0, type.ordinal())) { logger.error("resource directory {} has exist, can't recreate", fullName); putMsg(result, Status.RESOURCE_EXIST); return result; } Date now = new Date(); Resource resource = new Resource(pid,name,fullName,true,description,name,loginUser.getId(),type,0,now,now); try { resourcesMapper.insert(resource); putMsg(result, Status.SUCCESS); Map<Object, Object> dataMap = new BeanMap(resource); Map<String, Object> resultMap = new HashMap<String, Object>(); for (Map.Entry<Object, Object> entry: dataMap.entrySet()) { if (!"class".equalsIgnoreCase(entry.getKey().toString())) { resultMap.put(entry.getKey().toString(), entry.getValue()); } } result.setData(resultMap); } catch (Exception e) { logger.error("resource already exists, can't recreate ", e); throw new RuntimeException("resource already exists, can't recreate"); } createDirecotry(loginUser,fullName,type,result); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} /** * create resource * * @param loginUser login user * @param name alias * @param desc description * @param file file * @param type type * @param pid parent id * @param currentDir current directory * @return create result code */ @Transactional(rollbackFor = Exception.class) public Result createResource(User loginUser, String name, String desc, ResourceType type, MultipartFile file, int pid, String currentDir) { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } if (pid != -1) { Resource parentResource = resourcesMapper.selectById(pid);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
if (parentResource == null) { putMsg(result, Status.PARENT_RESOURCE_NOT_EXIST); return result; } if (!hasPerm(loginUser, parentResource.getUserId())) { putMsg(result, Status.USER_NO_OPERATION_PERM); return result; } } if (file.isEmpty()) { logger.error("file is empty: {}", file.getOriginalFilename()); putMsg(result, Status.RESOURCE_FILE_IS_EMPTY); return result; } String fileSuffix = FileUtils.suffix(file.getOriginalFilename()); String nameSuffix = FileUtils.suffix(name); if (!(StringUtils.isNotEmpty(fileSuffix) && fileSuffix.equalsIgnoreCase(nameSuffix))) { /** * rename file suffix and original suffix must be consistent */ logger.error("rename file suffix and original suffix must be consistent: {}", file.getOriginalFilename()); putMsg(result, Status.RESOURCE_SUFFIX_FORBID_CHANGE); return result; } if (Constants.UDF.equals(type.name()) && !JAR.equalsIgnoreCase(fileSuffix)) { logger.error(Status.UDF_RESOURCE_SUFFIX_NOT_JAR.getMsg());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
putMsg(result, Status.UDF_RESOURCE_SUFFIX_NOT_JAR); return result; } if (file.getSize() > Constants.MAX_FILE_SIZE) { logger.error("file size is too large: {}", file.getOriginalFilename()); putMsg(result, Status.RESOURCE_SIZE_EXCEED_LIMIT); return result; } String fullName = currentDir.equals("/") ? String.format("%s%s",currentDir,name):String.format("%s/%s",currentDir,name); if (checkResourceExists(fullName, 0, type.ordinal())) { logger.error("resource {} has exist, can't recreate", name); putMsg(result, Status.RESOURCE_EXIST); return result; } Date now = new Date(); Resource resource = new Resource(pid,name,fullName,false,desc,file.getOriginalFilename(),loginUser.getId(),type,file.getSize(),now,now); try { resourcesMapper.insert(resource); putMsg(result, Status.SUCCESS); Map<Object, Object> dataMap = new BeanMap(resource); Map<String, Object> resultMap = new HashMap<>(); for (Map.Entry<Object, Object> entry: dataMap.entrySet()) { if (!"class".equalsIgnoreCase(entry.getKey().toString())) { resultMap.put(entry.getKey().toString(), entry.getValue()); } } result.setData(resultMap); } catch (Exception e) { logger.error("resource already exists, can't recreate ", e);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
throw new RuntimeException("resource already exists, can't recreate"); } if (!upload(loginUser, fullName, file, type)) { logger.error("upload resource: {} file: {} failed.", name, file.getOriginalFilename()); putMsg(result, Status.HDFS_OPERATION_ERROR); throw new RuntimeException(String.format("upload resource: %s file: %s failed.", name, file.getOriginalFilename())); } return result; } /** * check resource is exists * * @param fullName fullName * @param userId user id * @param type type * @return true if resource exists */ private boolean checkResourceExists(String fullName, int userId, int type ){ List<Resource> resources = resourcesMapper.queryResourceList(fullName, userId, type); if (resources != null && resources.size() > 0) { return true; } return false; } /** * update resource * @param loginUser login user * @param resourceId resource id * @param name name
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
* @param desc description * @param type resource type * @return update result code */ @Transactional(rollbackFor = Exception.class) public Result updateResource(User loginUser, int resourceId, String name, String desc, ResourceType type) { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } Resource resource = resourcesMapper.selectById(resourceId); if (resource == null) { putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } if (!hasPerm(loginUser, resource.getUserId())) { putMsg(result, Status.USER_NO_OPERATION_PERM); return result; } if (name.equals(resource.getAlias()) && desc.equals(resource.getDescription())) { putMsg(result, Status.SUCCESS); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
String originFullName = resource.getFullName(); String originResourceName = resource.getAlias(); String fullName = String.format("%s%s",originFullName.substring(0,originFullName.lastIndexOf("/")+1),name); if (!originResourceName.equals(name) && checkResourceExists(fullName, 0, type.ordinal())) { logger.error("resource {} already exists, can't recreate", name); putMsg(result, Status.RESOURCE_EXIST); return result; } String tenantCode = getTenantCode(resource.getUserId(),result); if (StringUtils.isEmpty(tenantCode)){ return result; } String originHdfsFileName = HadoopUtils.getHdfsFileName(resource.getType(),tenantCode,originFullName); try { if (!HadoopUtils.getInstance().exists(originHdfsFileName)) { logger.error("{} not exist", originHdfsFileName); putMsg(result,Status.RESOURCE_NOT_EXIST); return result; } } catch (IOException e) { logger.error(e.getMessage(),e); throw new ServiceException(Status.HDFS_OPERATION_ERROR); } String nameWithSuffix = name; if (!resource.isDirectory()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
String suffix = originResourceName.substring(originResourceName.lastIndexOf(".")); if(!name.endsWith(suffix)){ nameWithSuffix = nameWithSuffix + suffix; } } List<Integer> childrenResource = listAllChildren(resource,false); String oldFullName = resource.getFullName(); Date now = new Date(); resource.setAlias(nameWithSuffix); resource.setFullName(fullName); resource.setDescription(desc); resource.setUpdateTime(now); try { resourcesMapper.updateById(resource); if (resource.isDirectory() && CollectionUtils.isNotEmpty(childrenResource)) { String matcherFullName = Matcher.quoteReplacement(fullName); List<Resource> childResourceList = new ArrayList<>(); List<Resource> resourceList = resourcesMapper.listResourceByIds(childrenResource.toArray(new Integer[childrenResource.size()])); childResourceList = resourceList.stream().map(t -> { t.setFullName(t.getFullName().replaceFirst(oldFullName, matcherFullName)); t.setUpdateTime(now); return t; }).collect(Collectors.toList()); resourcesMapper.batchUpdateResource(childResourceList); } putMsg(result, Status.SUCCESS); Map<Object, Object> dataMap = new BeanMap(resource); Map<String, Object> resultMap = new HashMap<>(5);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
for (Map.Entry<Object, Object> entry: dataMap.entrySet()) { if (!Constants.CLASS.equalsIgnoreCase(entry.getKey().toString())) { resultMap.put(entry.getKey().toString(), entry.getValue()); } } result.setData(resultMap); } catch (Exception e) { logger.error(Status.UPDATE_RESOURCE_ERROR.getMsg(), e); throw new ServiceException(Status.UPDATE_RESOURCE_ERROR); } if (originResourceName.equals(name)) { return result; } String destHdfsFileName = HadoopUtils.getHdfsFileName(resource.getType(),tenantCode,fullName); try { logger.info("start hdfs copy {} -> {}", originHdfsFileName, destHdfsFileName); HadoopUtils.getInstance().copy(originHdfsFileName, destHdfsFileName, true, true); } catch (Exception e) { logger.error(MessageFormat.format("hdfs copy {0} -> {1} fail", originHdfsFileName, destHdfsFileName), e); putMsg(result,Status.HDFS_COPY_FAIL); throw new ServiceException(Status.HDFS_COPY_FAIL); } return result; } /** * query resources list paging * * @param loginUser login user
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
* @param type resource type * @param searchVal search value * @param pageNo page number * @param pageSize page size * @return resource list page */ public Map<String, Object> queryResourceListPaging(User loginUser, int direcotryId, ResourceType type, String searchVal, Integer pageNo, Integer pageSize) { HashMap<String, Object> result = new HashMap<>(5); Page<Resource> page = new Page(pageNo, pageSize); int userId = loginUser.getId(); if (isAdmin(loginUser)) { userId= 0; } if (direcotryId != -1) { Resource directory = resourcesMapper.selectById(direcotryId); if (directory == null) { putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } } IPage<Resource> resourceIPage = resourcesMapper.queryResourcePaging(page, userId,direcotryId, type.ordinal(), searchVal); PageInfo pageInfo = new PageInfo<Resource>(pageNo, pageSize); pageInfo.setTotalCount((int)resourceIPage.getTotal()); pageInfo.setLists(resourceIPage.getRecords()); result.put(Constants.DATA_LIST, pageInfo); putMsg(result,Status.SUCCESS); return result; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
* create direcoty * @param loginUser login user * @param fullName full name * @param type resource type * @param result Result */ private void createDirecotry(User loginUser,String fullName,ResourceType type,Result result){ String tenantCode = tenantMapper.queryById(loginUser.getTenantId()).getTenantCode(); String directoryName = HadoopUtils.getHdfsFileName(type,tenantCode,fullName); String resourceRootPath = HadoopUtils.getHdfsDir(type,tenantCode); try { if (!HadoopUtils.getInstance().exists(resourceRootPath)) { createTenantDirIfNotExists(tenantCode); } if (!HadoopUtils.getInstance().mkdir(directoryName)) { logger.error("create resource directory {} of hdfs failed",directoryName); putMsg(result,Status.HDFS_OPERATION_ERROR); throw new RuntimeException(String.format("create resource directory: %s failed.", directoryName)); } } catch (Exception e) { logger.error("create resource directory {} of hdfs failed",directoryName); putMsg(result,Status.HDFS_OPERATION_ERROR); throw new RuntimeException(String.format("create resource directory: %s failed.", directoryName)); } } /** * upload file to hdfs * * @param loginUser login user
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
* @param fullName full name * @param file file */ private boolean upload(User loginUser, String fullName, MultipartFile file, ResourceType type) { String fileSuffix = FileUtils.suffix(file.getOriginalFilename()); String nameSuffix = FileUtils.suffix(fullName); if (!(StringUtils.isNotEmpty(fileSuffix) && fileSuffix.equalsIgnoreCase(nameSuffix))) { return false; } String tenantCode = tenantMapper.queryById(loginUser.getTenantId()).getTenantCode(); String localFilename = FileUtils.getUploadFilename(tenantCode, UUID.randomUUID().toString()); String hdfsFilename = HadoopUtils.getHdfsFileName(type,tenantCode,fullName); String resourcePath = HadoopUtils.getHdfsDir(type,tenantCode); try { if (!HadoopUtils.getInstance().exists(resourcePath)) { createTenantDirIfNotExists(tenantCode); } org.apache.dolphinscheduler.api.utils.FileUtils.copyFile(file, localFilename); HadoopUtils.getInstance().copyLocalToHdfs(localFilename, hdfsFilename, true, true); } catch (Exception e) { logger.error(e.getMessage(), e); return false; } return true;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} /** * query resource list * * @param loginUser login user * @param type resource type * @return resource list */ public Map<String, Object> queryResourceList(User loginUser, ResourceType type) { Map<String, Object> result = new HashMap<>(5); int userId = loginUser.getId(); if(isAdmin(loginUser)){ userId = 0; } List<Resource> allResourceList = resourcesMapper.queryResourceListAuthored(userId, type.ordinal(),0); Visitor resourceTreeVisitor = new ResourceTreeVisitor(allResourceList); result.put(Constants.DATA_LIST, resourceTreeVisitor.visit().getChildren()); putMsg(result,Status.SUCCESS); return result; } /** * query resource list * * @param loginUser login user * @param type resource type * @return resource list */ public Map<String, Object> queryResourceJarList(User loginUser, ResourceType type) { Map<String, Object> result = new HashMap<>(5);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
int userId = loginUser.getId(); if(isAdmin(loginUser)){ userId = 0; } List<Resource> allResourceList = resourcesMapper.queryResourceListAuthored(userId, type.ordinal(),0); List<Resource> resources = new ResourceFilter(".jar",new ArrayList<>(allResourceList)).filter(); Visitor resourceTreeVisitor = new ResourceTreeVisitor(resources); result.put(Constants.DATA_LIST, resourceTreeVisitor.visit().getChildren()); putMsg(result,Status.SUCCESS); return result; } /** * delete resource * * @param loginUser login user * @param resourceId resource id * @return delete result code * @throws Exception exception */ @Transactional(rollbackFor = Exception.class) public Result delete(User loginUser, int resourceId) throws Exception { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } Resource resource = resourcesMapper.selectById(resourceId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
if (resource == null) { logger.error("resource file not exist, resource id {}", resourceId); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } if (!hasPerm(loginUser, resource.getUserId())) { putMsg(result, Status.USER_NO_OPERATION_PERM); return result; } String tenantCode = getTenantCode(resource.getUserId(),result); if (StringUtils.isEmpty(tenantCode)){ return result; } List<Map<String, Object>> list = processDefinitionMapper.listResources(); Map<Integer, Set<Integer>> resourceProcessMap = ResourceProcessDefinitionUtils.getResourceProcessDefinitionMap(list); Set<Integer> resourceIdSet = resourceProcessMap.keySet(); List<Integer> allChildren = listAllChildren(resource,true); Integer[] needDeleteResourceIdArray = allChildren.toArray(new Integer[allChildren.size()]); if (resource.getType() == (ResourceType.UDF)) { List<UdfFunc> udfFuncs = udfFunctionMapper.listUdfByResourceId(needDeleteResourceIdArray); if (CollectionUtils.isNotEmpty(udfFuncs)) { logger.error("can't be deleted,because it is bound by UDF functions:{}",udfFuncs.toString()); putMsg(result,Status.UDF_RESOURCE_IS_BOUND,udfFuncs.get(0).getFuncName()); return result; } } if (resourceIdSet.contains(resource.getPid())) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
logger.error("can't be deleted,because it is used of process definition"); putMsg(result, Status.RESOURCE_IS_USED); return result; } resourceIdSet.retainAll(allChildren); if (CollectionUtils.isNotEmpty(resourceIdSet)) { logger.error("can't be deleted,because it is used of process definition"); for (Integer resId : resourceIdSet) { logger.error("resource id:{} is used of process definition {}",resId,resourceProcessMap.get(resId)); } putMsg(result, Status.RESOURCE_IS_USED); return result; } String hdfsFilename = HadoopUtils.getHdfsFileName(resource.getType(), tenantCode, resource.getFullName()); resourcesMapper.deleteIds(needDeleteResourceIdArray); resourceUserMapper.deleteResourceUserArray(0, needDeleteResourceIdArray); HadoopUtils.getInstance().delete(hdfsFilename, true); putMsg(result, Status.SUCCESS); return result; } /** * verify resource by name and type * @param loginUser login user * @param fullName resource full name * @param type resource type * @return true if the resource name not exists, otherwise return false */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
public Result verifyResourceName(String fullName, ResourceType type,User loginUser) { Result result = new Result(); putMsg(result, Status.SUCCESS); if (checkResourceExists(fullName, 0, type.ordinal())) { logger.error("resource type:{} name:{} has exist, can't create again.", type, fullName); putMsg(result, Status.RESOURCE_EXIST); } else { Tenant tenant = tenantMapper.queryById(loginUser.getTenantId()); if(tenant != null){ String tenantCode = tenant.getTenantCode(); try { String hdfsFilename = HadoopUtils.getHdfsFileName(type,tenantCode,fullName); if(HadoopUtils.getInstance().exists(hdfsFilename)){ logger.error("resource type:{} name:{} has exist in hdfs {}, can't create again.", type, fullName,hdfsFilename); putMsg(result, Status.RESOURCE_FILE_EXIST,hdfsFilename); } } catch (Exception e) { logger.error(e.getMessage(),e); putMsg(result,Status.HDFS_OPERATION_ERROR); } }else{ putMsg(result,Status.TENANT_NOT_EXIST); } } return result; } /** * verify resource by full name or pid and type * @param fullName resource full name
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
* @param id resource id * @param type resource type * @return true if the resource full name or pid not exists, otherwise return false */ public Result queryResource(String fullName,Integer id,ResourceType type) { Result result = new Result(); if (StringUtils.isBlank(fullName) && id == null) { logger.error("You must input one of fullName and pid"); putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR); return result; } if (StringUtils.isNotBlank(fullName)) { List<Resource> resourceList = resourcesMapper.queryResource(fullName,type.ordinal()); if (CollectionUtils.isEmpty(resourceList)) { logger.error("resource file not exist, resource full name {} ", fullName); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } putMsg(result, Status.SUCCESS); result.setData(resourceList.get(0)); } else { Resource resource = resourcesMapper.selectById(id); if (resource == null) { logger.error("resource file not exist, resource id {}", id); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } Resource parentResource = resourcesMapper.selectById(resource.getPid()); if (parentResource == null) { logger.error("parent resource file not exist, resource id {}", id);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } putMsg(result, Status.SUCCESS); result.setData(parentResource); } return result; } /** * view resource file online * * @param resourceId resource id * @param skipLineNum skip line number * @param limit limit * @return resource content */ public Result readResource(int resourceId, int skipLineNum, int limit) { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } Resource resource = resourcesMapper.selectById(resourceId); if (resource == null) { logger.error("resource file not exist, resource id {}", resourceId); putMsg(result, Status.RESOURCE_NOT_EXIST); return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} String nameSuffix = FileUtils.suffix(resource.getAlias()); String resourceViewSuffixs = FileUtils.getResourceViewSuffixs(); if (StringUtils.isNotEmpty(resourceViewSuffixs)) { List<String> strList = Arrays.asList(resourceViewSuffixs.split(",")); if (!strList.contains(nameSuffix)) { logger.error("resource suffix {} not support view, resource id {}", nameSuffix, resourceId); putMsg(result, Status.RESOURCE_SUFFIX_NOT_SUPPORT_VIEW); return result; } } String tenantCode = getTenantCode(resource.getUserId(),result); if (StringUtils.isEmpty(tenantCode)){ return result; } String hdfsFileName = HadoopUtils.getHdfsResourceFileName(tenantCode, resource.getFullName()); logger.info("resource hdfs path is {} ", hdfsFileName); try { if(HadoopUtils.getInstance().exists(hdfsFileName)){ List<String> content = HadoopUtils.getInstance().catFile(hdfsFileName, skipLineNum, limit); putMsg(result, Status.SUCCESS); Map<String, Object> map = new HashMap<>(); map.put(ALIAS, resource.getAlias()); map.put(CONTENT, String.join("\n", content)); result.setData(map); }else{ logger.error("read file {} not exist in hdfs", hdfsFileName); putMsg(result, Status.RESOURCE_FILE_NOT_EXIST,hdfsFileName);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
} } catch (Exception e) { logger.error("Resource {} read failed", hdfsFileName, e); putMsg(result, Status.HDFS_OPERATION_ERROR); } return result; } /** * create resource file online * * @param loginUser login user * @param type resource type * @param fileName file name * @param fileSuffix file suffix * @param desc description * @param content content * @return create result code */ @Transactional(rollbackFor = Exception.class) public Result onlineCreateResource(User loginUser, ResourceType type, String fileName, String fileSuffix, String desc, String content,int pid,String currentDirectory) { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } String nameSuffix = fileSuffix.trim(); String resourceViewSuffixs = FileUtils.getResourceViewSuffixs();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
if (StringUtils.isNotEmpty(resourceViewSuffixs)) { List<String> strList = Arrays.asList(resourceViewSuffixs.split(",")); if (!strList.contains(nameSuffix)) { logger.error("resouce suffix {} not support create", nameSuffix); putMsg(result, Status.RESOURCE_SUFFIX_NOT_SUPPORT_VIEW); return result; } } String name = fileName.trim() + "." + nameSuffix; String fullName = currentDirectory.equals("/") ? String.format("%s%s",currentDirectory,name):String.format("%s/%s",currentDirectory,name); result = verifyResourceName(fullName,type,loginUser); if (!result.getCode().equals(Status.SUCCESS.getCode())) { return result; } Date now = new Date(); Resource resource = new Resource(pid,name,fullName,false,desc,name,loginUser.getId(),type,content.getBytes().length,now,now); resourcesMapper.insert(resource); putMsg(result, Status.SUCCESS); Map<Object, Object> dataMap = new BeanMap(resource); Map<String, Object> resultMap = new HashMap<>(); for (Map.Entry<Object, Object> entry: dataMap.entrySet()) { if (!Constants.CLASS.equalsIgnoreCase(entry.getKey().toString())) { resultMap.put(entry.getKey().toString(), entry.getValue()); } } result.setData(resultMap); String tenantCode = tenantMapper.queryById(loginUser.getTenantId()).getTenantCode(); result = uploadContentToHdfs(fullName, tenantCode, content); if (!result.getCode().equals(Status.SUCCESS.getCode())) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
throw new RuntimeException(result.getMsg()); } return result; } /** * updateProcessInstance resource * * @param resourceId resource id * @param content content * @return update result cod */ @Transactional(rollbackFor = Exception.class) public Result updateResourceContent(int resourceId, String content) { Result result = new Result(); if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); putMsg(result, Status.HDFS_NOT_STARTUP); return result; } Resource resource = resourcesMapper.selectById(resourceId); if (resource == null) { logger.error("read file not exist, resource id {}", resourceId); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } String nameSuffix = FileUtils.suffix(resource.getAlias()); String resourceViewSuffixs = FileUtils.getResourceViewSuffixs(); if (StringUtils.isNotEmpty(resourceViewSuffixs)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
List<String> strList = Arrays.asList(resourceViewSuffixs.split(",")); if (!strList.contains(nameSuffix)) { logger.error("resource suffix {} not support updateProcessInstance, resource id {}", nameSuffix, resourceId); putMsg(result, Status.RESOURCE_SUFFIX_NOT_SUPPORT_VIEW); return result; } } String tenantCode = getTenantCode(resource.getUserId(),result); if (StringUtils.isEmpty(tenantCode)){ return result; } resource.setSize(content.getBytes().length); resource.setUpdateTime(new Date()); resourcesMapper.updateById(resource); result = uploadContentToHdfs(resource.getFullName(), tenantCode, content); if (!result.getCode().equals(Status.SUCCESS.getCode())) { throw new RuntimeException(result.getMsg()); } return result; } /** * @param resourceName resource name * @param tenantCode tenant code * @param content content * @return result */ private Result uploadContentToHdfs(String resourceName, String tenantCode, String content) { Result result = new Result(); String localFilename = ""; String hdfsFileName = "";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
try { localFilename = FileUtils.getUploadFilename(tenantCode, UUID.randomUUID().toString()); if (!FileUtils.writeContent2File(content, localFilename)) { logger.error("file {} fail, content is {}", localFilename, content); putMsg(result, Status.RESOURCE_NOT_EXIST); return result; } hdfsFileName = HadoopUtils.getHdfsResourceFileName(tenantCode, resourceName); String resourcePath = HadoopUtils.getHdfsResDir(tenantCode); logger.info("resource hdfs path is {} ", hdfsFileName); HadoopUtils hadoopUtils = HadoopUtils.getInstance(); if (!hadoopUtils.exists(resourcePath)) { createTenantDirIfNotExists(tenantCode); } if (hadoopUtils.exists(hdfsFileName)) { hadoopUtils.delete(hdfsFileName, false); } hadoopUtils.copyLocalToHdfs(localFilename, hdfsFileName, true, true); } catch (Exception e) { logger.error(e.getMessage(), e); result.setCode(Status.HDFS_OPERATION_ERROR.getCode()); result.setMsg(String.format("copy %s to hdfs %s fail", localFilename, hdfsFileName)); return result; } putMsg(result, Status.SUCCESS); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
/** * download file * * @param resourceId resource id * @return resource content * @throws Exception exception */ public org.springframework.core.io.Resource downloadResource(int resourceId) throws Exception { if (!PropertyUtils.getResUploadStartupState()){ logger.error("resource upload startup state: {}", PropertyUtils.getResUploadStartupState()); throw new RuntimeException("hdfs not startup"); } Resource resource = resourcesMapper.selectById(resourceId); if (resource == null) { logger.error("download file not exist, resource id {}", resourceId); return null; } if (resource.isDirectory()) { logger.error("resource id {} is directory,can't download it", resourceId); throw new RuntimeException("cant't download directory"); } User user = userMapper.queryDetailsById(resource.getUserId()); String tenantCode = tenantMapper.queryById(user.getTenantId()).getTenantCode(); String hdfsFileName = HadoopUtils.getHdfsFileName(resource.getType(), tenantCode, resource.getAlias()); String localFileName = FileUtils.getDownloadFilename(resource.getAlias()); logger.info("resource hdfs path is {} ", hdfsFileName); HadoopUtils.getInstance().copyHdfsToLocal(hdfsFileName, localFileName, false, true); return org.apache.dolphinscheduler.api.utils.FileUtils.file2Resource(localFileName); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
/** * list all file * * @param loginUser login user * @param userId user id * @return unauthorized result code */ public Map<String, Object> authorizeResourceTree(User loginUser, Integer userId) { Map<String, Object> result = new HashMap<>(); if (checkAdmin(loginUser, result)) { return result; } List<Resource> resourceList = resourcesMapper.queryResourceExceptUserId(userId); List<ResourceComponent> list ; if (CollectionUtils.isNotEmpty(resourceList)) { Visitor visitor = new ResourceTreeVisitor(resourceList); list = visitor.visit().getChildren(); }else { list = new ArrayList<>(0); } result.put(Constants.DATA_LIST, list); putMsg(result,Status.SUCCESS); return result; } /** * unauthorized file * * @param loginUser login user * @param userId user id * @return unauthorized result code
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
*/ public Map<String, Object> unauthorizedFile(User loginUser, Integer userId) { Map<String, Object> result = new HashMap<>(); if (checkAdmin(loginUser, result)) { return result; } List<Resource> resourceList = resourcesMapper.queryResourceExceptUserId(userId); List<Resource> list ; if (resourceList != null && resourceList.size() > 0) { Set<Resource> resourceSet = new HashSet<>(resourceList); List<Resource> authedResourceList = resourcesMapper.queryAuthorizedResourceList(userId); getAuthorizedResourceList(resourceSet, authedResourceList); list = new ArrayList<>(resourceSet); }else { list = new ArrayList<>(0); } Visitor visitor = new ResourceTreeVisitor(list); result.put(Constants.DATA_LIST, visitor.visit().getChildren()); putMsg(result,Status.SUCCESS); return result; } /** * unauthorized udf function * * @param loginUser login user * @param userId user id * @return unauthorized result code */ public Map<String, Object> unauthorizedUDFFunction(User loginUser, Integer userId) { Map<String, Object> result = new HashMap<>(5);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
if (checkAdmin(loginUser, result)) { return result; } List<UdfFunc> udfFuncList = udfFunctionMapper.queryUdfFuncExceptUserId(userId); List<UdfFunc> resultList = new ArrayList<>(); Set<UdfFunc> udfFuncSet = null; if (CollectionUtils.isNotEmpty(udfFuncList)) { udfFuncSet = new HashSet<>(udfFuncList); List<UdfFunc> authedUDFFuncList = udfFunctionMapper.queryAuthedUdfFunc(userId); getAuthorizedResourceList(udfFuncSet, authedUDFFuncList); resultList = new ArrayList<>(udfFuncSet); } result.put(Constants.DATA_LIST, resultList); putMsg(result,Status.SUCCESS); return result; } /** * authorized udf function * * @param loginUser login user * @param userId user id * @return authorized result code */ public Map<String, Object> authorizedUDFFunction(User loginUser, Integer userId) { Map<String, Object> result = new HashMap<>(); if (checkAdmin(loginUser, result)) { return result; } List<UdfFunc> udfFuncs = udfFunctionMapper.queryAuthedUdfFunc(userId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
result.put(Constants.DATA_LIST, udfFuncs); putMsg(result,Status.SUCCESS); return result; } /** * authorized file * * @param loginUser login user * @param userId user id * @return authorized result */ public Map<String, Object> authorizedFile(User loginUser, Integer userId) { Map<String, Object> result = new HashMap<>(5); if (checkAdmin(loginUser, result)){ return result; } List<Resource> authedResources = resourcesMapper.queryAuthorizedResourceList(userId); Visitor visitor = new ResourceTreeVisitor(authedResources); logger.info(JSON.toJSONString(visitor.visit(), SerializerFeature.SortField)); String jsonTreeStr = JSON.toJSONString(visitor.visit().getChildren(), SerializerFeature.SortField); logger.info(jsonTreeStr); result.put(Constants.DATA_LIST, visitor.visit().getChildren()); putMsg(result,Status.SUCCESS); return result; } /** * get authorized resource list * * @param resourceSet resource set * @param authedResourceList authorized resource list
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
*/ private void getAuthorizedResourceList(Set<?> resourceSet, List<?> authedResourceList) { Set<?> authedResourceSet = null; if (CollectionUtils.isNotEmpty(authedResourceList)) { authedResourceSet = new HashSet<>(authedResourceList); resourceSet.removeAll(authedResourceSet); } } /** * get tenantCode by UserId * * @param userId user id * @param result return result * @return */ private String getTenantCode(int userId,Result result){ User user = userMapper.queryDetailsById(userId); if(user == null){ logger.error("user {} not exists", userId); putMsg(result, Status.USER_NOT_EXIST,userId); return null; } Tenant tenant = tenantMapper.queryById(user.getTenantId()); if (tenant == null){ logger.error("tenant not exists"); putMsg(result, Status.TENANT_NOT_EXIST); return null; } return tenant.getTenantCode(); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,598
[BUG] After renaming the file, downloading the file gives an error
1. create file is test_1.sh 2. The file is renamed to test_1.txt, and the file name displayed on the page is "test_1.txt.sh" 3. Download file, prompt "error downloading resource file" 4. Check the hdfs resource file is "test_1.txt" ![image](https://user-images.githubusercontent.com/55787491/81133105-3d4a7900-8f83-11ea-9ce6-d36fa2f38a43.png) ![image](https://user-images.githubusercontent.com/55787491/81132928-a7aee980-8f82-11ea-8b0a-e3ed7231e560.png) ![image](https://user-images.githubusercontent.com/55787491/81133119-48050e00-8f83-11ea-84a5-83bc3f9f84d3.png) **Which version of Dolphin Scheduler:** -[dev]
https://github.com/apache/dolphinscheduler/issues/2598
https://github.com/apache/dolphinscheduler/pull/2732
63ce143be5fd76ea08f9fcf73e7720cb1be99297
60f8eb25fa69fa39cd17404b9eb66376c174b9c3
2020-05-06T02:17:35Z
java
2020-05-18T09:56:41Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ResourcesService.java
/** * list all children id * @param resource resource * @param containSelf whether add self to children list * @return all children id */ List<Integer> listAllChildren(Resource resource,boolean containSelf){ List<Integer> childList = new ArrayList<>(); if (resource.getId() != -1 && containSelf) { childList.add(resource.getId()); } if(resource.isDirectory()){ listAllChildren(resource.getId(),childList); } return childList; } /** * list all children id * @param resourceId resource id * @param childList child list */ void listAllChildren(int resourceId,List<Integer> childList){ List<Integer> children = resourcesMapper.listChildren(resourceId); for(int chlidId:children){ childList.add(chlidId); listAllChildren(chlidId,childList); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
* 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.common.enums; import com.baomidou.mybatisplus.annotation.EnumValue; /** * running status for workflow and task nodes * */ public enum ExecutionStatus { /** * status: * 0 submit success * 1 running * 2 ready pause * 3 pause * 4 ready stop * 5 stop * 6 failure * 7 success
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
* 8 need fault tolerance * 9 kill * 10 waiting thread * 11 waiting depend node complete */ SUBMITTED_SUCCESS(0, "submit success"), RUNNING_EXEUTION(1, "running"), READY_PAUSE(2, "ready pause"), PAUSE(3, "pause"), READY_STOP(4, "ready stop"), STOP(5, "stop"), FAILURE(6, "failure"), SUCCESS(7, "success"), NEED_FAULT_TOLERANCE(8, "need fault tolerance"), KILL(9, "kill"), WAITTING_THREAD(10, "waiting thread"), WAITTING_DEPEND(11, "waiting depend node complete"); ExecutionStatus(int code, String descp){ this.code = code; this.descp = descp; } @EnumValue private final int code; private final String descp; /** * status is success * @return status */ public boolean typeIsSuccess(){ return this == SUCCESS;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
} /** * status is failure * @return status */ public boolean typeIsFailure(){ return this == FAILURE || this == NEED_FAULT_TOLERANCE || this == KILL; } /** * status is finished * @return status */ public boolean typeIsFinished(){ return typeIsSuccess() || typeIsFailure() || typeIsCancel() || typeIsPause() || typeIsWaittingThread(); } /** * status is waiting thread * @return status */ public boolean typeIsWaittingThread(){ return this == WAITTING_THREAD; } /** * status is pause * @return status */ public boolean typeIsPause(){ return this == PAUSE; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
/** * status is running * @return status */ public boolean typeIsRunning(){ return this == RUNNING_EXEUTION || this == WAITTING_DEPEND; } /** * status is cancel * @return status */ public boolean typeIsCancel(){ return this == KILL || this == STOP ; } public int getCode() { return code; } public String getDescp() { return descp; } public static ExecutionStatus of(int status){ for(ExecutionStatus es : values()){ if(es.getCode() == status){ return es; } } throw new IllegalArgumentException("invalid status : " + status); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
/* * Licnsd o h Apach Sofwar Foundaion (ASF) undr on or mor * conribuor licns agrmns. S h NOTICE fil disribud wih * his work for addiional informaion rgarding copyrigh ownrship. * Th ASF licnss his fil o You undr h Apach Licns, Vrsion 2.0 * (h "Licns"); you may no us his fil xcp in complianc wih * h Licns. You may obain a copy of h Licns a * * hp://www.apach.org/licnss/LICENSE-2.0 * * Unlss rquird by applicabl law or agrd o in wriing, sofwar * disribud undr h Licns is disribud on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ihr xprss or implid. * S h Licns for h spcific languag govrning prmissions and * limiaions undr h Licns. */ packag org.apach.dolphinschdulr.srvr.masr.runnr; impor com.alibaba.fasjson.JSON; impor com.googl.common.collc.Liss; impor org.apach.commons.io.FilUils; impor org.apach.dolphinschdulr.common.Consans; impor org.apach.dolphinschdulr.common.nums.*; impor org.apach.dolphinschdulr.common.graph.DAG;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
impor org.apach.dolphinschdulr.common.modl.TaskNod; impor org.apach.dolphinschdulr.common.modl.TaskNodRlaion; impor org.apach.dolphinschdulr.common.procss.ProcssDag; impor org.apach.dolphinschdulr.common.ask.condiions.CondiionsParamrs; impor org.apach.dolphinschdulr.common.hrad.Soppr; impor org.apach.dolphinschdulr.common.hrad.ThradUils; impor org.apach.dolphinschdulr.common.uils.*; impor org.apach.dolphinschdulr.dao.niy.ProcssInsanc; impor org.apach.dolphinschdulr.dao.niy.Schdul; impor org.apach.dolphinschdulr.dao.niy.TaskInsanc; impor org.apach.dolphinschdulr.dao.uils.DagHlpr; impor org.apach.dolphinschdulr.rmo.NyRmoingClin; impor org.apach.dolphinschdulr.srvr.masr.config.MasrConfig; impor org.apach.dolphinschdulr.srvr.uils.AlrManagr; impor org.apach.dolphinschdulr.srvic.ban.SpringApplicaionConx; impor org.apach.dolphinschdulr.srvic.procss.ProcssSrvic; impor org.apach.dolphinschdulr.srvic.quarz.cron.CronUils; impor org.slf4j.Loggr; impor org.slf4j.LoggrFacory; impor java.io.Fil; impor java.io.IOExcpion; impor java.uil.*; impor java.uil.concurrn.ConcurrnHashMap; impor java.uil.concurrn.ExcuorSrvic; impor java.uil.concurrn.Fuur; impor saic org.apach.dolphinschdulr.common.Consans.*; /** * masr xc hrad,spli dag */ public class MasrExcThrad implmns Runnabl {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
/** * loggr of MasrExcThrad */ priva saic final Loggr loggr = LoggrFacory.gLoggr(MasrExcThrad.class); /** * procss insanc */ priva ProcssInsanc procssInsanc; /** * runing TaskNod */ priva final Map<MasrBasTaskExcThrad,Fuur<Boolan>> acivTaskNod = nw ConcurrnHashMap<>(); /** * ask xc srvic */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva final ExcuorSrvic askExcSrvic; /** * submi failur nods */ priva boolan askFaildSubmi = fals; /** * rcovr nod id lis */ priva Lis<TaskInsanc> rcovrNodIdLis = nw ArrayLis<>(); /** * rror ask lis */ priva Map<Sring,TaskInsanc> rrorTaskLis = nw ConcurrnHashMap<>(); /** * compl ask lis */ priva Map<Sring, TaskInsanc> complTaskLis = nw ConcurrnHashMap<>(); /** * rady o submi ask lis */ priva Map<Sring, TaskInsanc> radyToSubmiTaskLis = nw ConcurrnHashMap<>(); /** * dpnd faild ask map */ priva Map<Sring, TaskInsanc> dpndFaildTask = nw ConcurrnHashMap<>(); /** * forbiddn ask map */ priva Map<Sring, TaskNod> forbiddnTaskLis = nw ConcurrnHashMap<>(); /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* skip ask map */ priva Map<Sring, TaskNod> skipTaskNodLis = nw ConcurrnHashMap<>(); /** * rcovr olranc faul ask lis */ priva Lis<TaskInsanc> rcovrTolrancFaulTaskLis = nw ArrayLis<>(); /** * alr managr */ priva AlrManagr alrManagr = nw AlrManagr(); /** * h objc of DAG */ priva DAG<Sring,TaskNod,TaskNodRlaion> dag; /** * procss srvic */ priva ProcssSrvic procssSrvic; /** * masr config */ priva MasrConfig masrConfig; /** * */ priva NyRmoingClin nyRmoingClin; /** * consrucor of MasrExcThrad * @param procssInsanc procssInsanc
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* @param procssSrvic procssSrvic * @param nyRmoingClin nyRmoingClin */ public MasrExcThrad(ProcssInsanc procssInsanc, ProcssSrvic procssSrvic, NyRmoingClin nyRmoingClin){ his.procssSrvic = procssSrvic; his.procssInsanc = procssInsanc; his.masrConfig = SpringApplicaionConx.gBan(MasrConfig.class); in masrTaskExcNum = masrConfig.gMasrExcTaskNum(); his.askExcSrvic = ThradUils.nwDamonFixdThradExcuor("Masr-Task-Exc-Thrad", masrTaskExcNum); his.nyRmoingClin = nyRmoingClin; } @Ovrrid public void run() { if (procssInsanc == null){ loggr.info("procss insanc is no xiss"); rurn; } if (procssInsanc.gSa().ypIsFinishd()){ loggr.info("procss insanc is don : {}",procssInsanc.gId()); rurn; } ry { if (procssInsanc.isComplmnDaa() && Flag.NO == procssInsanc.gIsSubProcss()){ xcuComplmnProcss(); }ls{
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
xcuProcss(); } }cach (Excpion ){ loggr.rror("masr xc hrad xcpion", ); loggr.rror("procss xcu faild, procss id:{}", procssInsanc.gId()); procssInsanc.sSa(ExcuionSaus.FAILURE); procssInsanc.sEndTim(nw Da()); procssSrvic.updaProcssInsanc(procssInsanc); }finally { askExcSrvic.shudown(); posHandl(); } } /** * xcu procss * @hrows Excpion xcpion */ priva void xcuProcss() hrows Excpion { prparProcss(); runProcss(); ndProcss(); } /** * xcu complmn procss * @hrows Excpion xcpion */ priva void xcuComplmnProcss() hrows Excpion { Map<Sring, Sring> cmdParam = JSONUils.oMap(procssInsanc.gCommandParam()); Da sarDa = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_START_DATE));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
Da ndDa = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_END_DATE)); procssSrvic.savProcssInsanc(procssInsanc); in procssDfiniionId = procssInsanc.gProcssDfiniionId(); Lis<Schdul> schduls = procssSrvic.quryRlasSchdulrLisByProcssDfiniionId(procssDfiniionId); Lis<Da> lisDa = Liss.nwLinkdLis(); !CollcionUils.isEmpy(schduls)){ for (Schdul schdul : schduls) { lisDa.addAll(CronUils.gSlfFirDaLis(sarDa, ndDa, schdul.gCronab())); } } Iraor<Da> iraor = null; Da schdulDa = null; !CollcionUils.isEmpy(lisDa)) { iraor = lisDa.iraor(); schdulDa = iraor.nx(); procssInsanc.sSchdulTim(schdulDa); procssSrvic.updaProcssInsanc(procssInsanc); }ls{ schdulDa = procssInsanc.gSchdulTim(); schdulDa == null){ schdulDa = sarDa; } } whil(Soppr.isRunning()){ prparProcss(); dag == null){ loggr.rror("procss {} dag is null, plas chck ou paramrs",
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
procssInsanc.gId()); procssInsanc.sSa(ExcuionSaus.SUCCESS); procssSrvic.updaProcssInsanc(procssInsanc); rurn; } runProcss(); !procssInsanc.gSa().ypIsSuccss()){ loggr.info("procss {} sa {}, complmn no complly!", procssInsanc.gId(), procssInsanc.gSa()); brak; } // null == iraor){ // schdulDa = DaUils.gSomDay(schdulDa, 1); schdulDa.afr(ndDa)){ // loggr.info("procss {} complmn complly!", procssInsanc.gId()); brak; } }ls{ // !iraor.hasNx()){ // loggr.info("procss {} complmn complly!", procssInsanc.gId()); brak; } schdulDa = iraor.nx();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
} loggr.info("procss {} sar o complmn {} daa", procssInsanc.gId(), DaUils.daToSring(schdulDa)); // procssInsanc.sSchdulTim(schdulDa); cmdParam.conainsKy(Consans.CMDPARAM_RECOVERY_START_NODE_STRING)){ cmdParam.rmov(Consans.CMDPARAM_RECOVERY_START_NODE_STRING); procssInsanc.sCommandParam(JSONUils.oJson(cmdParam)); } Lis<TaskInsanc> askInsancLis = procssSrvic.findValidTaskLisByProcssId(procssInsanc.gId()); for(TaskInsanc askInsanc : askInsancLis){ askInsanc.sFlag(Flag.NO); procssSrvic.updaTaskInsanc(askInsanc); } procssInsanc.sSa(ExcuionSaus.RUNNING_EXEUTION); procssInsanc.sGlobalParams(ParamrUils.curingGlobalParams( procssInsanc.gProcssDfiniion().gGlobalParamMap(), procssInsanc.gProcssDfiniion().gGlobalParamLis(), CommandTyp.COMPLEMENT_DATA, procssInsanc.gSchdulTim())); procssSrvic.savProcssInsanc(procssInsanc); } // flow nd ndProcss(); } /** * prpar procss paramr * @hrows Excpion xcpion */ priva void prparProcss() hrows Excpion { //
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
iniTaskQuu(); // buildFlowDag(); loggr.info("prpar procss :{} nd", procssInsanc.gId()); } /** * procss nd handl */ priva void ndProcss() { procssInsanc.sEndTim(nw Da()); procssSrvic.updaProcssInsanc(procssInsanc); procssInsanc.gSa().ypIsWaiingThrad()){ procssSrvic.craRcovryWaiingThradCommand(null, procssInsanc); } Lis<TaskInsanc> askInsancs = procssSrvic.findValidTaskLisByProcssId(procssInsanc.gId()); alrManagr.sndAlrProcssInsanc(procssInsanc, askInsancs); } /** * * @hrows Excpion xcpion */ priva void buildFlowDag() hrows Excpion { rcovrNodIdLis = gSarTaskInsancLis(procssInsanc.gCommandParam()); forbiddnTaskLis = DagHlpr.gForbiddnTaskNodMaps(procssInsanc.gProcssInsancJson()); // Lis<Sring> rcovryNamLis = gRcovryNodNamLis(); Lis<Sring> sarNodNamLis = parsSarNodNam(procssInsanc.gCommandParam()); ProcssDag procssDag = gnraFlowDag(procssInsanc.gProcssInsancJson(), sarNodNamLis, rcovryNamLis, procssInsanc.gTaskDpndTyp()); procssDag == null){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
loggr.rror("procssDag is null"); rurn; } // dag = DagHlpr.buildDagGraph(procssDag); } /** * */ priva void iniTaskQuu(){ askFaildSubmi = fals; acivTaskNod.clar(); dpndFaildTask.clar(); complTaskLis.clar(); rrorTaskLis.clar(); Lis<TaskInsanc> askInsancLis = procssSrvic.findValidTaskLisByProcssId(procssInsanc.gId()); for(TaskInsanc ask : askInsancLis){ ask.isTaskCompl()){ complTaskLis.pu(ask.gNam(), ask); } ask.gSa().ypIsFailur() && !ask.askCanRry()){ rrorTaskLis.pu(ask.gNam(), ask); } } } /** * procss pos handl */ priva void posHandl() { loggr.info("dvlop mod is: {}", CommonUils.isDvlopMod());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
if (!CommonUils.isDvlopMod()) { // Sring xcLocalPah = org.apach.dolphinschdulr.common.uils.FilUils .gProcssExcDir(procssInsanc.gProcssDfiniion().gProjcId(), procssInsanc.gProcssDfiniionId(), procssInsanc.gId()); ry { FilUils.dlDircory(nw Fil(xcLocalPah)); } cach (IOExcpion ) { loggr.rror("dl xc dir faild ", ); } } } /** * submi ask o xcu * @param askInsanc ask insanc * @rurn TaskInsanc */ priva TaskInsanc submiTaskExc(TaskInsanc askInsanc) { MasrBasTaskExcThrad absracExcThrad = null; askInsanc.isSubProcss()){ absracExcThrad = nw SubProcssTaskExcThrad(askInsanc); }ls askInsanc.isDpndTask()){ absracExcThrad = nw DpndnTaskExcThrad(askInsanc); }ls askInsanc.isCondiionsTask()){ absracExcThrad = nw CondiionsTaskExcThrad(askInsanc); }ls { absracExcThrad = nw MasrTaskExcThrad(askInsanc); } Fuur<Boolan> fuur = askExcSrvic.submi(absracExcThrad);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
acivTaskNod.puIfAbsn(absracExcThrad, fuur); rurn absracExcThrad.gTaskInsanc(); } /** * find ask insanc in db. * in cas submi mor han on sam nam ask in h sam im. * @param askNam ask nam * @rurn TaskInsanc */ priva TaskInsanc findTaskIfExiss(Sring askNam){ Lis<TaskInsanc> askInsancLis = procssSrvic.findValidTaskLisByProcssId(his.procssInsanc.gId()); for(TaskInsanc askInsanc : askInsancLis){ askInsanc.gNam().quals(askNam)){ rurn askInsanc; } } rurn null; } /** * ncapsulaion ask * @param procssInsanc procss insanc * @param nodNam nod nam * @rurn TaskInsanc */ priva TaskInsanc craTaskInsanc(ProcssInsanc procssInsanc, Sring nodNam, TaskNod askNod) { TaskInsanc askInsanc = findTaskIfExiss(nodNam); askInsanc == null){ askInsanc = nw TaskInsanc(); // ask nam
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
askInsanc.sNam(nodNam); // askInsanc.sProcssDfiniionId(procssInsanc.gProcssDfiniionId()); // askInsanc.sSa(ExcuionSaus.SUBMITTED_SUCCESS); // askInsanc.sProcssInsancId(procssInsanc.gId()); // askInsanc.sTaskJson(JSON.oJSONSring(askNod)); // askInsanc.sTaskTyp(askNod.gTyp()); // askInsanc.sAlrFlag(Flag.NO); // askInsanc.sSarTim(nw Da()); // askInsanc.sFlag(Flag.YES); // askInsanc.sRryTims(0); // askInsanc.sMaxRryTims(askNod.gMaxRryTims()); // askInsanc.sRryInrval(askNod.gRryInrval()); // askNod.gTaskInsancPrioriy() == null){ askInsanc.sTaskInsancPrioriy(Prioriy.MEDIUM); }ls{ askInsanc.sTaskInsancPrioriy(askNod.gTaskInsancPrioriy()); } Sring procssWorkrGroup = procssInsanc.gWorkrGroup();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
procssWorkrGroup = SringUils.isBlank(procssWorkrGroup) ? DEFAULT_WORKER_GROUP : procssWorkrGroup; Sring askWorkrGroup = SringUils.isBlank(askNod.gWorkrGroup()) ? procssWorkrGroup : askNod.gWorkrGroup(); if (!procssWorkrGroup.quals(DEFAULT_WORKER_GROUP) && askWorkrGroup.quals(DEFAULT_WORKER_GROUP)) { askInsanc.sWorkrGroup(procssWorkrGroup); }ls { askInsanc.sWorkrGroup(askWorkrGroup); } } rurn askInsanc; } /** * if all of h ask dpndnc ar skip, skip i oo. * @param askNod * @rurn */ priva boolan isTaskNodNdSkip(TaskNod askNod){ CollcionUils.isEmpy(askNod.gDpLis())){ rurn fals; } for(Sring dpNod : askNod.gDpLis()){ !skipTaskNodLis.conainsKy(dpNod)){ rurn fals; } } rurn ru; } /** * s ask nod skip if dpndnc all skip * @param askNodsSkipLis */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva void sTaskNodSkip(Lis<Sring> askNodsSkipLis){ for(Sring skipNod : askNodsSkipLis){ skipTaskNodLis.puIfAbsn(skipNod, dag.gNod(skipNod)); Collcion<Sring> posNodLis = DagHlpr.gSarVrx(skipNod, dag, complTaskLis); Lis<Sring> posSkipLis = nw ArrayLis<>(); for(Sring pos : posNodLis){ TaskNod posNod = dag.gNod(pos); isTaskNodNdSkip(posNod)){ posSkipLis.add(pos); } } sTaskNodSkip(posSkipLis); } } /** * pars condiion ask find h branch procss * s skip flag for anohr on. * @param nodNam * @rurn */ priva Lis<Sring> parsCondiionTask(Sring nodNam){ Lis<Sring> condiionTaskLis = nw ArrayLis<>(); TaskNod askNod = dag.gNod(nodNam); !askNod.isCondiionsTask()){ rurn condiionTaskLis; } CondiionsParamrs condiionsParamrs = JSONUils.parsObjc(askNod.gCondiionRsul(), CondiionsParamrs.class); TaskInsanc askInsanc = complTaskLis.g(nodNam); askInsanc == null){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
loggr.rror("ask insanc {} canno find, plas chck i!", nodNam); rurn condiionTaskLis; } askInsanc.gSa().ypIsSuccss()){ condiionTaskLis = condiionsParamrs.gSuccssNod(); sTaskNodSkip(condiionsParamrs.gFaildNod()); }ls askInsanc.gSa().ypIsFailur()){ condiionTaskLis = condiionsParamrs.gFaildNod(); sTaskNodSkip(condiionsParamrs.gSuccssNod()); }ls{ condiionTaskLis.add(nodNam); } rurn condiionTaskLis; } /** * pars pos nod lis of prvious nod * if condiion nod: rurn procss according o h sings * if pos nod compld, rurn pos nods of h compld nod * @param prviousNodNam * @rurn */ priva Lis<Sring> parsPosNodLis(Sring prviousNodNam){ Lis<Sring> posNodLis = nw ArrayLis<>(); TaskNod askNod = dag.gNod(prviousNodNam); askNod != null && askNod.isCondiionsTask()){ rurn parsCondiionTask(prviousNodNam); } Collcion<Sring> posNodCollcion = DagHlpr.gSarVrx(prviousNodNam, dag, complTaskLis); Lis<Sring> posSkipLis = nw ArrayLis<>(); //
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
// // // for(Sring posNod : posNodCollcion){ complTaskLis.conainsKy(posNod)){ TaskInsanc posTaskInsanc = complTaskLis.g(posNod); dag.gNod(posNod).isCondiionsTask()){ Lis<Sring> condiionTaskNodLis = parsCondiionTask(posNod); for(Sring condiions : condiionTaskNodLis){ posNodLis.addAll(parsPosNodLis(condiions)); } }ls posTaskInsanc.gSa().ypIsSuccss()){ posNodLis.addAll(parsPosNodLis(posNod)); }ls{ posNodLis.add(posNod); } }ls isTaskNodNdSkip(dag.gNod(posNod))){ posSkipLis.add(posNod); sTaskNodSkip(posSkipLis); posSkipLis.clar(); }ls{ posNodLis.add(posNod); } } rurn posNodLis; } /** * submi pos nod * @param parnNodNam parn nod nam */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
priva void submiPosNod(Sring parnNodNam){ Lis<Sring> submiTaskNodLis = parsPosNodLis(parnNodNam); Lis<TaskInsanc> askInsancs = nw ArrayLis<>(); for(Sring askNod : submiTaskNodLis){ askInsancs.add(craTaskInsanc(procssInsanc, askNod, dag.gNod(askNod))); } // for(TaskInsanc ask : askInsancs){ radyToSubmiTaskLis.conainsKy(ask.gNam())){ coninu; } complTaskLis.conainsKy(ask.gNam())){ loggr.info("ask {} has alrady run succss", ask.gNam()); coninu; } ask.gSa().ypIsPaus() || ask.gSa().ypIsCancl()){ loggr.info("ask {} soppd, h sa is {}", ask.gNam(), ask.gSa()); }ls{ addTaskToSandByLis(ask); } } } /** * drmin whhr h dpndncis of h ask nod ar compl * @rurn DpndRsul */ priva DpndRsul isTaskDpsCompl(Sring askNam) { Collcion<Sring> sarNods = dag.gBginNod(); //
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
sarNods.conains(askNam)){ rurn DpndRsul.SUCCESS; } TaskNod askNod = dag.gNod(askNam); Lis<Sring> dpNamLis = askNod.gDpLis(); for(Sring dpsNod : dpNamLis ){ !dag.conainsNod(dpsNod) || forbiddnTaskLis.conainsKy(dpsNod) || skipTaskNodLis.conainsKy(dpsNod)){ coninu; } // !complTaskLis.conainsKy(dpsNod)){ rurn DpndRsul.WAITING; } ExcuionSaus dpTaskSa = complTaskLis.g(dpsNod).gSa(); // dpTaskSa.ypIsFailur() && !DagHlpr.havCondiionsAfrNod(dpsNod, dag ) && !dag.gNod(dpsNod).isCondiionsTask()){ rurn DpndRsul.FAILED; } dpTaskSa.ypIsPaus() || dpTaskSa.ypIsCancl()){ rurn DpndRsul.WAITING; } } loggr.info("askNam: {} complDpndTaskLis: {}", askNam, Arrays.oSring(complTaskLis.kyS().oArray())); rurn DpndRsul.SUCCESS; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
2,634
Process shows success,when the task of the process is killed in the terminal
重现步骤: 1、有两个工作流AA和BB,BB依赖AA。 2、AA中有test1和test2任务,test2任务依赖test1。 3、BB中有dependent和test3任务,dependent配置AA的test2,test3依赖dependent。 4、现在手工运行AA,(test1任务可以配置shell,shell中运行一个test1.sh文件,该文件中可以写个sleep 60s),在执行worker的终端kill掉该任务(这种情况是手工kill,实际生产中服务器压力大时很有可能被其他服务kill掉)。 5、此时显示工作流AA运行成功,AA中test1任务kill状态,test2任务没有运行。 6、手工运行BB,可以看到BB中dependent和test3任务都运行成功。 正确的场景是AA中test1被kill后,AA应该是失败状态而不是成功状态,BB因dependent失败而失败 -------------------------------------------------------------------------------------- Reproduction steps: 1. There are two workflows AA and BB, and BB depends on AA. 2. There are test1 and test2 tasks in AA, and test2 tasks depend on test1. 3. There are DEPENDENCT and test3 tasks in BB. DEPENDENCT configures test2 of AA, and test3 depends on the DEPENDENCT. 4. Now run AA manually (test1 task can configure the shell, and a test1.sh file can be run in the shell, and a sleep 60s can be written in the file). Kill the task at the terminal executing the worker (in this case, kill manually. In actual production, when the server is under great pressure, it is likely to be killed by other services). 5. At this time, the workflow AA runs successfully, the test1 task in AA is in kill status, and the test2 task is not running. 6. Run BB manually, and you can see that the DEPENDENCT and test3 tasks in BB run successfully. I think the correct scenario is that after test1 in AA is killed, AA should be in failure state instead of success state. BB fails due to the DEPENDENCT failure
https://github.com/apache/dolphinscheduler/issues/2634
https://github.com/apache/dolphinscheduler/pull/2731
9ffcd82447cd355955d110fe19afb33f465f9d7e
a9da86abb4545b1ac8fdc5cdd05e85bdcdffa9c6
2020-05-08T06:20:02Z
java
2020-05-18T10:27:16Z
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
* qury ask insanc by compl sa * @param sa sa * @rurn ask insanc lis */ priva Lis<TaskInsanc> gComplTaskBySa(ExcuionSaus sa){ Lis<TaskInsanc> rsulLis = nw ArrayLis<>(); for (Map.Enry<Sring, TaskInsanc> nry: complTaskLis.nryS()) { nry.gValu().gSa() == sa){ rsulLis.add(nry.gValu()); } } rurn rsulLis; } /** * whr hr ar ongoing asks * @param sa sa * @rurn ExcuionSaus */ priva ExcuionSaus runningSa(ExcuionSaus sa){ sa == ExcuionSaus.READY_STOP || sa == ExcuionSaus.READY_PAUSE || sa == ExcuionSaus.WAITTING_THREAD){ // rurn sa; }ls{ rurn ExcuionSaus.RUNNING_EXEUTION; } } /** * xiss failur ask,conains submi failur、dpndncy failur,xcu failur(rry afr)