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
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
} // pause f (state == ExecutonStatus.READY_PAUSE) { return processReadyPause(); } // stop f (state == ExecutonStatus.READY_STOP) { Lst<TaskInstance> stopLst = getCompleteTaskByState(ExecutonStatus.STOP); Lst<TaskInstance> kllLst = getCompleteTaskByState(ExecutonStatus.KILL); Lst<TaskInstance> falLst = getCompleteTaskByState(ExecutonStatus.FAILURE); f (CollectonUtls.sNotEmpty(stopLst) || CollectonUtls.sNotEmpty(kllLst) || CollectonUtls.sNotEmpty(falLst) || !sComplementEnd()) { return ExecutonStatus.STOP; } else { return ExecutonStatus.SUCCESS; } } // process falure f (processFaled()) { return ExecutonStatus.FAILURE; } // success f (state == ExecutonStatus.RUNNING_EXECUTION) { Lst<TaskInstance> kllTasks = getCompleteTaskByState(ExecutonStatus.KILL); f (readyToSubmtTaskQueue.sze() > 0 || watToRetryTaskInstanceMap.sze() > 0) { //tasks cu return ExecutonStatus.RUNNING_EXECUTION; } else f (CollectonUtls.sNotEmpty(kllTasks)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
// tasks m return ExecutonStatus.FAILURE; } else { // f the return ExecutonStatus.SUCCESS; } } return state; } /** * whether complement end * * @return Boolean whether s complement end */ prvate boolean sComplementEnd() { f (!processInstance.sComplementData()) { return true; } try { Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam()); Date endTme = DateUtls.getScheduleDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE)); return processInstance.getScheduleTme().equals(endTme); } catch (Excepton e) { logger.error("complement end faled ", e); return false; } } /** * updateProcessInstance process nstance state * after each batch of tasks s executed, the status of the process nstance s updated
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
*/ prvate vod updateProcessInstanceState() { ExecutonStatus state = getProcessInstanceState(processInstance); f (processInstance.getState() != state) { logger.nfo( "work flow process nstance [d: {}, name:{}], state change from {} to {}, cmd type: {}", processInstance.getId(), processInstance.getName(), processInstance.getState(), state, processInstance.getCommandType()); processInstance.setState(state); f (state.typeIsFnshed()) { processInstance.setEndTme(new Date()); } processServce.updateProcessInstance(processInstance); StateEvent stateEvent = new StateEvent(); stateEvent.setExecutonStatus(processInstance.getState()); stateEvent.setProcessInstanceId(ths.processInstance.getId()); stateEvent.setType(StateEventType.PROCESS_STATE_CHANGE); // ths.pr // replace ths.stateEvents.add(stateEvent); } } /** * stateEvent's executon status as process nstance state */ prvate vod updateProcessInstanceState(StateEvent stateEvent) { ExecutonStatus state = stateEvent.getExecutonStatus(); f (processInstance.getState() != state) { logger.nfo(
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
"work flow process nstance [d: {}, name:{}], state change from {} to {}, cmd type: {}", processInstance.getId(), processInstance.getName(), processInstance.getState(), state, processInstance.getCommandType()); processInstance.setState(state); f (state.typeIsFnshed()) { processInstance.setEndTme(new Date()); } processServce.updateProcessInstance(processInstance); } } /** * get task dependency result * * @param taskInstance task nstance * @return DependResult */ prvate DependResult getDependResultForTask(TaskInstance taskInstance) { return sTaskDepsComplete(Long.toStrng(taskInstance.getTaskCode())); } /** * add task to standby lst * * @param taskInstance task nstance */ prvate vod addTaskToStandByLst(TaskInstance taskInstance) { try { f (readyToSubmtTaskQueue.contans(taskInstance)) { logger.warn("task was found n ready submt queue, task code:{}", taskInstance.getTaskCode()); return;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
} logger.nfo("add task to stand by lst, task name:{}, task d:{}, task code:{}", taskInstance.getName(), taskInstance.getId(), taskInstance.getTaskCode()); readyToSubmtTaskQueue.put(taskInstance); } catch (Excepton e) { logger.error("add task nstance to readyToSubmtTaskQueue, taskName:{}, task d:{}", taskInstance.getName(), taskInstance.getId(), e); } } /** * remove task from stand by lst * * @param taskInstance task nstance */ prvate vod removeTaskFromStandbyLst(TaskInstance taskInstance) { logger.nfo("remove task from stand by lst, d: {} name:{}", taskInstance.getId(), taskInstance.getName()); try { readyToSubmtTaskQueue.remove(taskInstance); } catch (Excepton e) { logger.error("remove task nstance from readyToSubmtTaskQueue error, task d:{}, Name: {}", taskInstance.getId(), taskInstance.getName(), e); } } /** * has retry task n standby * * @return Boolean whether has retry task n standby */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
prvate boolean hasRetryTaskInStandBy() { for (Iterator<TaskInstance> ter = readyToSubmtTaskQueue.terator(); ter.hasNext(); ) { f (ter.next().getState().typeIsFalure()) { return true; } } return false; } /** * close the on gong tasks */ prvate vod kllAllTasks() { logger.nfo("kll called on process nstance d: {}, num: {}", processInstance.getId(), actveTaskProcessorMaps.sze()); f (readyToSubmtTaskQueue.sze() > 0) { readyToSubmtTaskQueue.clear(); } for (long taskCode : actveTaskProcessorMaps.keySet()) { ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskCode); Integer taskInstanceId = valdTaskMap.get(taskCode); f (taskInstanceId == null || taskInstanceId.equals(0)) { contnue; } TaskInstance taskInstance = processServce.fndTaskInstanceById(taskInstanceId); f (taskInstance == null || taskInstance.getState().typeIsFnshed()) { contnue; } taskProcessor.acton(TaskActon.STOP); f (taskProcessor.taskInstance().getState().typeIsFnshed()) { StateEvent stateEvent = new StateEvent();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
stateEvent.setType(StateEventType.TASK_STATE_CHANGE); stateEvent.setProcessInstanceId(ths.processInstance.getId()); stateEvent.setTaskInstanceId(taskInstance.getId()); stateEvent.setExecutonStatus(taskProcessor.taskInstance().getState()); ths.addStateEvent(stateEvent); } } } publc boolean workFlowFnsh() { return ths.processInstance.getState().typeIsFnshed(); } /** * handlng the lst of tasks to be submtted */ prvate vod submtStandByTask() { try { nt length = readyToSubmtTaskQueue.sze(); for (nt = 0; < length; ++) { TaskInstance task = readyToSubmtTaskQueue.peek(); f (task == null) { contnue; } // stop ta f (task.taskCanRetry()) { TaskInstance retryTask = processServce.fndTaskInstanceById(task.getId()); f (retryTask != null && retryTask.getState().equals(ExecutonStatus.FORCED_SUCCESS)) { task.setState(retryTask.getState()); logger.nfo("task: {} has been forced success, put t nto complete task lst and stop retryng", task.getName()); removeTaskFromStandbyLst(task); completeTaskMap.put(task.getTaskCode(), task.getId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
taskInstanceMap.put(task.getId(), task); submtPostNode(Long.toStrng(task.getTaskCode())); contnue; } } //nt var f (task.sFrstRun()) { //get pre Set<Strng> preTask = dag.getPrevousNodes(Long.toStrng(task.getTaskCode())); getPreVarPool(task, preTask); } DependResult dependResult = getDependResultForTask(task); f (DependResult.SUCCESS == dependResult) { TaskInstance taskInstance = submtTaskExec(task); f (taskInstance == null) { ths.taskFaledSubmt = true; // Remove removeTaskFromStandbyLst(task); completeTaskMap.put(task.getTaskCode(), task.getId()); errorTaskMap.put(task.getTaskCode(), task.getId()); logger.error("process {}, task {}, code:{} submt task faled.", task.getProcessInstanceId(), task.getName(), task.getTaskCode()); } else { removeTaskFromStandbyLst(task); } } else f (DependResult.FAILED == dependResult) { // f the dependFaledTaskMap.put(task.getTaskCode(), task.getId()); removeTaskFromStandbyLst(task); logger.nfo("task {},d:{} depend result : {}", task.getName(), task.getId(), dependResult); } else f (DependResult.NON_EXEC == dependResult) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
// for som removeTaskFromStandbyLst(task); logger.nfo("remove task {},d:{} , because depend result : {}", task.getName(), task.getId(), dependResult); } } } catch (Excepton e) { logger.error("submt standby task error", e); } } /** * get recovery task nstance lst * * @param taskIdArray task d array * @return recovery task nstance lst */ prvate Lst<TaskInstance> getRecoverTaskInstanceLst(Strng[] taskIdArray) { f (taskIdArray == null || taskIdArray.length == 0) { return new ArrayLst<>(); } Lst<Integer> taskIdLst = new ArrayLst<>(taskIdArray.length); for (Strng taskId : taskIdArray) { try { Integer d = Integer.valueOf(taskId); taskIdLst.add(d); } catch (Excepton e) { logger.error("get recovery task nstance faled ", e); } } return processServce.fndTaskInstanceByIdLst(taskIdLst); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
/** * get start task nstance lst * * @param cmdParam command param * @return task nstance lst */ prvate Lst<TaskInstance> getStartTaskInstanceLst(Strng cmdParam) { Lst<TaskInstance> nstanceLst = new ArrayLst<>(); Map<Strng, Strng> paramMap = JSONUtls.toMap(cmdParam); f (paramMap != null && paramMap.contansKey(CMD_PARAM_RECOVERY_START_NODE_STRING)) { Strng[] dLst = paramMap.get(CMD_PARAM_RECOVERY_START_NODE_STRING).splt(Constants.COMMA); nstanceLst = getRecoverTaskInstanceLst(dLst); } return nstanceLst; } /** * parse "StartNodeNameLst" from cmd param * * @param cmdParam command param * @return start node name lst */ prvate Lst<Strng> parseStartNodeName(Strng cmdParam) { Lst<Strng> startNodeNameLst = new ArrayLst<>(); Map<Strng, Strng> paramMap = JSONUtls.toMap(cmdParam); f (paramMap == null) { return startNodeNameLst; } f (paramMap.contansKey(CMD_PARAM_START_NODES)) { startNodeNameLst = Arrays.asLst(paramMap.get(CMD_PARAM_START_NODES).splt(Constants.COMMA)); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
return startNodeNameLst; } /** * generate start node code lst from parsng command param; * f "StartNodeIdLst" exsts n command param, return StartNodeIdLst * * @return recovery node code lst */ prvate Lst<Strng> getRecoveryNodeCodeLst(Lst<TaskInstance> recoverNodeLst) { Lst<Strng> recoveryNodeCodeLst = new ArrayLst<>(); f (CollectonUtls.sNotEmpty(recoverNodeLst)) { for (TaskInstance task : recoverNodeLst) { recoveryNodeCodeLst.add(Long.toStrng(task.getTaskCode())); } } return recoveryNodeCodeLst; } /** * generate flow dag * * @param totalTaskNodeLst total task node lst * @param startNodeNameLst start node name lst * @param recoveryNodeCodeLst recovery node code lst * @param depNodeType depend node type * @return ProcessDag process dag * @throws Excepton excepton */ publc ProcessDag generateFlowDag(Lst<TaskNode> totalTaskNodeLst, Lst<Strng> startNodeNameLst, Lst<Strng> recoveryNodeCodeLst,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
TaskDependType depNodeType) throws Excepton { return DagHelper.generateFlowDag(totalTaskNodeLst, startNodeNameLst, recoveryNodeCodeLst, depNodeType); } /** * check task queue */ prvate boolean checkTaskQueue() { AtomcBoolean result = new AtomcBoolean(false); taskInstanceMap.forEach((d, taskInstance) -> { f (taskInstance != null && taskInstance.getTaskGroupId() > 0) { result.set(true); } }); return result.get(); } /** * s new process nstance */ prvate boolean sNewProcessInstance() { f (ExecutonStatus.RUNNING_EXECUTION == processInstance.getState() && processInstance.getRunTmes() == 1) { return true; } else { return false; } } prvate vod setGlobalParamIfCommanded(ProcessDefnton processDefnton, Map<Strng, Strng> cmdParam) { // get start params from command param Map<Strng, Strng> startParamMap = new HashMap<>(); f (cmdParam.contansKey(Constants.CMD_PARAM_START_PARAMS)) { Strng startParamJson = cmdParam.get(Constants.CMD_PARAM_START_PARAMS);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,975
[Bug-BE] The selected task instance was recreated when the Master service failed over
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The selected task instance was recreated when the Master service failed over ### What you expected to happen No new instances should be created. ### How to reproduce Stop the Master service during workflow execution, and then start the Master again. ### Anything else No Response. ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9975
https://github.com/apache/dolphinscheduler/pull/9976
00f102959b5a07f56cb2d6f8973949cc4eee22b0
dbdbfeaeee4b6aaaa738ef642a908f700f0cb9bc
2022-05-10T18:52:26Z
java
2022-05-12T08:31:53Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java
startParamMap = JSONUtls.toMap(startParamJson); } Map<Strng, Strng> fatherParamMap = new HashMap<>(); f (cmdParam.contansKey(Constants.CMD_PARAM_FATHER_PARAMS)) { Strng fatherParamJson = cmdParam.get(Constants.CMD_PARAM_FATHER_PARAMS); fatherParamMap = JSONUtls.toMap(fatherParamJson); } startParamMap.putAll(fatherParamMap); // set start param nto global params Map<Strng, Strng> globalMap = processDefnton.getGlobalParamMap(); Lst<Property> globalParamLst = processDefnton.getGlobalParamLst(); f (startParamMap.sze() > 0 && globalMap != null) { //start pa for (Map.Entry<Strng, Strng> param : globalMap.entrySet()) { Strng val = startParamMap.get(param.getKey()); f (val != null) { param.setValue(val); } } //start pa for (Map.Entry<Strng, Strng> startParam : startParamMap.entrySet()) { f (!globalMap.contansKey(startParam.getKey())) { globalMap.put(startParam.getKey(), startParam.getValue()); globalParamLst.add(new Property(startParam.getKey(), IN, VARCHAR, startParam.getValue())); } } } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.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.plugin.task.sql; import org.apache.dolphinscheduler.plugin.datasource.api.plugin.DataSourceClientProvider; import org.apache.dolphinscheduler.plugin.datasource.api.utils.CommonUtils; import org.apache.dolphinscheduler.plugin.datasource.api.utils.DataSourceUtils; import org.apache.dolphinscheduler.plugin.task.api.AbstractTaskExecutor; import org.apache.dolphinscheduler.plugin.task.api.SQLTaskExecutionContext; import org.apache.dolphinscheduler.plugin.task.api.TaskConstants; import org.apache.dolphinscheduler.plugin.task.api.TaskException; import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext; import org.apache.dolphinscheduler.plugin.task.api.enums.Direct; import org.apache.dolphinscheduler.plugin.task.api.enums.SqlType; import org.apache.dolphinscheduler.plugin.task.api.enums.TaskTimeoutStrategy; import org.apache.dolphinscheduler.plugin.task.api.model.Property;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
import org.apache.dolphinscheduler.plugin.task.api.model.TaskAlertInfo; import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters; import org.apache.dolphinscheduler.plugin.task.api.parameters.SqlParameters; import org.apache.dolphinscheduler.plugin.task.api.parameters.resource.UdfFuncParameters; import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils; import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils; import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; import org.apache.dolphinscheduler.spi.enums.DbType; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; import org.apache.commons.collections.CollectionUtils; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; import org.slf4j.Logger; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; public class SqlTask extends AbstractTaskExecutor {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
/** * taskExecutionContext */ private TaskExecutionContext taskExecutionContext; /** * sql parameters */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
private SqlParameters sqlParameters; /** * base datasource */ private BaseConnectionParam baseConnectionParam; /** * create function format */ private static final String CREATE_FUNCTION_FORMAT = "create temporary function {0} as ''{1}''"; /** * default query sql limit */ private static final int QUERY_LIMIT = 10000; private SQLTaskExecutionContext sqlTaskExecutionContext; /** * Abstract Yarn Task * * @param taskRequest taskRequest */ public SqlTask(TaskExecutionContext taskRequest) { super(taskRequest); this.taskExecutionContext = taskRequest; this.sqlParameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), SqlParameters.class); assert sqlParameters != null; if (!sqlParameters.checkParameters()) { throw new RuntimeException("sql task params is not valid"); } sqlTaskExecutionContext = sqlParameters.generateExtendedContext(taskExecutionContext.getResourceParametersHelper()); } @Override
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
public AbstractParameters getParameters() { return sqlParameters; } @Override public void handle() throws Exception { logger.info("Full sql parameters: {}", sqlParameters); logger.info("sql type : {}, datasource : {}, sql : {} , localParams : {},udfs : {},showType : {},connParams : {},varPool : {} ,query max result limit {}", sqlParameters.getType(), sqlParameters.getDatasource(), sqlParameters.getSql(), sqlParameters.getLocalParams(), sqlParameters.getUdfs(), sqlParameters.getShowType(), sqlParameters.getConnParams(), sqlParameters.getVarPool(), sqlParameters.getLimit()); try { baseConnectionParam = (BaseConnectionParam) DataSourceUtils.buildConnectionParams( DbType.valueOf(sqlParameters.getType()), sqlTaskExecutionContext.getConnectionParams()); List<SqlBinds> mainStatementSqlBinds = SqlSplitter.split(sqlParameters.getSql(), sqlParameters.getSegmentSeparator()) .stream() .map(this::getSqlAndSqlParamsMap) .collect(Collectors.toList()); List<SqlBinds> preStatementSqlBinds = Optional.ofNullable(sqlParameters.getPreStatements()) .orElse(new ArrayList<>()) .stream() .map(this::getSqlAndSqlParamsMap)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
.collect(Collectors.toList()); List<SqlBinds> postStatementSqlBinds = Optional.ofNullable(sqlParameters.getPostStatements()) .orElse(new ArrayList<>()) .stream() .map(this::getSqlAndSqlParamsMap) .collect(Collectors.toList()); List<String> createFuncs = createFuncs(sqlTaskExecutionContext.getUdfFuncParametersList(), logger); executeFuncAndSql(mainStatementSqlBinds, preStatementSqlBinds, postStatementSqlBinds, createFuncs); setExitStatusCode(TaskConstants.EXIT_CODE_SUCCESS); } catch (Exception e) { setExitStatusCode(TaskConstants.EXIT_CODE_FAILURE); logger.error("sql task error: {}", e.toString()); throw e; } } /** * execute function and sql * * @param mainStatementsBinds main statements binds * @param preStatementsBinds pre statements binds * @param postStatementsBinds post statements binds * @param createFuncs create functions */ public void executeFuncAndSql(List<SqlBinds> mainStatementsBinds, List<SqlBinds> preStatementsBinds, List<SqlBinds> postStatementsBinds, List<String> createFuncs) throws Exception { Connection connection = null; ResultSet resultSet = null;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
try { connection = DataSourceClientProvider.getInstance().getConnection(DbType.valueOf(sqlParameters.getType()), baseConnectionParam); if (CollectionUtils.isNotEmpty(createFuncs)) { createTempFunction(connection, createFuncs); } executeUpdate(connection, preStatementsBinds, "pre"); String result = null; if (sqlParameters.getSqlType() == SqlType.QUERY.ordinal()) { resultSet = executeQuery(connection, mainStatementsBinds.get(0), "main"); result = resultProcess(resultSet); } else if (sqlParameters.getSqlType() == SqlType.NON_QUERY.ordinal()) { String updateResult = executeUpdate(connection, mainStatementsBinds, "main"); result = setNonQuerySqlReturn(updateResult, sqlParameters.getLocalParams()); } sqlParameters.dealOutParam(result); executeUpdate(connection, postStatementsBinds, "post"); } catch (Exception e) { logger.error("execute sql error: {}", e.getMessage()); throw e; } finally { close(resultSet, connection);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
} } private String setNonQuerySqlReturn(String updateResult, List<Property> properties) { String result = null; for (Property info : properties) { if (Direct.OUT == info.getDirect()) { List<Map<String, String>> updateRL = new ArrayList<>(); Map<String, String> updateRM = new HashMap<>(); updateRM.put(info.getProp(), updateResult); updateRL.add(updateRM); result = JSONUtils.toJsonString(updateRL); break; } } return result; } /** * result process * * @param resultSet resultSet * @throws Exception Exception */ private String resultProcess(ResultSet resultSet) throws Exception { ArrayNode resultJSONArray = JSONUtils.createArrayNode(); if (resultSet != null) { ResultSetMetaData md = resultSet.getMetaData(); int num = md.getColumnCount(); int rowCount = 0; int limit = sqlParameters.getLimit() == 0 ? QUERY_LIMIT : sqlParameters.getLimit(); while (resultSet.next()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
if (rowCount == limit) { logger.info("sql result limit : {} exceeding results are filtered", limit); break; } ObjectNode mapOfColValues = JSONUtils.createObjectNode(); for (int i = 1; i <= num; i++) { mapOfColValues.set(md.getColumnLabel(i), JSONUtils.toJsonNode(resultSet.getObject(i))); } resultJSONArray.add(mapOfColValues); rowCount++; } int displayRows = sqlParameters.getDisplayRows() > 0 ? sqlParameters.getDisplayRows() : TaskConstants.DEFAULT_DISPLAY_ROWS; displayRows = Math.min(displayRows, rowCount); logger.info("display sql result {} rows as follows:", displayRows); for (int i = 0; i < displayRows; i++) { String row = JSONUtils.toJsonString(resultJSONArray.get(i)); logger.info("row {} : {}", i + 1, row); } } String result = JSONUtils.toJsonString(resultJSONArray); if (sqlParameters.getSendEmail() == null || sqlParameters.getSendEmail()) { sendAttachment(sqlParameters.getGroupId(), StringUtils.isNotEmpty(sqlParameters.getTitle()) ? sqlParameters.getTitle() : taskExecutionContext.getTaskName() + " query result sets", result); } logger.debug("execute sql result : {}", result); return result; } /** * send alert as an attachment
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
* * @param title title * @param content content */ private void sendAttachment(int groupId, String title, String content) { setNeedAlert(Boolean.TRUE); TaskAlertInfo taskAlertInfo = new TaskAlertInfo(); taskAlertInfo.setAlertGroupId(groupId); taskAlertInfo.setContent(content); taskAlertInfo.setTitle(title); setTaskAlertInfo(taskAlertInfo); } private ResultSet executeQuery(Connection connection, SqlBinds sqlBinds, String handlerType) throws Exception { try (PreparedStatement statement = prepareStatementAndBind(connection, sqlBinds)) { logger.info("{} statement execute query, for sql: {}", handlerType, sqlBinds.getSql()); return statement.executeQuery(); } } private String executeUpdate(Connection connection, List<SqlBinds> statementsBinds, String handlerType) throws Exception { int result = 0; for (SqlBinds sqlBind : statementsBinds) { try (PreparedStatement statement = prepareStatementAndBind(connection, sqlBind)) { result = statement.executeUpdate(); logger.info("{} statement execute update result: {}, for sql: {}", handlerType, result, sqlBind.getSql()); } } return String.valueOf(result); } /** * create temp function
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
* * @param connection connection * @param createFuncs createFuncs */ private void createTempFunction(Connection connection, List<String> createFuncs) throws Exception { try (Statement funcStmt = connection.createStatement()) { for (String createFunc : createFuncs) { logger.info("hive create function sql: {}", createFunc); funcStmt.execute(createFunc); } } } /** * close jdbc resource * * @param resultSet resultSet * @param connection connection */ private void close(ResultSet resultSet, Connection connection) { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { logger.error("close result set error : {}", e.getMessage(), e); } } if (connection != null) { try { connection.close();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
} catch (SQLException e) { logger.error("close connection error : {}", e.getMessage(), e); } } } /** * preparedStatement bind * * @param connection connection * @param sqlBinds sqlBinds * @return PreparedStatement * @throws Exception Exception */ private PreparedStatement prepareStatementAndBind(Connection connection, SqlBinds sqlBinds) { boolean timeoutFlag = taskExecutionContext.getTaskTimeoutStrategy() == TaskTimeoutStrategy.FAILED || taskExecutionContext.getTaskTimeoutStrategy() == TaskTimeoutStrategy.WARNFAILED; try { PreparedStatement stmt = connection.prepareStatement(sqlBinds.getSql()); if (timeoutFlag) { stmt.setQueryTimeout(taskExecutionContext.getTaskTimeout()); } Map<Integer, Property> params = sqlBinds.getParamsMap(); if (params != null) { for (Map.Entry<Integer, Property> entry : params.entrySet()) { Property prop = entry.getValue(); ParameterUtils.setInParameter(entry.getKey(), stmt, prop.getType(), prop.getValue()); } } logger.info("prepare statement replace sql : {} ", stmt);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
return stmt; } catch (Exception exception) { throw new TaskException("SQL task prepareStatementAndBind error", exception); } } /** * print replace sql * * @param content content * @param formatSql format sql * @param rgex rgex * @param sqlParamsMap sql params map */ private void printReplacedSql(String content, String formatSql, String rgex, Map<Integer, Property> sqlParamsMap) { logger.info("after replace sql , preparing : {}", formatSql); StringBuilder logPrint = new StringBuilder("replaced sql , parameters:"); if (sqlParamsMap == null) { logger.info("printReplacedSql: sqlParamsMap is null."); } else { for (int i = 1; i <= sqlParamsMap.size(); i++) { logPrint.append(sqlParamsMap.get(i).getValue()).append("(").append(sqlParamsMap.get(i).getType()).append(")"); } } logger.info("Sql Params are {}", logPrint); } /** * ready to execute SQL and parameter entity Map * * @return SqlBinds
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
*/ private SqlBinds getSqlAndSqlParamsMap(String sql) { Map<Integer, Property> sqlParamsMap = new HashMap<>(); StringBuilder sqlBuilder = new StringBuilder(); Map<String, Property> paramsMap = ParamUtils.convert(taskExecutionContext, getParameters()); if (paramsMap == null) { sqlBuilder.append(sql); return new SqlBinds(sqlBuilder.toString(), sqlParamsMap); } if (StringUtils.isNotEmpty(sqlParameters.getTitle())) { String title = ParameterUtils.convertParameterPlaceholders(sqlParameters.getTitle(), ParamUtils.convert(paramsMap)); logger.info("SQL title : {}", title); sqlParameters.setTitle(title); } sql = ParameterUtils.replaceScheduleTime(sql, taskExecutionContext.getScheduleTime()); setSqlParamsMap(sql, rgex, sqlParamsMap, paramsMap,taskExecutionContext.getTaskInstanceId()); String rgexo = "['\"]*\\!\\{(.*?)\\}['\"]*"; sql = replaceOriginalValue(sql, rgexo, paramsMap); // r String formatSql = sql.replaceAll(rgex, "?"); sqlBuilder.append(formatSql); // p printReplacedSql(sql, formatSql, rgex, sqlParamsMap);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
return new SqlBinds(sqlBuilder.toString(), sqlParamsMap); } private String replaceOriginalValue(String content, String rgex, Map<String, Property> sqlParamsMap) { Pattern pattern = Pattern.compile(rgex); while (true) { Matcher m = pattern.matcher(content); if (!m.find()) { break; } String paramName = m.group(1); String paramValue = sqlParamsMap.get(paramName).getValue(); content = m.replaceFirst(paramValue); } return content; } /** * create function list * * @param udfFuncParameters udfFuncParameters * @param logger logger * @return */ private List<String> createFuncs(List<UdfFuncParameters> udfFuncParameters, Logger logger) { if (CollectionUtils.isEmpty(udfFuncParameters)) { logger.info("can't find udf function resource"); return null; } // b List<String> funcList = buildJarSql(udfFuncParameters); // b
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
9,991
[Bug-BE] [sql component] sql component failed to run
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened sql component failed to run <img width="1917" alt="image" src="https://user-images.githubusercontent.com/76080484/167818413-a43c4a22-7758-43de-97bd-50d013ed5bc9.png"> ### What you expected to happen sql component runs successfully ### How to reproduce [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[213] - execute sql error: Operation not allowed after ResultSet closed [ERROR] 2022-05-11 09:31:17.553 +0000 [taskAppId=TASK-20220511-5469970732736_2-22-42] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.sql.SqlTask:[164] - sql task error: java.sql.SQLException: Operation not allowed after ResultSet closed ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/9991
https://github.com/apache/dolphinscheduler/pull/10014
baf654cb47d60a753dd6372698ebb9230fca4859
df04c4aef0956acf3ee948c418d9c546cbc8771c
2022-05-11T09:35:44Z
java
2022-05-15T02:24:31Z
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java
List<String> tempFuncList = buildTempFuncSql(udfFuncParameters); funcList.addAll(tempFuncList); return funcList; } /** * b * @param udfFuncParameters udfFuncParameters * @return */ private List<String> buildTempFuncSql(List<UdfFuncParameters> udfFuncParameters) { return udfFuncParameters.stream().map(value -> MessageFormat .format(CREATE_FUNCTION_FORMAT, value.getFuncName(), value.getClassName())).collect(Collectors.toList()); } /** * b * @param udfFuncParameters udfFuncParameters * @return */ private List<String> buildJarSql(List<UdfFuncParameters> udfFuncParameters) { return udfFuncParameters.stream().map(value -> { String defaultFS = value.getDefaultFS(); String prefixPath = defaultFS.startsWith("file://") ? "file://" : defaultFS; String uploadPath = CommonUtils.getHdfsUdfDir(value.getTenantCode()); String resourceFullName = value.getResourceName(); resourceFullName = resourceFullName.startsWith("/") ? resourceFullName : String.format("/%s", resourceFullName); return String.format("add jar %s%s%s", prefixPath, uploadPath, resourceFullName); }).collect(Collectors.toList()); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkConstants.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.plugin.task.flink; public class FlinkConstants {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkConstants.java
private FlinkConstants() { throw new IllegalStateException("Utility class"); } /** * flink command * usage: flink run [OPTIONS] <jar-file> <arguments> */ public static final String FLINK_COMMAND = "flink"; public static final String FLINK_RUN = "run"; /** * flink sql command * usage: sql-client.sh -i <initialization file>, -f <script file> */ public static final String FLINK_SQL_COMMAND = "sql-client.sh"; /** * flink run options
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkConstants.java
*/ public static final String FLINK_YARN_CLUSTER = "yarn-cluster"; public static final String FLINK_RUN_MODE = "-m"; public static final String FLINK_YARN_SLOT = "-ys"; public static final String FLINK_APP_NAME = "-ynm"; public static final String FLINK_QUEUE = "-yqu"; public static final String FLINK_TASK_MANAGE = "-yn"; public static final String FLINK_JOB_MANAGE_MEM = "-yjm"; public static final String FLINK_TASK_MANAGE_MEM = "-ytm"; public static final String FLINK_MAIN_CLASS = "-c"; public static final String FLINK_PARALLELISM = "-p"; public static final String FLINK_SHUTDOWN_ON_ATTACHED_EXIT = "-sae"; public static final String FLINK_FORMAT_EXECUTION_TARGET = "set execution.target=%s"; public static final String FLINK_FORMAT_YARN_APPLICATION_NAME = "set yarn.application.name=%s"; public static final String FLINK_FORMAT_YARN_APPLICATION_QUEUE = "set yarn.application.queue=%s"; public static final String FLINK_FORMAT_JOBMANAGER_MEMORY_PROCESS_SIZE = "set jobmanager.memory.process.size=%s"; public static final String FLINK_FORMAT_TASKMANAGER_MEMORY_PROCESS_SIZE = "set taskmanager.memory.process.size=%s"; public static final String FLINK_FORMAT_TASKMANAGER_NUMBEROFTASKSLOTS = "set taskmanager.numberOfTaskSlots=%d"; public static final String FLINK_FORMAT_PARALLELISM_DEFAULT = "set parallelism.default=%d"; public static final String FLINK_SQL_SCRIPT_FILE = "-f"; public static final String FLINK_SQL_INIT_FILE = "-i"; public static final String FLINK_SQL_NEWLINE = ";\n"; public static final String EXECUTION_TARGET_YARN_PER_JOB = "yarn-per-job"; public static final String EXECUTION_TARGET_LOACL = "local"; public static final String DEPLOY_MODE_CLUSTER = "cluster"; public static final String DEPLOY_MODE_LOCAL = "local"; public static final String FLINK_VERSION_BEFORE_1_10 = "<1.10"; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.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
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
* limitations under the License. */ package org.apache.dolphinscheduler.plugin.task.flink; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.RWXR_XR_X; import org.apache.dolphinscheduler.plugin.task.api.AbstractYarnTask; import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext; import org.apache.dolphinscheduler.plugin.task.api.model.Property; import org.apache.dolphinscheduler.plugin.task.api.model.ResourceInfo; import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters; import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils; import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils; import org.apache.dolphinscheduler.plugin.task.api.utils.ArgsUtils; import org.apache.dolphinscheduler.plugin.task.api.utils.MapUtils; import org.apache.dolphinscheduler.plugin.task.api.utils.OSUtils; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.spi.utils.StringUtils; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardOpenOption; import java.nio.file.attribute.FileAttribute; import java.nio.file.attribute.PosixFilePermission; import java.nio.file.attribute.PosixFilePermissions; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; public class FlinkTask extends AbstractYarnTask {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
/** * flink parameters */ private FlinkParameters flinkParameters; /** * taskExecutionContext */ private TaskExecutionContext taskExecutionContext; public FlinkTask(TaskExecutionContext taskExecutionContext) { super(taskExecutionContext); this.taskExecutionContext = taskExecutionContext; } @Override public void init() { logger.info("flink task params {}", taskExecutionContext.getTaskParams()); flinkParameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), FlinkParameters.class); if (flinkParameters == null || !flinkParameters.checkParameters()) { throw new RuntimeException("flink task params is not valid"); } flinkParameters.setQueue(taskExecutionContext.getQueue()); if (ProgramType.SQL != flinkParameters.getProgramType()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
setMainJarName(); } } /** * create command * * @return command */ @Override protected String buildCommand() { List<String> args = new ArrayList<>(); if (ProgramType.SQL != flinkParameters.getProgramType()) { args.add(FlinkConstants.FLINK_COMMAND); args.add(FlinkConstants.FLINK_RUN); args.addAll(populateFlinkOptions()); } else { args.add(FlinkConstants.FLINK_SQL_COMMAND); args.addAll(populateFlinkSqlOptions()); } String command = ParameterUtils.convertParameterPlaceholders(String.join(" ", args), taskExecutionContext.getDefinedParams()); logger.info("flink task command : {}", command); return command; } /** * build flink options * * @return argument list */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
private List<String> populateFlinkOptions() { List<String> args = new ArrayList<>(); String deployMode = StringUtils.isNotEmpty(flinkParameters.getDeployMode()) ? flinkParameters.getDeployMode() : FlinkConstants.DEPLOY_MODE_CLUSTER; if (!FlinkConstants.DEPLOY_MODE_LOCAL.equals(deployMode)) { populateFlinkOnYarnOptions(args); } int parallelism = flinkParameters.getParallelism(); if (parallelism > 0) { args.add(FlinkConstants.FLINK_PARALLELISM); args.add(String.format("%d", parallelism)); } /** * -sae * * If the job is submitted in attached mode, perform a best-effort cluster shutdown when the CLI is terminated abruptly. * The task status will be synchronized with the cluster job status. */ args.add(FlinkConstants.FLINK_SHUTDOWN_ON_ATTACHED_EXIT); String others = flinkParameters.getOthers(); if (StringUtils.isNotEmpty(others)) { args.add(others); } ProgramType programType = flinkParameters.getProgramType(); String mainClass = flinkParameters.getMainClass(); if (programType != ProgramType.PYTHON && StringUtils.isNotEmpty(mainClass)) { args.add(FlinkConstants.FLINK_MAIN_CLASS); args.add(flinkParameters.getMainClass());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
} ResourceInfo mainJar = flinkParameters.getMainJar(); if (mainJar != null) { args.add(mainJar.getRes()); } String mainArgs = flinkParameters.getMainArgs(); if (StringUtils.isNotEmpty(mainArgs)) { Map<String, Property> paramsMap = ParamUtils.convert(taskExecutionContext, getParameters()); if (MapUtils.isEmpty(paramsMap)) { paramsMap = new HashMap<>(); } if (MapUtils.isNotEmpty(taskExecutionContext.getParamsMap())) { paramsMap.putAll(taskExecutionContext.getParamsMap()); } args.add(ParameterUtils.convertParameterPlaceholders(mainArgs, ParamUtils.convert(paramsMap))); } return args; } private void populateFlinkOnYarnOptions(List<String> args) { args.add(FlinkConstants.FLINK_RUN_MODE); args.add(FlinkConstants.FLINK_YARN_CLUSTER); int slot = flinkParameters.getSlot(); if (slot > 0) { args.add(FlinkConstants.FLINK_YARN_SLOT); args.add(String.format("%d", slot)); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
String appName = flinkParameters.getAppName(); if (StringUtils.isNotEmpty(appName)) { args.add(FlinkConstants.FLINK_APP_NAME); args.add(ArgsUtils.escape(appName)); } /** * -yn * * Note: judge flink version, the parameter -yn has removed from flink 1.10 */ String flinkVersion = flinkParameters.getFlinkVersion(); if (flinkVersion == null || FlinkConstants.FLINK_VERSION_BEFORE_1_10.equals(flinkVersion)) { int taskManager = flinkParameters.getTaskManager(); if (taskManager > 0) { args.add(FlinkConstants.FLINK_TASK_MANAGE); args.add(String.format("%d", taskManager)); } } String jobManagerMemory = flinkParameters.getJobManagerMemory(); if (StringUtils.isNotEmpty(jobManagerMemory)) { args.add(FlinkConstants.FLINK_JOB_MANAGE_MEM); args.add(jobManagerMemory); } String taskManagerMemory = flinkParameters.getTaskManagerMemory(); if (StringUtils.isNotEmpty(taskManagerMemory)) { args.add(FlinkConstants.FLINK_TASK_MANAGE_MEM); args.add(taskManagerMemory); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
String others = flinkParameters.getOthers(); if (StringUtils.isEmpty(others) || !others.contains(FlinkConstants.FLINK_QUEUE)) { String queue = flinkParameters.getQueue(); if (StringUtils.isNotEmpty(queue)) { args.add(FlinkConstants.FLINK_QUEUE); args.add(queue); } } } /** * build flink sql options * * @return argument list */ private List<String> populateFlinkSqlOptions() { List<String> args = new ArrayList<>(); List<String> defalutOptions = new ArrayList<>(); String deployMode = StringUtils.isNotEmpty(flinkParameters.getDeployMode()) ? flinkParameters.getDeployMode() : FlinkConstants.DEPLOY_MODE_CLUSTER; /** * Currently flink sql on yarn only supports yarn-per-job mode */ if (!FlinkConstants.DEPLOY_MODE_LOCAL.equals(deployMode)) { populateFlinkSqlOnYarnOptions(defalutOptions); } else { defalutOptions.add(String.format(FlinkConstants.FLINK_FORMAT_EXECUTION_TARGET, FlinkConstants.EXECUTION_TARGET_LOACL)); } int parallelism = flinkParameters.getParallelism();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
if (parallelism > 0) { defalutOptions.add(String.format(FlinkConstants.FLINK_FORMAT_PARALLELISM_DEFAULT, parallelism)); } args.add(FlinkConstants.FLINK_SQL_INIT_FILE); args.add(generateInitScriptFile(StringUtils.join(defalutOptions, FlinkConstants.FLINK_SQL_NEWLINE).concat(FlinkConstants.FLINK_SQL_NEWLINE))); args.add(FlinkConstants.FLINK_SQL_SCRIPT_FILE); args.add(generateScriptFile()); String others = flinkParameters.getOthers(); if (StringUtils.isNotEmpty(others)) { args.add(others); } return args; } private void populateFlinkSqlOnYarnOptions(List<String> defalutOptions) { defalutOptions.add(String.format(FlinkConstants.FLINK_FORMAT_EXECUTION_TARGET, FlinkConstants.EXECUTION_TARGET_YARN_PER_JOB)); int slot = flinkParameters.getSlot(); if (slot > 0) { defalutOptions.add(String.format(FlinkConstants.FLINK_FORMAT_TASKMANAGER_NUMBEROFTASKSLOTS, slot)); } String appName = flinkParameters.getAppName(); if (StringUtils.isNotEmpty(appName)) { defalutOptions.add(String.format(FlinkConstants.FLINK_FORMAT_YARN_APPLICATION_NAME, ArgsUtils.escape(appName))); } String jobManagerMemory = flinkParameters.getJobManagerMemory();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
if (StringUtils.isNotEmpty(jobManagerMemory)) { defalutOptions.add(String.format(FlinkConstants.FLINK_FORMAT_JOBMANAGER_MEMORY_PROCESS_SIZE, jobManagerMemory)); } String taskManagerMemory = flinkParameters.getTaskManagerMemory(); if (StringUtils.isNotEmpty(taskManagerMemory)) { defalutOptions.add(String.format(FlinkConstants.FLINK_FORMAT_TASKMANAGER_MEMORY_PROCESS_SIZE, taskManagerMemory)); } String others = flinkParameters.getOthers(); if (StringUtils.isEmpty(others) || !others.contains(FlinkConstants.FLINK_QUEUE)) { String queue = flinkParameters.getQueue(); if (StringUtils.isNotEmpty(queue)) { defalutOptions.add(String.format(FlinkConstants.FLINK_FORMAT_YARN_APPLICATION_QUEUE, queue)); } } } private String generateInitScriptFile(String parameters) { String initScriptFileName = String.format("%s/%s_init.sql", taskExecutionContext.getExecutePath(), taskExecutionContext.getTaskAppId()); File file = new File(initScriptFileName); Path path = file.toPath(); if (!Files.exists(path)) { Set<PosixFilePermission> perms = PosixFilePermissions.fromString(RWXR_XR_X); FileAttribute<Set<PosixFilePermission>> attr = PosixFilePermissions.asFileAttribute(perms); try { if (OSUtils.isWindows()) { Files.createFile(path); } else { if (!file.getParentFile().exists()) { file.getParentFile().mkdirs();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
} Files.createFile(path, attr); } logger.info("common parameters : {}", parameters); Files.write(path, parameters.getBytes(), StandardOpenOption.APPEND); if (StringUtils.isNotEmpty(flinkParameters.getInitScript())) { String script = flinkParameters.getInitScript().replaceAll("\\r\\n", "\n"); flinkParameters.setInitScript(script); logger.info("init script : {}", flinkParameters.getInitScript()); Files.write(path, flinkParameters.getInitScript().getBytes(), StandardOpenOption.APPEND); } } catch (IOException e) { throw new RuntimeException("generate flink sql script error", e); } } return initScriptFileName; } private String generateScriptFile() { String scriptFileName = String.format("%s/%s_node.sql", taskExecutionContext.getExecutePath(), taskExecutionContext.getTaskAppId()); File file = new File(scriptFileName); Path path = file.toPath(); if (!Files.exists(path)) { String script = flinkParameters.getRawScript().replaceAll("\\r\\n", "\n"); flinkParameters.setRawScript(script); logger.info("raw script : {}", flinkParameters.getRawScript()); logger.info("task execute path : {}", taskExecutionContext.getExecutePath()); Set<PosixFilePermission> perms = PosixFilePermissions.fromString(RWXR_XR_X); FileAttribute<Set<PosixFilePermission>> attr = PosixFilePermissions.asFileAttribute(perms);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,039
[Bug][plugin] Flink run command error when submitting Python job
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the program type of the Flink run program is Python, the Flink run command is wrong and cannot be successful ### Steps to reproduce the problem Flink run command missing "-py" when program type is Python. The flink task configuration is as follows: ![ef90c731272b9d3f9c066080e3d1fbf407d35f7f63d3cd6b220278227e05c3b1QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ2ODIyODNfQkJEQTU2ODEtQURDMi00ZDMyLUJBNzItQTBBNzM0MjM5OERFLnBuZw==](https://user-images.githubusercontent.com/94423827/168513765-ca0d425c-0226-475f-a642-a7819e1cc2fc.png) Flink run command error when program type is Python: ![e96c5ab4ea380140aee19967eacb822adfca15c3743e60ccef8fa12624c695fbQzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NzA2ODU2MzlfODI1NjcwN0YtODRDQy00OWY2LUExQUUtMzExQjFDOERFNDk1LnBuZw==](https://user-images.githubusercontent.com/94423827/168513647-6607c244-2421-452a-90ee-f88855781a3d.png) The correct command of flink run runs as follows: ![b58b3af3455089faeb61314d5c2fa80b4507ae646e0ebc4b05b075a4d02f9b65QzpcVXNlcnNcQWRtaW5pc3RyYXRvclxBcHBEYXRhXFJvYW1pbmdcRGluZ1RhbGtcMjQ5MjQ4MDk3Ml92MlxJbWFnZUZpbGVzXDE2NTI2NjQ3MzY0NjBfMTc2NDM1NTEtMkQ1Qy00ZDA4LUFCNEEtMTdFMjFDMEJFOTAyLnBuZw==](https://user-images.githubusercontent.com/94423827/168514024-aff4d14f-8f56-48fc-a517-11985cb5efb8.png) ### Brief Changelog Add logical judgment when Flink programming language is Python to FlinkTask.class. Add command parameters when Flink programming language is Python to FlinkConstants.class ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10039
https://github.com/apache/dolphinscheduler/pull/10042
3e471f8b4c9ea781aed152ea4b9c3913503d5909
d643e1c1cf27d6acfc46deb655e0b5f2f813cb24
2022-05-16T03:19:58Z
java
2022-05-16T07:06:21Z
dolphinscheduler-task-plugin/dolphinscheduler-task-flink/src/main/java/org/apache/dolphinscheduler/plugin/task/flink/FlinkTask.java
try { if (OSUtils.isWindows()) { Files.createFile(path); } else { if (!file.getParentFile().exists()) { file.getParentFile().mkdirs(); } Files.createFile(path, attr); } Files.write(path, flinkParameters.getRawScript().getBytes(), StandardOpenOption.APPEND); } catch (IOException e) { throw new RuntimeException("generate flink sql script error", e); } } return scriptFileName; } @Override protected void setMainJarName() { ResourceInfo mainJar = flinkParameters.getMainJar(); String resourceName = getResourceNameOfMainJar(mainJar); mainJar.setRes(resourceName); flinkParameters.setMainJar(mainJar); } @Override public AbstractParameters getParameters() { return flinkParameters; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,033
[Feature][E2E] Fix flakey e2e test
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description https://github.com/apache/dolphinscheduler/runs/6432527655?check_suite_focus=true ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10033
https://github.com/apache/dolphinscheduler/pull/10068
514d26e03f597f0b4f8a77d00e203b377d29d0a6
718e786c24e919b5532c4132171b3303407abfd7
2022-05-14T14:48:50Z
java
2022-05-17T06:51:43Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.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.e2e.pages.resource; import lombok.Getter; import org.apache.dolphinscheduler.e2e.pages.common.CodeEditor; import org.apache.dolphinscheduler.e2e.pages.common.NavBarPage; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.LocalFileDetector; import org.openqa.selenium.remote.RemoteWebDriver;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,033
[Feature][E2E] Fix flakey e2e test
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description https://github.com/apache/dolphinscheduler/runs/6432527655?check_suite_focus=true ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10033
https://github.com/apache/dolphinscheduler/pull/10068
514d26e03f597f0b4f8a77d00e203b377d29d0a6
718e786c24e919b5532c4132171b3303407abfd7
2022-05-14T14:48:50Z
java
2022-05-17T06:51:43Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.FindBys; import org.openqa.selenium.support.PageFactory; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import java.io.File; import java.util.List; @Getter public class FileManagePage extends NavBarPage implements ResourcePage.Tab { @FindBy(className = "btn-create-directory") private WebElement buttonCreateDirectory; @FindBy(className = "btn-create-file") private WebElement buttonCreateFile; @FindBy(className = "btn-upload-file") private WebElement buttonUploadFile; private final CreateDirectoryBox createDirectoryBox; private final RenameBox renameBox; private final CreateFileBox createFileBox; private final UploadFileBox uploadFileBox; private final EditFileBox editFileBox; @FindBy(className = "items") private List<WebElement> fileList; @FindBys({ @FindBy(className = "n-popconfirm__action"), @FindBy(className = "n-button--primary-type"), }) private WebElement buttonConfirm; public FileManagePage(RemoteWebDriver driver) { super(driver); createDirectoryBox = new CreateDirectoryBox();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,033
[Feature][E2E] Fix flakey e2e test
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description https://github.com/apache/dolphinscheduler/runs/6432527655?check_suite_focus=true ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10033
https://github.com/apache/dolphinscheduler/pull/10068
514d26e03f597f0b4f8a77d00e203b377d29d0a6
718e786c24e919b5532c4132171b3303407abfd7
2022-05-14T14:48:50Z
java
2022-05-17T06:51:43Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
renameBox = new RenameBox(); createFileBox = new CreateFileBox(); uploadFileBox = new UploadFileBox(); editFileBox = new EditFileBox(); } public FileManagePage createDirectory(String name, String description) { buttonCreateDirectory().click(); createDirectoryBox().inputDirectoryName().sendKeys(name); createDirectoryBox().inputDescription().sendKeys(description); createDirectoryBox().buttonSubmit().click(); return this; } public FileManagePage cancelCreateDirectory(String name, String description) { buttonCreateDirectory().click(); createDirectoryBox().inputDirectoryName().sendKeys(name); createDirectoryBox().inputDescription().sendKeys(description); createDirectoryBox().buttonCancel().click(); return this; } public FileManagePage rename(String currentName, String AfterName) { fileList() .stream() .filter(it -> it.getText().contains(currentName)) .flatMap(it -> it.findElements(By.className("btn-rename")).stream()) .filter(WebElement::isDisplayed) .findFirst() .orElseThrow(() -> new RuntimeException("No rename button in file manage list")) .click(); renameBox().inputName().sendKeys(Keys.CONTROL + "a"); renameBox().inputName().sendKeys(Keys.BACK_SPACE);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,033
[Feature][E2E] Fix flakey e2e test
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description https://github.com/apache/dolphinscheduler/runs/6432527655?check_suite_focus=true ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10033
https://github.com/apache/dolphinscheduler/pull/10068
514d26e03f597f0b4f8a77d00e203b377d29d0a6
718e786c24e919b5532c4132171b3303407abfd7
2022-05-14T14:48:50Z
java
2022-05-17T06:51:43Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
renameBox().inputName().sendKeys(AfterName); renameBox().buttonSubmit().click(); return this; } public FileManagePage createSubDirectory(String directoryName, String subDirectoryName, String description) { fileList() .stream() .filter(it -> it.getText().contains(directoryName)) .filter(WebElement::isDisplayed) .findFirst() .orElseThrow(() -> new RuntimeException(String.format("No %s in file manage list", directoryName))) .click(); buttonCreateDirectory().click(); createDirectoryBox().inputDirectoryName().sendKeys(subDirectoryName); createDirectoryBox().inputDescription().sendKeys(description); createDirectoryBox().buttonSubmit().click(); return this; } public FileManagePage delete(String name) { fileList() .stream() .filter(it -> it.getText().contains(name)) .flatMap(it -> it.findElements(By.className("btn-delete")).stream()) .filter(WebElement::isDisplayed) .findFirst() .orElseThrow(() -> new RuntimeException("No delete button in file manage list")) .click(); ((JavascriptExecutor) driver).executeScript("arguments[0].click();", buttonConfirm()); return this; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,033
[Feature][E2E] Fix flakey e2e test
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description https://github.com/apache/dolphinscheduler/runs/6432527655?check_suite_focus=true ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10033
https://github.com/apache/dolphinscheduler/pull/10068
514d26e03f597f0b4f8a77d00e203b377d29d0a6
718e786c24e919b5532c4132171b3303407abfd7
2022-05-14T14:48:50Z
java
2022-05-17T06:51:43Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
public FileManagePage createFile(String fileName, String scripts) { buttonCreateFile().click(); createFileBox().inputFileName().sendKeys(fileName); createFileBox().codeEditor().content(scripts); createFileBox().buttonSubmit().click(); return this; } public FileManagePage editFile(String fileName, String scripts) { fileList() .stream() .filter(it -> it.getText().contains(fileName)) .flatMap(it -> it.findElements(By.className("btn-edit")).stream()) .filter(WebElement::isDisplayed) .findFirst() .orElseThrow(() -> new RuntimeException("No edit button in file manage list")) .click(); new WebDriverWait(driver, 5).until(ExpectedConditions.urlContains("/edit")); editFileBox().codeEditor().content(scripts); editFileBox().buttonSubmit().click(); return this; } public FileManagePage uploadFile(String filePath) { buttonUploadFile().click(); driver.setFileDetector(new LocalFileDetector()); uploadFileBox().buttonUpload().sendKeys(filePath); uploadFileBox().buttonSubmit().click(); return this; } public FileManagePage downloadFile(String fileName) { fileList()
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,033
[Feature][E2E] Fix flakey e2e test
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description https://github.com/apache/dolphinscheduler/runs/6432527655?check_suite_focus=true ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10033
https://github.com/apache/dolphinscheduler/pull/10068
514d26e03f597f0b4f8a77d00e203b377d29d0a6
718e786c24e919b5532c4132171b3303407abfd7
2022-05-14T14:48:50Z
java
2022-05-17T06:51:43Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
.stream() .filter(it -> it.getText().contains(fileName)) .flatMap(it -> it.findElements(By.className("btn-download")).stream()) .filter(WebElement::isDisplayed) .findFirst() .orElseThrow(() -> new RuntimeException("No download button in file manage list")) .click(); return this; } @Getter public class CreateDirectoryBox { CreateDirectoryBox() { PageFactory.initElements(driver, this); } @FindBys({ @FindBy(className = "input-directory-name"), @FindBy(tagName = "input"), }) private WebElement inputDirectoryName; @FindBys({ @FindBy(className = "input-description"), @FindBy(tagName = "textarea"), }) private WebElement inputDescription; @FindBy(className = "btn-submit") private WebElement buttonSubmit; @FindBy(className = "btn-cancel") private WebElement buttonCancel; } @Getter
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,033
[Feature][E2E] Fix flakey e2e test
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description https://github.com/apache/dolphinscheduler/runs/6432527655?check_suite_focus=true ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10033
https://github.com/apache/dolphinscheduler/pull/10068
514d26e03f597f0b4f8a77d00e203b377d29d0a6
718e786c24e919b5532c4132171b3303407abfd7
2022-05-14T14:48:50Z
java
2022-05-17T06:51:43Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
public class RenameBox { RenameBox() { PageFactory.initElements(driver, this); } @FindBys({ @FindBy(className = "input-name"), @FindBy(tagName = "input"), }) private WebElement inputName; @FindBys({ @FindBy(className = "input-description"), @FindBy(tagName = "textarea"), }) private WebElement inputDescription; @FindBy(className = "btn-submit") private WebElement buttonSubmit; @FindBy(className = "btn-cancel") private WebElement buttonCancel; } @Getter
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,033
[Feature][E2E] Fix flakey e2e test
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description https://github.com/apache/dolphinscheduler/runs/6432527655?check_suite_focus=true ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10033
https://github.com/apache/dolphinscheduler/pull/10068
514d26e03f597f0b4f8a77d00e203b377d29d0a6
718e786c24e919b5532c4132171b3303407abfd7
2022-05-14T14:48:50Z
java
2022-05-17T06:51:43Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
public class CreateFileBox { CreateFileBox() { PageFactory.initElements(driver, this); } @FindBys({ @FindBy(className = "input-file-name"), @FindBy(tagName = "input"), }) private WebElement inputFileName; private final CodeEditor codeEditor = new CodeEditor(driver); @FindBy(className = "btn-submit") private WebElement buttonSubmit; @FindBy(className = "btn-cancel") private WebElement buttonCancel; } @Getter
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,033
[Feature][E2E] Fix flakey e2e test
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description https://github.com/apache/dolphinscheduler/runs/6432527655?check_suite_focus=true ### Use case _No response_ ### Related issues _No response_ ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10033
https://github.com/apache/dolphinscheduler/pull/10068
514d26e03f597f0b4f8a77d00e203b377d29d0a6
718e786c24e919b5532c4132171b3303407abfd7
2022-05-14T14:48:50Z
java
2022-05-17T06:51:43Z
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/pages/resource/FileManagePage.java
public class EditFileBox { EditFileBox() { PageFactory.initElements(driver, this); } CodeEditor codeEditor = new CodeEditor(driver); @FindBy(className = "btn-submit") private WebElement buttonSubmit; @FindBy(className = "btn-cancel") private WebElement buttonCancel; } @Getter public class UploadFileBox { UploadFileBox() { PageFactory.initElements(driver, this); } @FindBys({ @FindBy(className = "btn-upload"), @FindBy(tagName = "input"), }) private WebElement buttonUpload; @FindBy(className = "btn-submit") private WebElement buttonSubmit; @FindBy(className = "btn-cancel") private WebElement buttonCancel; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/TaskProcessorFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.runner.task; import static org.apache.dolphinscheduler.common.Constants.COMMON_TASK_TYPE; import org.apache.commons.lang3.StringUtils; import java.util.Map; import java.util.Objects; import java.util.ServiceLoader; import java.util.concurrent.ConcurrentHashMap; /** * the factory to create task processor */ public class TaskProcessorFactory {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/TaskProcessorFactory.java
public static final Map<String, ITaskProcessor> PROCESS_MAP = new ConcurrentHashMap<>(); private static final String DEFAULT_PROCESSOR = COMMON_TASK_TYPE; static { for (ITaskProcessor iTaskProcessor : ServiceLoader.load(ITaskProcessor.class)) { PROCESS_MAP.put(iTaskProcessor.getType(), iTaskProcessor); } } public static ITaskProcessor getTaskProcessor(String type) throws InstantiationException, IllegalAccessException { if (StringUtils.isEmpty(type)) { type = DEFAULT_PROCESSOR; } ITaskProcessor iTaskProcessor = PROCESS_MAP.get(type); if (Objects.isNull(iTaskProcessor)) { iTaskProcessor = PROCESS_MAP.get(DEFAULT_PROCESSOR); } return iTaskProcessor.getClass().newInstance(); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.service; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.NodeType; import org.apache.dolphinscheduler.common.enums.StateEvent; import org.apache.dolphinscheduler.common.enums.StateEventType; import org.apache.dolphinscheduler.common.model.Server; import org.apache.dolphinscheduler.common.utils.NetUtils; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.dolphinscheduler.server.builder.TaskExecutionContextBuilder;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
import org.apache.dolphinscheduler.server.master.config.MasterConfig; import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool; import org.apache.dolphinscheduler.server.utils.ProcessUtils; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.dolphinscheduler.service.registry.RegistryClient; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; /** * failover service */ @Component public class FailoverService { private static final Logger LOGGER = LoggerFactory.getLogger(FailoverService.class); private final RegistryClient registryClient; private final MasterConfig masterConfig; private final ProcessService processService; private final WorkflowExecuteThreadPool workflowExecuteThreadPool; public FailoverService(RegistryClient registryClient, MasterConfig masterConfig, ProcessService processService, WorkflowExecuteThreadPool workflowExecuteThreadPool) { this.registryClient = registryClient; this.masterConfig = masterConfig; this.processService = processService;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
this.workflowExecuteThreadPool = workflowExecuteThreadPool; } /** * check master failover */ public void checkMasterFailover() { List<String> hosts = getNeedFailoverMasterServers(); if (CollectionUtils.isEmpty(hosts)) { return; } LOGGER.info("need failover hosts:{}", hosts); for (String host : hosts) { failoverMasterWithLock(host); } } /** * failover server when server down * * @param serverHost server host * @param nodeType node type */ public void failoverServerWhenDown(String serverHost, NodeType nodeType) { switch (nodeType) { case MASTER: failoverMasterWithLock(serverHost); break; case WORKER: failoverWorker(serverHost); break; default:
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
break; } } private void failoverMasterWithLock(String masterHost) { String failoverPath = getFailoverLockPath(NodeType.MASTER, masterHost); try { registryClient.getLock(failoverPath); this.failoverMaster(masterHost); } catch (Exception e) { LOGGER.error("{} server failover failed, host:{}", NodeType.MASTER, masterHost, e); } finally { registryClient.releaseLock(failoverPath); } } /** * failover master * <p> * failover process instance and associated task instance * * @param masterHost master host */ private void failoverMaster(String masterHost) { if (StringUtils.isEmpty(masterHost)) { return; } Date serverStartupTime = getServerStartupTime(NodeType.MASTER, masterHost); long startTime = System.currentTimeMillis(); List<ProcessInstance> needFailoverProcessInstanceList = processService.queryNeedFailoverProcessInstances(masterHost); LOGGER.info("start master[{}] failover, process list size:{}", masterHost, needFailoverProcessInstanceList.size()); List<Server> workerServers = registryClient.getServerList(NodeType.WORKER);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
for (ProcessInstance processInstance : needFailoverProcessInstanceList) { if (Constants.NULL.equals(processInstance.getHost())) { continue; } List<TaskInstance> validTaskInstanceList = processService.findValidTaskListByProcessId(processInstance.getId()); for (TaskInstance taskInstance : validTaskInstanceList) { LOGGER.info("failover task instance id: {}, process instance id: {}", taskInstance.getId(), taskInstance.getProcessInstanceId()); failoverTaskInstance(processInstance, taskInstance, workerServers); } if (serverStartupTime != null && processInstance.getRestartTime() != null && processInstance.getRestartTime().after(serverStartupTime)) { continue; } LOGGER.info("failover process instance id: {}", processInstance.getId()); processInstance.setHost(Constants.NULL); processService.processNeedFailoverProcessInstances(processInstance); } LOGGER.info("master[{}] failover end, useTime:{}ms", masterHost, System.currentTimeMillis() - startTime); } /** * failover worker tasks * <p> * 1. kill yarn job if there are yarn jobs in tasks. * 2. change task state from running to need failover. * 3. failover all tasks when workerHost is null * * @param workerHost worker host */ private void failoverWorker(String workerHost) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
if (StringUtils.isEmpty(workerHost)) { return; } long startTime = System.currentTimeMillis(); List<TaskInstance> needFailoverTaskInstanceList = processService.queryNeedFailoverTaskInstances(workerHost); Map<Integer, ProcessInstance> processInstanceCacheMap = new HashMap<>(); LOGGER.info("start worker[{}] failover, task list size:{}", workerHost, needFailoverTaskInstanceList.size()); List<Server> workerServers = registryClient.getServerList(NodeType.WORKER); for (TaskInstance taskInstance : needFailoverTaskInstanceList) { ProcessInstance processInstance = processInstanceCacheMap.get(taskInstance.getProcessInstanceId()); if (processInstance == null) { processInstance = processService.findProcessInstanceDetailById(taskInstance.getProcessInstanceId()); if (processInstance == null) { LOGGER.error("failover task instance error, processInstance {} of taskInstance {} is null", taskInstance.getProcessInstanceId(), taskInstance.getId()); continue; } processInstanceCacheMap.put(processInstance.getId(), processInstance); } if (!processInstance.getHost().equalsIgnoreCase(getLocalAddress())) { continue; } LOGGER.info("failover task instance id: {}, process instance id: {}", taskInstance.getId(), taskInstance.getProcessInstanceId()); failoverTaskInstance(processInstance, taskInstance, workerServers); } LOGGER.info("end worker[{}] failover, useTime:{}ms", workerHost, System.currentTimeMillis() - startTime); } /** * failover task instance
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
* <p> * 1. kill yarn job if there are yarn jobs in tasks. * 2. change task state from running to need failover. * 3. try to notify local master */ private void failoverTaskInstance(ProcessInstance processInstance, TaskInstance taskInstance, List<Server> workerServers) { if (processInstance == null) { LOGGER.error("failover task instance error, processInstance {} of taskInstance {} is null", taskInstance.getProcessInstanceId(), taskInstance.getId()); return; } if (!checkTaskInstanceNeedFailover(workerServers, taskInstance)) { return; } taskInstance.setProcessInstance(processInstance); TaskExecutionContext taskExecutionContext = TaskExecutionContextBuilder.get() .buildTaskInstanceRelatedInfo(taskInstance) .buildProcessInstanceRelatedInfo(processInstance) .create(); if (masterConfig.isKillYarnJobWhenTaskFailover()) { ProcessUtils.killYarnJob(taskExecutionContext); } taskInstance.setState(ExecutionStatus.NEED_FAULT_TOLERANCE); processService.saveTaskInstance(taskInstance); StateEvent stateEvent = new StateEvent(); stateEvent.setTaskInstanceId(taskInstance.getId()); stateEvent.setType(StateEventType.TASK_STATE_CHANGE); stateEvent.setProcessInstanceId(processInstance.getId()); stateEvent.setExecutionStatus(taskInstance.getState());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
workflowExecuteThreadPool.submitStateEvent(stateEvent); } /** * get need failover master servers * * @return need failover master servers */ private List<String> getNeedFailoverMasterServers() { List<String> hosts = processService.queryNeedFailoverProcessInstanceHost(); Iterator<String> iterator = hosts.iterator(); while (iterator.hasNext()) { String host = iterator.next(); if (registryClient.checkNodeExists(host, NodeType.MASTER)) { if (!host.equals(getLocalAddress())) { iterator.remove(); } } } return hosts; } /** * task needs failover if task start before worker starts * * @param workerServers worker servers * @param taskInstance task instance * @return true if task instance need fail over */ private boolean checkTaskInstanceNeedFailover(List<Server> workerServers, TaskInstance taskInstance) { boolean taskNeedFailover = true;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
if (taskInstance == null) { LOGGER.error("failover task instance error, taskInstance is null"); return false; } if (Constants.NULL.equals(taskInstance.getHost())) { return false; } if (taskInstance.getState() != null && taskInstance.getState().typeIsFinished()) { return false; } if (taskInstance.getHost() == null) { return false; } if (checkTaskAfterWorkerStart(workerServers, taskInstance)) { taskNeedFailover = false; } return taskNeedFailover; } /** * check task start after the worker server starts. * * @param taskInstance task instance * @return true if task instance start time after worker server start date */ private boolean checkTaskAfterWorkerStart(List<Server> workerServers, TaskInstance taskInstance) { if (StringUtils.isEmpty(taskInstance.getHost())) { return false; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
Date workerServerStartDate = getServerStartupTime(workerServers, taskInstance.getHost()); if (workerServerStartDate != null) { if (taskInstance.getStartTime() == null) { return taskInstance.getSubmitTime().after(workerServerStartDate); } else { return taskInstance.getStartTime().after(workerServerStartDate); } } return false; } /** * get failover lock path * * @param nodeType zookeeper node type * @return fail over lock path */ private String getFailoverLockPath(NodeType nodeType, String host) { switch (nodeType) { case MASTER: return Constants.REGISTRY_DOLPHINSCHEDULER_LOCK_FAILOVER_MASTERS + "/" + host; case WORKER: return Constants.REGISTRY_DOLPHINSCHEDULER_LOCK_FAILOVER_WORKERS + "/" + host; default: return ""; } } /** * get server startup time */ private Date getServerStartupTime(NodeType nodeType, String host) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/service/FailoverService.java
if (StringUtils.isEmpty(host)) { return null; } List<Server> servers = registryClient.getServerList(nodeType); return getServerStartupTime(servers, host); } /** * get server startup time */ private Date getServerStartupTime(List<Server> servers, String host) { if (CollectionUtils.isEmpty(servers)) { return null; } Date serverStartupTime = null; for (Server server : servers) { if (host.equals(server.getHost() + Constants.COLON + server.getPort())) { serverStartupTime = server.getCreateTime(); break; } } return serverStartupTime; } /** * get local address */ String getLocalAddress() { return NetUtils.getAddr(masterConfig.getListenPort()); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/service/FailoverServiceTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.master.service; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.doNothing;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/service/FailoverServiceTest.java
import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.NodeType; import org.apache.dolphinscheduler.common.enums.StateEvent; import org.apache.dolphinscheduler.common.model.Server; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.dolphinscheduler.server.master.config.MasterConfig; import org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteThreadPool; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.dolphinscheduler.service.registry.RegistryClient; import java.util.Arrays; import java.util.Date; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; import org.springframework.test.util.ReflectionTestUtils; import com.google.common.collect.Lists; /** * MasterRegistryClientTest */ @RunWith(PowerMockRunner.class)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/service/FailoverServiceTest.java
@PrepareForTest({RegistryClient.class}) @PowerMockIgnore({"javax.management.*"}) public class FailoverServiceTest { @InjectMocks private FailoverService failoverService; @Mock private MasterConfig masterConfig; @Mock private RegistryClient registryClient; @Mock private ProcessService processService; @Mock private WorkflowExecuteThreadPool workflowExecuteThreadPool; private String testHost; private ProcessInstance processInstance; private TaskInstance taskInstance; @Before public void before() throws Exception { given(masterConfig.getListenPort()).willReturn(8080); testHost = failoverService.getLocalAddress(); String ip = testHost.split(":")[0]; int port = Integer.valueOf(testHost.split(":")[1]); Assert.assertEquals(8080, port); given(registryClient.getLock(Mockito.anyString())).willReturn(true);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/service/FailoverServiceTest.java
given(registryClient.releaseLock(Mockito.anyString())).willReturn(true); given(registryClient.getHostByEventDataPath(Mockito.anyString())).willReturn(testHost); given(registryClient.getStoppable()).willReturn(cause -> { }); given(registryClient.checkNodeExists(Mockito.anyString(), Mockito.any())).willReturn(true); doNothing().when(registryClient).handleDeadServer(Mockito.anySet(), Mockito.any(NodeType.class), Mockito.anyString()); processInstance = new ProcessInstance(); processInstance.setId(1); processInstance.setHost(testHost); processInstance.setRestartTime(new Date()); processInstance.setHistoryCmd("xxx"); processInstance.setCommandType(CommandType.STOP); taskInstance = new TaskInstance(); taskInstance.setId(1); taskInstance.setStartTime(new Date()); taskInstance.setHost(testHost); given(processService.queryNeedFailoverTaskInstances(Mockito.anyString())).willReturn(Arrays.asList(taskInstance)); given(processService.queryNeedFailoverProcessInstanceHost()).willReturn(Lists.newArrayList(testHost)); given(processService.queryNeedFailoverProcessInstances(Mockito.anyString())).willReturn(Arrays.asList(processInstance)); doNothing().when(processService).processNeedFailoverProcessInstances(Mockito.any(ProcessInstance.class)); given(processService.findValidTaskListByProcessId(Mockito.anyInt())).willReturn(Lists.newArrayList(taskInstance)); given(processService.findProcessInstanceDetailById(Mockito.anyInt())).willReturn(processInstance); Thread.sleep(1000); Server server = new Server(); server.setHost(ip); server.setPort(port); server.setCreateTime(new Date()); given(registryClient.getServerList(NodeType.WORKER)).willReturn(Arrays.asList(server)); given(registryClient.getServerList(NodeType.MASTER)).willReturn(Arrays.asList(server)); ReflectionTestUtils.setField(failoverService, "registryClient", registryClient);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,067
[Bug] [Master] master taskInstance will failover when run long time
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened I found that the taskInstance which runs on master will failover when run long time, and the task instance will change to `need fault tolerance` state. ### What you expected to happen taskInstance on master can run normally for long time. ### How to reproduce 1. create a workflow with task a. 2. create a dependent workflow with dependent task b, b depend on a. 3. just run workflow b. ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10067
https://github.com/apache/dolphinscheduler/pull/10065
c16424027e369c8cde2da966f08ded06ba0744df
0cc0ee77faabf1bed495a55ccd7653c03c26a550
2022-05-17T06:21:17Z
java
2022-05-17T08:36:24Z
dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/service/FailoverServiceTest.java
doNothing().when(workflowExecuteThreadPool).submitStateEvent(Mockito.any(StateEvent.class)); } @Test public void checkMasterFailoverTest() { failoverService.checkMasterFailover(); } @Test public void failoverMasterTest() { processInstance.setHost(Constants.NULL); taskInstance.setState(ExecutionStatus.RUNNING_EXECUTION); failoverService.failoverServerWhenDown(testHost, NodeType.MASTER); Assert.assertNotEquals(taskInstance.getState(), ExecutionStatus.NEED_FAULT_TOLERANCE); processInstance.setHost(testHost); taskInstance.setState(ExecutionStatus.SUCCESS); failoverService.failoverServerWhenDown(testHost, NodeType.MASTER); Assert.assertNotEquals(taskInstance.getState(), ExecutionStatus.NEED_FAULT_TOLERANCE); Assert.assertEquals(Constants.NULL, processInstance.getHost()); processInstance.setHost(testHost); taskInstance.setState(ExecutionStatus.RUNNING_EXECUTION); failoverService.failoverServerWhenDown(testHost, NodeType.MASTER); Assert.assertEquals(taskInstance.getState(), ExecutionStatus.NEED_FAULT_TOLERANCE); Assert.assertEquals(Constants.NULL, processInstance.getHost()); } @Test public void failoverWorkTest() { failoverService.failoverServerWhenDown(testHost, NodeType.WORKER); Assert.assertEquals(taskInstance.getState(), ExecutionStatus.NEED_FAULT_TOLERANCE); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
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. */ package org.apache.dolphinscheduler.api.enums; import java.util.Locale; import java.util.Optional; import org.springframework.context.i18n.LocaleContextHolder; /** * status enum // todo #4855 One category one interval */ public enum Status { SUCCESS(0, "success", "成功"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
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", "任务实例不存在"), OS_TENANT_CODE_EXIST(10009, "os tenant code {0} already exists", "操作系统租户[{0}]已存在"), 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_FOUND(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}]不存在"), 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", "删除告警组错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
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_CODE_ERROR(10047, "query project details by code 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", "查询授权项目错误"), 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", "创建资源文件错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
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", "分页查询任务列表错误"), 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_OS_TENANT_CODE_ERROR(10089, "verify os tenant code error", "操作系统租户验证错误"), CREATE_USER_ERROR(10090, "create user error", "创建用户错误"), QUERY_USER_LIST_PAGING_ERROR(10091, "query user list paging error", "分页查询用户列表错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
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_ERROR(10105, "create process definition error", "创建工作流错误"), 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_DETAIL_OF_PROCESS_DEFINITION_ERROR(10109, "query detail 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", "查询工作流定义节点信息错误"), 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", "查询工作流实例甘特图数据错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
QUERY_PROCESS_DEFINITION_LIST_PAGING_ERROR(10122, "query process definition list paging error", "分页查询工作流定义列表错误"), SIGN_OUT_ERROR(10123, "sign out error", "退出错误"), OS_TENANT_CODE_HAS_ALREADY_EXISTS(10124, "os 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", "批量删除工作流实例错误: {0}"), 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}]个运行中的工作流实例正在使用"), 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分组失败"), USER_DISABLED(10148, "The current user is disabled", "当前用户已停用"), COPY_PROCESS_DEFINITION_ERROR(10149, "copy process definition from {0} to {1} error : {2}", "从{0}复制工作流到{1}错误 : {2}"), MOVE_PROCESS_DEFINITION_ERROR(10150, "move process definition from {0} to {1} error : {2}", "从{0}移动工作流到{1}错误 : {2}"), SWITCH_PROCESS_DEFINITION_VERSION_ERROR(10151, "Switch process definition version error", "切换工作流版本出错"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_ERROR(10152 , "Switch process definition version error: not exists process definition, [process definition id {0}]", "切换工作流版本出错:工作流不存在,[工作流id {0}]"), SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_VERSION_ERROR(10153 , "Switch process definition version error: not exists process definition version, [process definition id {0}] [version number {1}]", "切换工作流版本出错:工作流版本信息不存在,[工作流id {0}] [版本号 {1}]"), QUERY_PROCESS_DEFINITION_VERSIONS_ERROR(10154, "query process definition versions error", "查询工作流历史版本信息出错"), DELETE_PROCESS_DEFINITION_VERSION_ERROR(10156, "delete process definition version error", "删除工作流历史版本出错"), QUERY_USER_CREATED_PROJECT_ERROR(10157, "query user created project error error", "查询用户创建的项目错误"), PROCESS_DEFINITION_CODES_IS_EMPTY(10158, "process definition codes is empty", "工作流CODES不能为空"), BATCH_COPY_PROCESS_DEFINITION_ERROR(10159, "batch copy process definition error", "复制工作流错误"), BATCH_MOVE_PROCESS_DEFINITION_ERROR(10160, "batch move process definition error", "移动工作流错误"), QUERY_WORKFLOW_LINEAGE_ERROR(10161, "query workflow lineage error", "查询血缘失败"), QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_ERROR(10162, "query authorized and user created project error error", "查询授权的和用户创建的项目错误"), DELETE_PROCESS_DEFINITION_BY_CODE_FAIL(10163, "delete process definition by code fail, for there are {0} process instances in executing using it", "删除工作流定义失败,有[{0}]个运行中的工作流实例正在使用"), CHECK_OS_TENANT_CODE_ERROR(10164, "Please enter the English os tenant code", "请输入英文操作系统租户"), FORCE_TASK_SUCCESS_ERROR(10165, "force task success error", "强制成功任务实例错误"), TASK_INSTANCE_STATE_OPERATION_ERROR(10166, "the status of task instance {0} is {1},Cannot perform force success operation", "任务实例[{0}]的状态是[{1}],无法执行强制成功操作"), DATASOURCE_TYPE_NOT_EXIST(10167, "data source type not exist", "数据源类型不存在"), PROCESS_DEFINITION_NAME_EXIST(10168, "process definition name {0} already exists", "工作流定义名称[{0}]已存在"), DATASOURCE_DB_TYPE_ILLEGAL(10169, "datasource type illegal", "数据源类型参数不合法"), DATASOURCE_PORT_ILLEGAL(10170, "datasource port illegal", "数据源端口参数不合法"), DATASOURCE_OTHER_PARAMS_ILLEGAL(10171, "datasource other params illegal", "数据源其他参数不合法"), DATASOURCE_NAME_ILLEGAL(10172, "datasource name illegal", "数据源名称不合法"), DATASOURCE_HOST_ILLEGAL(10173, "datasource host illegal", "数据源HOST不合法"), DELETE_WORKER_GROUP_NOT_EXIST(10174, "delete worker group not exist ", "删除worker分组不存在"), CREATE_WORKER_GROUP_FORBIDDEN_IN_DOCKER(10175, "create worker group forbidden in docker ", "创建worker分组在docker中禁止"), DELETE_WORKER_GROUP_FORBIDDEN_IN_DOCKER(10176, "delete worker group forbidden in docker ", "删除worker分组在docker中禁止"), WORKER_ADDRESS_INVALID(10177, "worker address {0} invalid", "worker地址[{0}]无效"), QUERY_WORKER_ADDRESS_LIST_FAIL(10178, "query worker address list fail ", "查询worker地址列表失败"), TRANSFORM_PROJECT_OWNERSHIP(10179, "Please transform project ownership [{0}]", "请先转移项目所有权[{0}]"), QUERY_ALERT_GROUP_ERROR(10180, "query alert group error", "查询告警组错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
CURRENT_LOGIN_USER_TENANT_NOT_EXIST(10181, "the tenant of the currently login user is not specified", "未指定当前登录用户的租户"), REVOKE_PROJECT_ERROR(10182, "revoke project error", "撤销项目授权错误"), QUERY_AUTHORIZED_USER(10183, "query authorized user error", "查询拥有项目权限的用户错误"), PROJECT_NOT_EXIST(10190, "This project was not found. Please refresh page.", "该项目不存在,请刷新页面"), TASK_INSTANCE_HOST_IS_NULL(10191, "task instance host is null", "任务实例host为空"), 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 !", "资源文件[{0}]不存在"), 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", "请检查任务节点并移除无权限或者已删除的资源"), RESOURCE_IS_AUTHORIZED(20017, "resource is authorized to user {0},suffix not allowed to be modified", "资源文件已授权其他用户[{0}],后缀不允许修改"), 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} process version {1} not on line", "工作流定义[{0}] 工作流版本[{1}]不是上线状态"), SUB_PROCESS_DEFINE_NOT_RELEASE(50004, "exist sub process definition not on line", "存在子工作流定义不是上线状态"), 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}]操作"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
SUB_PROCESS_INSTANCE_NOT_EXIST(50007, "the task belong to process instance does not exist", "子工作流实例不存在"), 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", "运行工作流实例错误"), BATCH_START_PROCESS_INSTANCE_ERROR(50014, "batch start process instance error: {0}", "批量运行工作流实例错误: {0}"), PROCESS_INSTANCE_ERROR(50014, "process instance delete error: {0}", "工作流实例删除[{0}]错误"), 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 {0} parameter invalid", "流程节点[{0}]参数无效"), PROCESS_DEFINE_STATE_ONLINE(50021, "process definition [{0}] is already on line", "工作流定义[{0}]已上线"), DELETE_PROCESS_DEFINE_BY_CODE_ERROR(50022, "delete process definition by code 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_CODES_ERROR(50026, "batch delete process definition by codes {0} error", "批量删除工作流定义[{0}]错误"), DELETE_PROCESS_DEFINE_BY_CODES_ERROR(50026, "delete process definition by codes {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", "导入工作流定义错误"), TASK_DEFINE_NOT_EXIST(50030, "task definition [{0}] does not exist", "任务定义[{0}]不存在"), CREATE_PROCESS_TASK_RELATION_ERROR(50032, "create process task relation error", "创建工作流任务关系错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
PROCESS_TASK_RELATION_NOT_EXIST(50033, "process task relation [{0}] does not exist", "工作流任务关系[{0}]不存在"), PROCESS_TASK_RELATION_EXIST(50034, "process task relation is already exist, processCode:[{0}]", "工作流任务关系已存在, processCode:[{0}]"), PROCESS_DAG_IS_EMPTY(50035, "process dag is empty", "工作流dag是空"), CHECK_PROCESS_TASK_RELATION_ERROR(50036, "check process task relation error", "工作流任务关系参数错误"), CREATE_TASK_DEFINITION_ERROR(50037, "create task definition error", "创建任务错误"), UPDATE_TASK_DEFINITION_ERROR(50038, "update task definition error", "更新任务定义错误"), QUERY_TASK_DEFINITION_VERSIONS_ERROR(50039, "query task definition versions error", "查询任务历史版本信息出错"), SWITCH_TASK_DEFINITION_VERSION_ERROR(50040, "Switch task definition version error", "切换任务版本出错"), DELETE_TASK_DEFINITION_VERSION_ERROR(50041, "delete task definition version error", "删除任务历史版本出错"), DELETE_TASK_DEFINE_BY_CODE_ERROR(50042, "delete task definition by code error", "删除任务定义错误"), QUERY_DETAIL_OF_TASK_DEFINITION_ERROR(50043, "query detail of task definition error", "查询任务详细信息错误"), QUERY_TASK_DEFINITION_LIST_PAGING_ERROR(50044, "query task definition list paging error", "分页查询任务定义列表错误"), TASK_DEFINITION_NAME_EXISTED(50045, "task definition name [{0}] already exists", "任务定义名称[{0}]已经存在"), RELEASE_TASK_DEFINITION_ERROR(50046, "release task definition error", "上线任务错误"), MOVE_PROCESS_TASK_RELATION_ERROR(50047, "move process task relation error", "移动任务到其他工作流错误"), DELETE_TASK_PROCESS_RELATION_ERROR(50048, "delete process task relation error", "删除工作流任务关系错误"), QUERY_TASK_PROCESS_RELATION_ERROR(50049, "query process task relation error", "查询工作流任务关系错误"), TASK_DEFINE_STATE_ONLINE(50050, "task definition [{0}] is already on line", "任务定义[{0}]已上线"), TASK_HAS_DOWNSTREAM(50051, "Task exists downstream [{0}] dependence", "任务存在下游[{0}]依赖"), TASK_HAS_UPSTREAM(50052, "Task [{0}] exists upstream dependence", "任务[{0}]存在上游依赖"), MAIN_TABLE_USING_VERSION(50053, "the version that the master table is using", "主表正在使用该版本"), PROJECT_PROCESS_NOT_MATCH(50054, "the project and the process is not match", "项目和工作流不匹配"), DELETE_EDGE_ERROR(50055, "delete edge error", "删除工作流任务连接线错误"), NOT_SUPPORT_UPDATE_TASK_DEFINITION(50056, "task state does not support modification", "当前任务不支持修改"), NOT_SUPPORT_COPY_TASK_TYPE(50057, "task type [{0}] does not support copy", "不支持复制的任务类型[{0}]"), BATCH_EXECUTE_PROCESS_INSTANCE_ERROR(50058, "change process instance status error: {0}", "修改工作实例状态错误: {0}"), HDFS_NOT_STARTUP(60001, "hdfs not startup", "hdfs未启用"), STORAGE_NOT_STARTUP(60002, "storage not startup", "存储未启用"), S3_CANNOT_RENAME(60003, "directory cannot be renamed", "S3无法重命名文件夹"), /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
* for monitor */ QUERY_DATABASE_STATE_ERROR(70001, "query database state error", "查询数据库状态错误"), 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不存在"), QUERY_ACCESSTOKEN_BY_USER_ERROR(70016, "query access token by user error", "查询访问指定用户的token错误"), COMMAND_STATE_COUNT_ERROR(80001, "task instance state count error", "查询各状态任务实例数错误"), NEGTIVE_SIZE_NUMBER_ERROR(80002, "query size number error", "查询size错误"), START_TIME_BIGGER_THAN_END_TIME_ERROR(80003, "start time bigger than end time error", "开始时间在结束时间之后错误"), QUEUE_COUNT_ERROR(90001, "queue count error", "查询队列数据错误"), KERBEROS_STARTUP_STATE(100001, "get kerberos startup state error", "获取kerberos启动状态错误"), // audit log QUERY_AUDIT_LOG_LIST_PAGING(10057, "query resources list paging", "分页查询资源列表错误"), //plugin PLUGIN_NOT_A_UI_COMPONENT(110001, "query plugin error, this plugin has no UI component", "查询插件错误,此插件无UI组件"), QUERY_PLUGINS_RESULT_IS_NULL(110002, "query plugins result is null", "查询插件为空"), QUERY_PLUGINS_ERROR(110003, "query plugins error", "查询插件错误"), QUERY_PLUGIN_DETAIL_RESULT_IS_NULL(110004, "query plugin detail result is null", "查询插件详情结果为空"), UPDATE_ALERT_PLUGIN_INSTANCE_ERROR(110005, "update alert plugin instance error", "更新告警组和告警组插件实例错误"), DELETE_ALERT_PLUGIN_INSTANCE_ERROR(110006, "delete alert plugin instance error", "删除告警组和告警组插件实例错误"), GET_ALERT_PLUGIN_INSTANCE_ERROR(110007, "get alert plugin instance error", "获取告警组和告警组插件实例错误"), CREATE_ALERT_PLUGIN_INSTANCE_ERROR(110008, "create alert plugin instance error", "创建告警组和告警组插件实例错误"), QUERY_ALL_ALERT_PLUGIN_INSTANCE_ERROR(110009, "query all alert plugin instance error", "查询所有告警实例失败"), PLUGIN_INSTANCE_ALREADY_EXIT(110010, "plugin instance already exit", "该告警插件实例已存在"), LIST_PAGING_ALERT_PLUGIN_INSTANCE_ERROR(110011, "query plugin instance page error", "分页查询告警实例失败"), DELETE_ALERT_PLUGIN_INSTANCE_ERROR_HAS_ALERT_GROUP_ASSOCIATED(110012, "failed to delete the alert instance, there is an alarm group associated with this alert instance",
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
"删除告警实例失败,存在与此告警实例关联的警报组"), PROCESS_DEFINITION_VERSION_IS_USED(110013, "this process definition version is used", "此工作流定义版本被使用"), CREATE_ENVIRONMENT_ERROR(120001, "create environment error", "创建环境失败"), ENVIRONMENT_NAME_EXISTS(120002, "this environment name [{0}] already exists", "环境名称[{0}]已经存在"), ENVIRONMENT_NAME_IS_NULL(120003, "this environment name shouldn't be empty.", "环境名称不能为空"), ENVIRONMENT_CONFIG_IS_NULL(120004, "this environment config shouldn't be empty.", "环境配置信息不能为空"), UPDATE_ENVIRONMENT_ERROR(120005, "update environment [{0}] info error", "更新环境[{0}]信息失败"), DELETE_ENVIRONMENT_ERROR(120006, "delete environment error", "删除环境信息失败"), DELETE_ENVIRONMENT_RELATED_TASK_EXISTS(120007, "this environment has been used in tasks,so you can't delete it.", "该环境已经被任务使用,所以不能删除该环境信息"), QUERY_ENVIRONMENT_BY_NAME_ERROR(1200008, "not found environment [{0}] ", "查询环境名称[{0}]信息不存在"), QUERY_ENVIRONMENT_BY_CODE_ERROR(1200009, "not found environment [{0}] ", "查询环境编码[{0}]不存在"), QUERY_ENVIRONMENT_ERROR(1200010, "login user query environment error", "分页查询环境列表错误"), VERIFY_ENVIRONMENT_ERROR(1200011, "verify environment error", "验证环境信息错误"), GET_RULE_FORM_CREATE_JSON_ERROR(1200012, "get rule form create json error", "获取规则 FROM-CREATE-JSON 错误"), QUERY_RULE_LIST_PAGING_ERROR(1200013, "query rule list paging error", "获取规则分页列表错误"), QUERY_RULE_LIST_ERROR(1200014, "query rule list error", "获取规则列表错误"), QUERY_RULE_INPUT_ENTRY_LIST_ERROR(1200015, "query rule list error", "获取规则列表错误"), QUERY_EXECUTE_RESULT_LIST_PAGING_ERROR(1200016, "query execute result list paging error", "获取数据质量任务结果分页错误"), GET_DATASOURCE_OPTIONS_ERROR(1200017, "get datasource options error", "获取数据源Options错误"), GET_DATASOURCE_TABLES_ERROR(1200018, "get datasource tables error", "获取数据源表列表错误"), GET_DATASOURCE_TABLE_COLUMNS_ERROR(1200019, "get datasource table columns error", "获取数据源表列名错误"), TASK_GROUP_NAME_EXSIT(130001, "this task group name is repeated in a project", "该任务组名称在一个项目中已经使用"), TASK_GROUP_SIZE_ERROR(130002, "task group size error", "任务组大小应该为大于1的整数"), TASK_GROUP_STATUS_ERROR(130003, "task group status error", "任务组已经被关闭"), TASK_GROUP_FULL(130004, "task group is full", "任务组已经满了"), TASK_GROUP_USED_SIZE_ERROR(130005, "the used size number of task group is dirty", "任务组使用的容量发生了变化"), TASK_GROUP_QUEUE_RELEASE_ERROR(130006, "failed to release task group queue", "任务组资源释放时出现了错误"), TASK_GROUP_QUEUE_AWAKE_ERROR(130007, "awake waiting task failed", "任务组使唤醒等待任务时发生了错误"), CREATE_TASK_GROUP_ERROR(130008, "create task group error", "创建任务组错误"), UPDATE_TASK_GROUP_ERROR(130009, "update task group list error", "更新任务组错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
QUERY_TASK_GROUP_LIST_ERROR(130010, "query task group list error", "查询任务组列表错误"), CLOSE_TASK_GROUP_ERROR(130011, "close task group error", "关闭任务组错误"), START_TASK_GROUP_ERROR(130012, "start task group error", "启动任务组错误"), QUERY_TASK_GROUP_QUEUE_LIST_ERROR(130013, "query task group queue list error", "查询任务组队列列表错误"), TASK_GROUP_CACHE_START_FAILED(130014, "cache start failed", "任务组相关的缓存启动失败"), ENVIRONMENT_WORKER_GROUPS_IS_INVALID(130015, "environment worker groups is invalid format", "环境关联的工作组参数解析错误"), UPDATE_ENVIRONMENT_WORKER_GROUP_RELATION_ERROR(130016, "You can't modify the worker group, because the worker group [{0}] and this environment [{1}] already be used in the task [{2}]", "您不能修改工作组选项,因为该工作组 [{0}] 和 该环境 [{1}] 已经被用在任务 [{2}] 中"), TASK_GROUP_QUEUE_ALREADY_START(130017, "task group queue already start", "节点已经获取任务组资源"), TASK_GROUP_STATUS_CLOSED(130018, "The task group has been closed.", "任务组已经被关闭"), TASK_GROUP_STATUS_OPENEDe task group has been opened.", "任务组已经被开启"), NOT_ALLOW_TO_DISABLE_OWN_ACCOUNT(130020, "Not allow to disable n account", "不能停用自己的账号"), NOT_ALLOW_TO_DELETE_DEFAULT_ALARM_GROUP(130030, "Not allow to delete the default alarm group ", "不能删除默认告警组"), TIME_ZONE_ILLEGAL(130031, "time zone [{0}] is illegal", "时区参数 [{0}] 不合法"), QUERY_K8S_NAMESPACE_LIST_PAGING_ERROR(1300001, "login user query k8s namespace list paging error", "分页查询k8s名称空间列表错误"), K8S_NAMESPACE_EXIST(1300002, "k8s namespace {0} already exists", "k8s命名空间[{0}]已存在"), CREATE_K8S_NAMESPACE_ERROR(1300003, "create k8s namespace error", "创建k8s命名空间错误"), UPDATE_K8S_NAMESPACE_ERROR(1300004, "update k8s namespace error", "更新k8s命名空间信息错误"), K8S_NAMESPACE_NOT_EXIST(1300005, "k8s namespace {0} not exists", "命名空间ID[{0}]不存在"), K8S_CLIENT_OPS_ERROR(1300006, "k8s error with exception {0}", "k8s操作报错[{0}]"), VERIFY_K8S_NAMESPACE_ERROR(1300007, "verify k8s and namespace error", "验证k8s命名空间信息错误"), DELETE_K8S_NAMESPACE_BY_ID_ERROR(1300008, "delete k8s namespace by id error", "删除命名空间错误"), VERIFY_PARAMETER_NAME_FAILED(1300009, "The file name verify failed", "文件命名校验失败"), STORE_OPERATE_CREATE_ERROR(1300010, "create the resource failed", "存储操作失败"), GRANT_K8S_NAMESPACE_ERROR(1300011, "grant namespace error", "授权资源错误"), QUERY_UNAUTHORIZED_NAMESPACE_ERROR(1300012, "query unauthorized namespace error", "查询未授权命名空间错误"), QUERY_AUTHORIZED_NAMESPACE_ERROR(1300013, "query authorized namespace error", "查询授权命名空间错误"), QUERY_CAN_USE_K8S_CLUSTER_ERROR(1300014, "login user query can used k8s cluster list error", "查询可用k8s集群错误"), RESOURCE_FULL_NAME_TOO_LONG_ERROR(1300015, "resource's fullname is too long error", "资源文件名过长"); private final int code;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
private final String enMsg; private final String zhMsg; 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; } } /** * Retrieve Status enum entity by status code. */ public static Optional<Status> findStatusBy(int code) { for (Status status : Status.values()) { if (code == status.getCode()) { return Optional.of(status); } } return Optional.empty(); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.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.impl; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.commons.collections.CollectionUtils;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java
import org.apache.commons.lang.StringUtils; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.service.TenantService; import org.apache.dolphinscheduler.api.utils.PageInfo; import org.apache.dolphinscheduler.api.utils.RegexUtils; import org.apache.dolphinscheduler.api.utils.Result; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.storage.StorageOperate; import org.apache.dolphinscheduler.common.utils.PropertyUtils; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapper; import org.apache.dolphinscheduler.dao.mapper.TenantMapper; import org.apache.dolphinscheduler.dao.mapper.UserMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; /** * tenant service impl */ @Service public class TenantServiceImpl extends BaseServiceImpl implements TenantService { @Autowired
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java
private TenantMapper tenantMapper; @Autowired private ProcessInstanceMapper processInstanceMapper; @Autowired private ProcessDefinitionMapper processDefinitionMapper; @Autowired private UserMapper userMapper; @Autowired(required = false) private StorageOperate storageOperate; /** * create tenant * * @param loginUser login user * @param tenantCode tenant code * @param queueId queue id * @param desc description * @return create result code * @throws Exception exception */ @Override @Transactional(rollbackFor = Exception.class) public Map<String, Object> createTenant(User loginUser, String tenantCode, int queueId, String desc) throws Exception { Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, false); if (isNotAdmin(loginUser, result)) { return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java
if (!RegexUtils.isValidLinuxUserName(tenantCode)) { putMsg(result, Status.CHECK_OS_TENANT_CODE_ERROR); return result; } if (checkTenantExists(tenantCode)) { putMsg(result, Status.OS_TENANT_CODE_EXIST, tenantCode); return result; } Tenant tenant = new Tenant(); Date now = new Date(); tenant.setTenantCode(tenantCode); tenant.setQueueId(queueId); tenant.setDescription(desc); tenant.setCreateTime(now); tenant.setUpdateTime(now); tenantMapper.insert(tenant); if (PropertyUtils.getResUploadStartupState()) { storageOperate.createTenantDirIfNotExists(tenantCode); } result.put(Constants.DATA_LIST, tenant); putMsg(result, Status.SUCCESS); return result; } /** * query tenant list paging * * @param loginUser login user * @param searchVal search value
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java
* @param pageNo page number * @param pageSize page size * @return tenant list page */ @Override public Result<Object> queryTenantList(User loginUser, String searchVal, Integer pageNo, Integer pageSize) { Result<Object> result = new Result<>(); if (!isAdmin(loginUser)) { putMsg(result, Status.USER_NO_OPERATION_PERM); return result; } Page<Tenant> page = new Page<>(pageNo, pageSize); IPage<Tenant> tenantIPage = tenantMapper.queryTenantPaging(page, searchVal); PageInfo<Tenant> pageInfo = new PageInfo<>(pageNo, pageSize); pageInfo.setTotal((int) tenantIPage.getTotal()); pageInfo.setTotalList(tenantIPage.getRecords()); result.setData(pageInfo); putMsg(result, Status.SUCCESS); return result; } /** * updateProcessInstance tenant * * @param loginUser login user * @param id tenant id * @param tenantCode tenant code * @param queueId queue id * @param desc description * @return update result code * @throws Exception exception
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java
*/ @Override public Map<String, Object> updateTenant(User loginUser, int id, String tenantCode, int queueId, String desc) throws Exception { Map<String, Object> result = new HashMap<>(); result.put(Constants.STATUS, false); if (isNotAdmin(loginUser, result)) { return result; } Tenant tenant = tenantMapper.queryById(id); if (tenant == null) { putMsg(result, Status.TENANT_NOT_EXIST); return result; } /** * if the tenant code is modified, the original resource needs to be copied to the new tenant. */ if (!tenant.getTenantCode().equals(tenantCode)) { if (checkTenantExists(tenantCode)) { if (PropertyUtils.getResUploadStartupState()) { storageOperate.createTenantDirIfNotExists(tenantCode); } } else { putMsg(result, Status.OS_TENANT_CODE_HAS_ALREADY_EXISTS); return result; } } Date now = new Date();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java
if (!StringUtils.isEmpty(tenantCode)) { tenant.setTenantCode(tenantCode); } if (queueId != 0) { tenant.setQueueId(queueId); } tenant.setDescription(desc); tenant.setUpdateTime(now); tenantMapper.updateById(tenant); result.put(Constants.STATUS, Status.SUCCESS); result.put(Constants.MSG, Status.SUCCESS.getMsg()); return result; } /** * delete tenant * * @param loginUser login user * @param id tenant id * @return delete result code * @throws Exception exception */ @Override @Transactional(rollbackFor = Exception.class) public Map<String, Object> deleteTenantById(User loginUser, int id) throws Exception { Map<String, Object> result = new HashMap<>(); if (isNotAdmin(loginUser, result)) { return result; } Tenant tenant = tenantMapper.queryById(id); if (tenant == null) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java
putMsg(result, Status.TENANT_NOT_EXIST); return result; } List<ProcessInstance> processInstances = getProcessInstancesByTenant(tenant); if (CollectionUtils.isNotEmpty(processInstances)) { putMsg(result, Status.DELETE_TENANT_BY_ID_FAIL, processInstances.size()); return result; } List<ProcessDefinition> processDefinitions = processDefinitionMapper.queryDefinitionListByTenant(tenant.getId()); if (CollectionUtils.isNotEmpty(processDefinitions)) { putMsg(result, Status.DELETE_TENANT_BY_ID_FAIL_DEFINES, processDefinitions.size()); return result; } List<User> userList = userMapper.queryUserListByTenant(tenant.getId()); if (CollectionUtils.isNotEmpty(userList)) { putMsg(result, Status.DELETE_TENANT_BY_ID_FAIL_USERS, userList.size()); return result; } if (PropertyUtils.getResUploadStartupState()) { storageOperate.deleteTenant(tenant.getTenantCode()); } tenantMapper.deleteById(id); processInstanceMapper.updateProcessInstanceByTenantId(id, -1); putMsg(result, Status.SUCCESS); return result; } private List<ProcessInstance> getProcessInstancesByTenant(Tenant tenant) { return processInstanceMapper.queryByTenantIdAndStatus(tenant.getId(), Constants.NOT_TERMINATED_STATES);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java
} /** * query tenant list * * @param loginUser login user * @return tenant list */ @Override public Map<String, Object> queryTenantList(User loginUser) { Map<String, Object> result = new HashMap<>(); List<Tenant> resourceList = tenantMapper.selectList(null); result.put(Constants.DATA_LIST, resourceList); putMsg(result, Status.SUCCESS); return result; } /** * verify tenant code * * @param tenantCode tenant code * @return true if tenant code can user, otherwise return false */ @Override public Result<Object> verifyTenantCode(String tenantCode) { Result<Object> result = new Result<>(); if (checkTenantExists(tenantCode)) { putMsg(result, Status.OS_TENANT_CODE_EXIST, tenantCode); } else { putMsg(result, Status.SUCCESS); } return result;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TenantServiceImpl.java
} /** * check tenant exists * * @param tenantCode tenant code * @return ture if the tenant code exists, otherwise return false */ @Override public boolean checkTenantExists(String tenantCode) { Boolean existTenant = tenantMapper.existTenant(tenantCode); return Boolean.TRUE.equals(existTenant); } /** * query tenant by tenant code * * @param tenantCode tenant code * @return tenant detail information */ @Override public Map<String, Object> queryByTenantCode(String tenantCode) { Map<String, Object> result = new HashMap<>(); Tenant tenant = tenantMapper.queryByTenantCode(tenantCode); if (tenant != null) { result.put(Constants.DATA_LIST, tenant); putMsg(result, Status.SUCCESS); } return result; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.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.common; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.SystemUtils; import java.util.regex.Pattern; /** * Constants */ public final class Constants {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
private Constants() { throw new UnsupportedOperationException("Construct Constants"); } /** * common properties path */ public static final String COMMON_PROPERTIES_PATH = "/common.properties"; /** * registry properties */ public static final String REGISTRY_DOLPHINSCHEDULER_MASTERS = "/nodes/master"; public static final String REGISTRY_DOLPHINSCHEDULER_WORKERS = "/nodes/worker"; public static final String REGISTRY_DOLPHINSCHEDULER_DEAD_SERVERS = "/dead-servers"; public static final String REGISTRY_DOLPHINSCHEDULER_NODE = "/nodes"; public static final String REGISTRY_DOLPHINSCHEDULER_LOCK_MASTERS = "/lock/masters"; public static final String REGISTRY_DOLPHINSCHEDULER_LOCK_FAILOVER_MASTERS = "/lock/failover/masters"; public static final String REGISTRY_DOLPHINSCHEDULER_LOCK_FAILOVER_WORKERS = "/lock/failover/workers"; public static final String REGISTRY_DOLPHINSCHEDULER_LOCK_FAILOVER_STARTUP_MASTERS = "/lock/failover/startup-masters"; public static final String FORMAT_SS = "%s%s"; public static final String FORMAT_S_S = "%s/%s"; public static final String AWS_ACCESS_KEY_ID = "aws.access.key.id";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String AWS_SECRET_ACCESS_KEY = "aws.secret.access.key"; public static final String AWS_REGION = "aws.region"; public static final String FOLDER_SEPARATOR = "/"; public static final String RESOURCE_TYPE_FILE = "resources"; public static final String RESOURCE_TYPE_UDF = "udfs"; public static final String STORAGE_S3 = "S3"; public static final String STORAGE_HDFS = "HDFS"; public static final String BUCKET_NAME = "dolphinscheduler-test"; /** * fs.defaultFS */ public static final String FS_DEFAULT_FS = "fs.defaultFS"; /** * hadoop configuration */ public static final String HADOOP_RM_STATE_ACTIVE = "ACTIVE"; public static final String HADOOP_RESOURCE_MANAGER_HTTPADDRESS_PORT = "resource.manager.httpaddress.port"; /** * yarn.resourcemanager.ha.rm.ids */ public static final String YARN_RESOURCEMANAGER_HA_RM_IDS = "yarn.resourcemanager.ha.rm.ids"; /** * yarn.application.status.address */ public static final String YARN_APPLICATION_STATUS_ADDRESS = "yarn.application.status.address"; /** * yarn.job.history.status.address */ public static final String YARN_JOB_HISTORY_STATUS_ADDRESS = "yarn.job.history.status.address"; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* hdfs configuration * hdfs.root.user */ public static final String HDFS_ROOT_USER = "hdfs.root.user"; /** * hdfs/s3 configuration * resource.upload.path */ public static final String RESOURCE_UPLOAD_PATH = "resource.upload.path"; /** * data basedir path */ public static final String DATA_BASEDIR_PATH = "data.basedir.path"; /** * dolphinscheduler.env.path */ public static final String DOLPHINSCHEDULER_ENV_PATH = "dolphinscheduler.env.path"; /** * environment properties default path */ public static final String ENV_PATH = "dolphinscheduler_env.sh"; /** * resource.view.suffixs */ public static final String RESOURCE_VIEW_SUFFIXES = "resource.view.suffixs"; public static final String RESOURCE_VIEW_SUFFIXES_DEFAULT_VALUE = "txt,log,sh,bat,conf,cfg,py,java,sql,xml,hql,properties,json,yml,yaml,ini,js"; /** * development.state */ public static final String DEVELOPMENT_STATE = "development.state";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,080
[Bug] [API]When the created tenant name is too long, an error message will be prompted
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened When the created tenant name is too long, an error message will be prompted ### What you expected to happen When the created tenant name is too long, an error message will be prompted ### How to reproduce created tenant name is too long ![企业微信截图_16527944742120](https://user-images.githubusercontent.com/33045461/168823465-4031b706-d422-4db4-91a4-dec98e0721fb.png) ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10080
https://github.com/apache/dolphinscheduler/pull/10081
0cc0ee77faabf1bed495a55ccd7653c03c26a550
67cf7b280087d4424bf0c2a698c9c12ab874bd2e
2022-05-17T13:35:22Z
java
2022-05-17T17:36:40Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
/** * sudo enable */ public static final String SUDO_ENABLE = "sudo.enable"; /** * string true */ public static final String STRING_TRUE = "true"; /** * resource storage type */ public static final String RESOURCE_STORAGE_TYPE = "resource.storage.type"; public static final String AWS_END_POINT = "aws.endpoint"; /** * comma , */ public static final String COMMA = ","; /** * COLON : */ public static final String COLON = ":"; /** * QUESTION ? */ public static final String QUESTION = "?"; /** * SPACE " " */ public static final String SPACE = " "; /**