Browse Source

wrong word: 'WAITTING' ->'WAITING' (#5682)

* Add:Name verification remove the first and last spaces.

* Update: wrong word: 'WAITTING' ->'WAITING'

Co-authored-by: Squid <2824638304@qq.com>
2.0.7-release
Squidyu 3 years ago committed by GitHub
parent
commit
664206cb81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
  2. 2
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/CommandType.java
  3. 8
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java
  4. 4
      dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskStateType.java
  5. 2
      dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/enums/ExecutionStatusTest.java
  6. 6
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java
  7. 2
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/DependentExecute.java
  8. 12
      dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
  9. 2
      dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/process/ProcessServiceTest.java
  10. 6
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js
  11. 4
      dolphinscheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue
  12. 4
      dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/common.js

4
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java

@ -873,8 +873,8 @@ public final class Constants {
ExecutionStatus.READY_PAUSE.ordinal(), ExecutionStatus.READY_PAUSE.ordinal(),
ExecutionStatus.READY_STOP.ordinal(), ExecutionStatus.READY_STOP.ordinal(),
ExecutionStatus.NEED_FAULT_TOLERANCE.ordinal(), ExecutionStatus.NEED_FAULT_TOLERANCE.ordinal(),
ExecutionStatus.WAITTING_THREAD.ordinal(), ExecutionStatus.WAITING_THREAD.ordinal(),
ExecutionStatus.WAITTING_DEPEND.ordinal() ExecutionStatus.WAITING_DEPEND.ordinal()
}; };
/** /**

2
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/CommandType.java

@ -50,7 +50,7 @@ public enum CommandType {
REPEAT_RUNNING(7, "repeat running a process"), REPEAT_RUNNING(7, "repeat running a process"),
PAUSE(8, "pause a process"), PAUSE(8, "pause a process"),
STOP(9, "stop a process"), STOP(9, "stop a process"),
RECOVER_WAITTING_THREAD(10, "recover waiting thread"); RECOVER_WAITING_THREAD(10, "recover waiting thread");
CommandType(int code, String descp){ CommandType(int code, String descp){
this.code = code; this.code = code;

8
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java

@ -53,8 +53,8 @@ public enum ExecutionStatus {
SUCCESS(7, "success"), SUCCESS(7, "success"),
NEED_FAULT_TOLERANCE(8, "need fault tolerance"), NEED_FAULT_TOLERANCE(8, "need fault tolerance"),
KILL(9, "kill"), KILL(9, "kill"),
WAITTING_THREAD(10, "waiting thread"), WAITING_THREAD(10, "waiting thread"),
WAITTING_DEPEND(11, "waiting depend node complete"), WAITING_DEPEND(11, "waiting depend node complete"),
DELAY_EXECUTION(12, "delay execution"), DELAY_EXECUTION(12, "delay execution"),
FORCED_SUCCESS(13, "forced success"); FORCED_SUCCESS(13, "forced success");
@ -109,7 +109,7 @@ public enum ExecutionStatus {
* @return status * @return status
*/ */
public boolean typeIsWaitingThread() { public boolean typeIsWaitingThread() {
return this == WAITTING_THREAD; return this == WAITING_THREAD;
} }
/** /**
@ -136,7 +136,7 @@ public enum ExecutionStatus {
* @return status * @return status
*/ */
public boolean typeIsRunning() { public boolean typeIsRunning() {
return this == RUNNING_EXECUTION || this == WAITTING_DEPEND || this == DELAY_EXECUTION; return this == RUNNING_EXECUTION || this == WAITING_DEPEND || this == DELAY_EXECUTION;
} }
/** /**

4
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskStateType.java

@ -27,7 +27,7 @@ public enum TaskStateType {
* 3 failed * 3 failed
* 4 success * 4 success
*/ */
WAITTING, RUNNING, FINISH, FAILED, SUCCESS; WAITING, RUNNING, FINISH, FAILED, SUCCESS;
/** /**
* convert task state to execute status integer array ; * convert task state to execute status integer array ;
@ -55,7 +55,7 @@ public enum TaskStateType {
ExecutionStatus.DELAY_EXECUTION.ordinal(), ExecutionStatus.DELAY_EXECUTION.ordinal(),
ExecutionStatus.READY_PAUSE.ordinal(), ExecutionStatus.READY_PAUSE.ordinal(),
ExecutionStatus.READY_STOP.ordinal()}; ExecutionStatus.READY_STOP.ordinal()};
case WAITTING: case WAITING:
return new int[]{ return new int[]{
ExecutionStatus.SUBMITTED_SUCCESS.ordinal() ExecutionStatus.SUBMITTED_SUCCESS.ordinal()
}; };

2
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/enums/ExecutionStatusTest.java

@ -26,7 +26,7 @@ public class ExecutionStatusTest extends TestCase {
public void testTypeIsRunning() { public void testTypeIsRunning() {
assertTrue(ExecutionStatus.RUNNING_EXECUTION.typeIsRunning()); assertTrue(ExecutionStatus.RUNNING_EXECUTION.typeIsRunning());
assertTrue(ExecutionStatus.WAITTING_DEPEND.typeIsRunning()); assertTrue(ExecutionStatus.WAITING_DEPEND.typeIsRunning());
assertTrue(ExecutionStatus.DELAY_EXECUTION.typeIsRunning()); assertTrue(ExecutionStatus.DELAY_EXECUTION.typeIsRunning());
} }
} }

6
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java

@ -673,7 +673,7 @@ public class MasterExecThread implements Runnable {
private ExecutionStatus runningState(ExecutionStatus state) { private ExecutionStatus runningState(ExecutionStatus state) {
if (state == ExecutionStatus.READY_STOP if (state == ExecutionStatus.READY_STOP
|| state == ExecutionStatus.READY_PAUSE || state == ExecutionStatus.READY_PAUSE
|| state == ExecutionStatus.WAITTING_THREAD || state == ExecutionStatus.WAITING_THREAD
|| state == ExecutionStatus.DELAY_EXECUTION) { || state == ExecutionStatus.DELAY_EXECUTION) {
// if the running task is not completed, the state remains unchanged // if the running task is not completed, the state remains unchanged
return state; return state;
@ -721,7 +721,7 @@ public class MasterExecThread implements Runnable {
* @return Boolean whether has waiting thread task * @return Boolean whether has waiting thread task
*/ */
private boolean hasWaitingThreadTask() { private boolean hasWaitingThreadTask() {
List<TaskInstance> waitingList = getCompleteTaskByState(ExecutionStatus.WAITTING_THREAD); List<TaskInstance> waitingList = getCompleteTaskByState(ExecutionStatus.WAITING_THREAD);
return CollectionUtils.isNotEmpty(waitingList); return CollectionUtils.isNotEmpty(waitingList);
} }
@ -768,7 +768,7 @@ public class MasterExecThread implements Runnable {
// waiting thread // waiting thread
if (hasWaitingThreadTask()) { if (hasWaitingThreadTask()) {
return ExecutionStatus.WAITTING_THREAD; return ExecutionStatus.WAITING_THREAD;
} }
// pause // pause

2
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/DependentExecute.java

@ -231,7 +231,7 @@ public class DependentExecute {
if (state.typeIsRunning() if (state.typeIsRunning()
|| state == ExecutionStatus.SUBMITTED_SUCCESS || state == ExecutionStatus.SUBMITTED_SUCCESS
|| state == ExecutionStatus.WAITTING_THREAD) { || state == ExecutionStatus.WAITING_THREAD) {
return DependResult.WAITING; return DependResult.WAITING;
} else { } else {
return DependResult.FAILED; return DependResult.FAILED;

12
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java

@ -258,8 +258,8 @@ public class ProcessService {
* @return process instance * @return process instance
*/ */
private ProcessInstance setWaitingThreadProcess(Command command, ProcessInstance processInstance) { private ProcessInstance setWaitingThreadProcess(Command command, ProcessInstance processInstance) {
processInstance.setState(ExecutionStatus.WAITTING_THREAD); processInstance.setState(ExecutionStatus.WAITING_THREAD);
if (command.getCommandType() != CommandType.RECOVER_WAITTING_THREAD) { if (command.getCommandType() != CommandType.RECOVER_WAITING_THREAD) {
processInstance.addHistoryCmd(command.getCommandType()); processInstance.addHistoryCmd(command.getCommandType());
} }
saveProcessInstance(processInstance); saveProcessInstance(processInstance);
@ -522,7 +522,7 @@ public class ProcessService {
// process instance quit by "waiting thread" state // process instance quit by "waiting thread" state
if (originCommand == null) { if (originCommand == null) {
Command command = new Command( Command command = new Command(
CommandType.RECOVER_WAITTING_THREAD, CommandType.RECOVER_WAITING_THREAD,
processInstance.getTaskDependType(), processInstance.getTaskDependType(),
processInstance.getFailureStrategy(), processInstance.getFailureStrategy(),
processInstance.getExecutorId(), processInstance.getExecutorId(),
@ -539,14 +539,14 @@ public class ProcessService {
} }
// update the command time if current command if recover from waiting // update the command time if current command if recover from waiting
if (originCommand.getCommandType() == CommandType.RECOVER_WAITTING_THREAD) { if (originCommand.getCommandType() == CommandType.RECOVER_WAITING_THREAD) {
originCommand.setUpdateTime(new Date()); originCommand.setUpdateTime(new Date());
saveCommand(originCommand); saveCommand(originCommand);
} else { } else {
// delete old command and create new waiting thread command // delete old command and create new waiting thread command
commandMapper.deleteById(originCommand.getId()); commandMapper.deleteById(originCommand.getId());
originCommand.setId(0); originCommand.setId(0);
originCommand.setCommandType(CommandType.RECOVER_WAITTING_THREAD); originCommand.setCommandType(CommandType.RECOVER_WAITING_THREAD);
originCommand.setUpdateTime(new Date()); originCommand.setUpdateTime(new Date());
originCommand.setCommandParam(JSONUtils.toJsonString(cmdParam)); originCommand.setCommandParam(JSONUtils.toJsonString(cmdParam));
originCommand.setProcessInstancePriority(processInstance.getProcessInstancePriority()); originCommand.setProcessInstancePriority(processInstance.getProcessInstancePriority());
@ -809,7 +809,7 @@ public class ProcessService {
break; break;
case START_CURRENT_TASK_PROCESS: case START_CURRENT_TASK_PROCESS:
break; break;
case RECOVER_WAITTING_THREAD: case RECOVER_WAITING_THREAD:
break; break;
case RECOVER_SUSPENDED_PROCESS: case RECOVER_SUSPENDED_PROCESS:
// find pause tasks and init task's state // find pause tasks and init task's state

2
dolphinscheduler-service/src/test/java/org/apache/dolphinscheduler/service/process/ProcessServiceTest.java

@ -206,7 +206,7 @@ public class ProcessServiceTest {
processService.createRecoveryWaitingThreadCommand(null, subProcessInstance); processService.createRecoveryWaitingThreadCommand(null, subProcessInstance);
Command recoverCommand = new Command(); Command recoverCommand = new Command();
recoverCommand.setCommandType(CommandType.RECOVER_WAITTING_THREAD); recoverCommand.setCommandType(CommandType.RECOVER_WAITING_THREAD);
processService.createRecoveryWaitingThreadCommand(recoverCommand, subProcessInstance); processService.createRecoveryWaitingThreadCommand(recoverCommand, subProcessInstance);
Command repeatRunningCommand = new Command(); Command repeatRunningCommand = new Command();

6
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js

@ -132,7 +132,7 @@ const runningType = [
}, },
{ {
desc: `${i18n.$t('Recovery waiting thread')}`, desc: `${i18n.$t('Recovery waiting thread')}`,
code: 'RECOVER_WAITTING_THREAD' code: 'RECOVER_WAITING_THREAD'
} }
] ]
@ -216,14 +216,14 @@ const tasksState = {
icoUnicode: 'el-icon-remove-outline', icoUnicode: 'el-icon-remove-outline',
isSpin: false isSpin: false
}, },
WAITTING_THREAD: { WAITING_THREAD: {
id: 10, id: 10,
desc: `${i18n.$t('Waiting for thread')}`, desc: `${i18n.$t('Waiting for thread')}`,
color: '#912eed', color: '#912eed',
icoUnicode: 'ri-time-line', icoUnicode: 'ri-time-line',
isSpin: false isSpin: false
}, },
WAITTING_DEPEND: { WAITING_DEPEND: {
id: 11, id: 11,
desc: `${i18n.$t('Waiting for dependence')}`, desc: `${i18n.$t('Waiting for dependence')}`,
color: '#5101be', color: '#5101be',

4
dolphinscheduler-ui/src/js/conf/home/pages/dag/instanceDetails.vue

@ -72,7 +72,7 @@
]).then((data) => { ]).then((data) => {
let item = data[0] let item = data[0]
let flag = false let flag = false
if (item.state !== 'WAITTING_THREAD' && item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP') { if (item.state !== 'WAITING_THREAD' && item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP') {
flag = true flag = true
} else { } else {
flag = false flag = false
@ -93,7 +93,7 @@
this.getInstancedetail(this.$route.params.id).then(res => { this.getInstancedetail(this.$route.params.id).then(res => {
let item = res let item = res
let flag = false let flag = false
if (item.state !== 'WAITTING_THREAD' && item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP') { if (item.state !== 'WAITING_THREAD' && item.state !== 'SUCCESS' && item.state !== 'PAUSE' && item.state !== 'FAILURE' && item.state !== 'STOP') {
flag = true flag = true
} else { } else {
flag = false flag = false

4
dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/conditions/instance/common.js

@ -55,10 +55,10 @@ const stateType = [
code: 'KILL', code: 'KILL',
label: `${i18n.$t('Kill')}` label: `${i18n.$t('Kill')}`
}, { }, {
code: 'WAITTING_THREAD', code: 'WAITING_THREAD',
label: `${i18n.$t('Waiting for thread')}` label: `${i18n.$t('Waiting for thread')}`
}, { }, {
code: 'WAITTING_DEPEND', code: 'WAITING_DEPEND',
label: `${i18n.$t('Waiting for dependency to complete')}` label: `${i18n.$t('Waiting for dependency to complete')}`
}, { }, {
code: 'DELAY_EXECUTION', code: 'DELAY_EXECUTION',

Loading…
Cancel
Save