From 5fe31546ba5bb83185c9886313c310d9d39f6733 Mon Sep 17 00:00:00 2001 From: zixi0825 <649790970@qq.com> Date: Thu, 30 Jul 2020 18:33:16 +0800 Subject: [PATCH] [Fix][all] fix spell error (#3289) * fix spell error * test unit test Co-authored-by: sunchaohe --- .../api/dto/TaskCountDto.java | 4 ++-- .../api/service/DataAnalysisServiceTest.java | 2 +- .../service/ProcessDefinitionServiceTest.java | 4 ++-- .../service/ProcessInstanceServiceTest.java | 4 ++-- .../dolphinscheduler/common/Constants.java | 2 +- .../common/enums/ExecutionStatus.java | 4 ++-- .../common/enums/TaskStateType.java | 2 +- .../common/utils/HadoopUtils.java | 2 +- .../dao/mapper/ProcessInstanceMapperTest.java | 20 +++++++++---------- .../dao/mapper/TaskInstanceMapperTest.java | 10 +++++----- .../runner/ConditionsTaskExecThread.java | 2 +- .../runner/DependentTaskExecThread.java | 2 +- .../runner/MasterBaseTaskExecThread.java | 2 +- .../master/runner/MasterExecThread.java | 8 ++++---- .../runner/SubProcessTaskExecThread.java | 2 +- .../processor/TaskExecuteProcessor.java | 2 +- .../server/master/ConditionsTaskTest.java | 2 +- .../server/master/DependentTaskTest.java | 2 +- .../queue/TaskResponseServiceTest.java | 4 ++-- .../service/process/ProcessService.java | 11 ++++------ .../js/conf/home/pages/dag/_source/config.js | 2 +- .../formModel/tasks/_source/nodeStatus.vue | 6 +++--- .../_source/instanceConditions/common.js | 2 +- .../instance/pages/list/_source/list.vue | 4 ++-- 24 files changed, 51 insertions(+), 54 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/TaskCountDto.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/TaskCountDto.java index 6b0391f111..fa7588f2ed 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/TaskCountDto.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/TaskCountDto.java @@ -62,7 +62,7 @@ public class TaskCountDto { case SUBMITTED_SUCCESS: submittedSuccess += taskInstanceStateCount.getCount(); break; - case RUNNING_EXEUTION: + case RUNNING_EXECUTION: runningExeution += taskInstanceStateCount.getCount(); break; case READY_PAUSE: @@ -99,7 +99,7 @@ public class TaskCountDto { } this.taskCountDtos = new ArrayList<>(); this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.SUBMITTED_SUCCESS, submittedSuccess)); - this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.RUNNING_EXEUTION, runningExeution)); + this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.RUNNING_EXECUTION, runningExeution)); this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.READY_PAUSE, readyPause)); this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.PAUSE, pause)); this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.READY_STOP, readyStop)); diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/DataAnalysisServiceTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/DataAnalysisServiceTest.java index 14612fcef8..6a9e78600b 100644 --- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/DataAnalysisServiceTest.java +++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/DataAnalysisServiceTest.java @@ -180,7 +180,7 @@ public class DataAnalysisServiceTest { List taskInstanceStateCounts = new ArrayList<>(1); ExecuteStatusCount executeStatusCount = new ExecuteStatusCount(); - executeStatusCount.setExecutionStatus(ExecutionStatus.RUNNING_EXEUTION); + executeStatusCount.setExecutionStatus(ExecutionStatus.RUNNING_EXECUTION); taskInstanceStateCounts.add(executeStatusCount); return taskInstanceStateCounts; diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java index d4fa2307ec..8db667e28b 100644 --- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java +++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessDefinitionServiceTest.java @@ -474,7 +474,7 @@ public class ProcessDefinitionServiceTest { ProcessInstance processInstance = new ProcessInstance(); processInstance.setId(1); processInstance.setName("test_instance"); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstance.setHost("192.168.xx.xx"); processInstance.setStartTime(new Date()); processInstance.setEndTime(new Date()); @@ -486,7 +486,7 @@ public class ProcessDefinitionServiceTest { taskInstance.setTaskType("SHELL"); taskInstance.setId(1); taskInstance.setName("test_task_instance"); - taskInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + taskInstance.setState(ExecutionStatus.RUNNING_EXECUTION); taskInstance.setHost("192.168.xx.xx"); //task instance not exist diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessInstanceServiceTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessInstanceServiceTest.java index b35614335c..6f3757335c 100644 --- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessInstanceServiceTest.java +++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProcessInstanceServiceTest.java @@ -307,7 +307,7 @@ public class ProcessInstanceServiceTest { //process instance not finish when(processService.findProcessInstanceDetailById(1)).thenReturn(processInstance); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); Map processInstanceNotFinishRes = processInstanceService.updateProcessInstance(loginUser, projectName, 1, shellJson, "2020-02-21 00:00:00", true, Flag.YES, "", ""); Assert.assertEquals(Status.PROCESS_INSTANCE_STATE_OPERATION_ERROR, processInstanceNotFinishRes.get(Constants.STATUS)); @@ -414,7 +414,7 @@ public class ProcessInstanceServiceTest { ProcessInstance processInstance = getProcessInstance(); processInstance.setProcessInstanceJson(shellJson); TaskInstance taskInstance = getTaskInstance(); - taskInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + taskInstance.setState(ExecutionStatus.RUNNING_EXECUTION); taskInstance.setStartTime(new Date()); when(processInstanceMapper.queryDetailById(1)).thenReturn(processInstance); when(taskInstanceMapper.queryByInstanceIdAndName(Mockito.anyInt(), Mockito.any())).thenReturn(taskInstance); diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java index f2494a68c1..441befb441 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java @@ -831,7 +831,7 @@ public final class Constants { public static final int[] NOT_TERMINATED_STATES = new int[]{ ExecutionStatus.SUBMITTED_SUCCESS.ordinal(), - ExecutionStatus.RUNNING_EXEUTION.ordinal(), + ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.READY_PAUSE.ordinal(), ExecutionStatus.READY_STOP.ordinal(), ExecutionStatus.NEED_FAULT_TOLERANCE.ordinal(), diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java index 7cc073e09e..6ea02ef096 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/ExecutionStatus.java @@ -43,7 +43,7 @@ public enum ExecutionStatus { * 11 waiting depend node complete */ SUBMITTED_SUCCESS(0, "submit success"), - RUNNING_EXEUTION(1, "running"), + RUNNING_EXECUTION(1, "running"), READY_PAUSE(2, "ready pause"), PAUSE(3, "pause"), READY_STOP(4, "ready stop"), @@ -126,7 +126,7 @@ public enum ExecutionStatus { * @return status */ public boolean typeIsRunning(){ - return this == RUNNING_EXEUTION || this == WAITTING_DEPEND; + return this == RUNNING_EXECUTION || this == WAITTING_DEPEND; } /** diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskStateType.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskStateType.java index 200f90709a..11ab8560b7 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskStateType.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/TaskStateType.java @@ -50,7 +50,7 @@ public enum TaskStateType { }; case RUNNING: return new int[]{ExecutionStatus.SUBMITTED_SUCCESS.ordinal(), - ExecutionStatus.RUNNING_EXEUTION.ordinal(), + ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.READY_PAUSE.ordinal(), ExecutionStatus.READY_STOP.ordinal()}; case WAITTING: diff --git a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java index fce59d6548..cf432a17d5 100644 --- a/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java +++ b/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java @@ -448,7 +448,7 @@ public class HadoopUtils implements Closeable { case Constants.RUNNING: default: - return ExecutionStatus.RUNNING_EXEUTION; + return ExecutionStatus.RUNNING_EXECUTION; } } diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapperTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapperTest.java index 3da6e69cce..fc4b4f1ea9 100644 --- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapperTest.java +++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapperTest.java @@ -124,11 +124,11 @@ public class ProcessInstanceMapperTest { public void testQueryByHostAndStates() { ProcessInstance processInstance = insertOne(); processInstance.setHost("192.168.2.155"); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstanceMapper.updateById(processInstance); int[] stateArray = new int[]{ - ExecutionStatus.RUNNING_EXEUTION.ordinal(), + ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.SUCCESS.ordinal()}; List processInstances = processInstanceMapper.queryByHostAndStatus(null, stateArray); @@ -145,7 +145,7 @@ public class ProcessInstanceMapperTest { int[] stateArray = new int[]{ - ExecutionStatus.RUNNING_EXEUTION.ordinal(), + ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.SUCCESS.ordinal()}; ProcessDefinition processDefinition = new ProcessDefinition(); @@ -155,7 +155,7 @@ public class ProcessInstanceMapperTest { ProcessInstance processInstance = insertOne(); processInstance.setProcessDefinitionId(processDefinition.getId()); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstance.setIsSubProcess(Flag.NO); processInstance.setStartTime(new Date()); @@ -188,12 +188,12 @@ public class ProcessInstanceMapperTest { public void testSetFailoverByHostAndStateArray() { int[] stateArray = new int[]{ - ExecutionStatus.RUNNING_EXEUTION.ordinal(), + ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.SUCCESS.ordinal()}; ProcessInstance processInstance = insertOne(); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstance.setHost("192.168.2.220"); processInstanceMapper.updateById(processInstance); String host = processInstance.getHost(); @@ -214,9 +214,9 @@ public class ProcessInstanceMapperTest { ProcessInstance processInstance = insertOne(); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstanceMapper.updateById(processInstance); - processInstanceMapper.updateProcessInstanceByState(ExecutionStatus.RUNNING_EXEUTION, ExecutionStatus.SUCCESS); + processInstanceMapper.updateProcessInstanceByState(ExecutionStatus.RUNNING_EXECUTION, ExecutionStatus.SUCCESS); ProcessInstance processInstance1 = processInstanceMapper.selectById(processInstance.getId()); @@ -294,11 +294,11 @@ public class ProcessInstanceMapperTest { @Test public void testQueryLastRunningProcess() { ProcessInstance processInstance = insertOne(); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstanceMapper.updateById(processInstance); int[] stateArray = new int[]{ - ExecutionStatus.RUNNING_EXEUTION.ordinal(), + ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.SUBMITTED_SUCCESS.ordinal()}; ProcessInstance processInstance1 = processInstanceMapper.queryLastRunningProcess(processInstance.getProcessDefinitionId(), null, null , stateArray); diff --git a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapperTest.java b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapperTest.java index b224067a29..017527137b 100644 --- a/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapperTest.java +++ b/dolphinscheduler-dao/src/test/java/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapperTest.java @@ -64,7 +64,7 @@ public class TaskInstanceMapperTest { TaskInstance taskInstance = new TaskInstance(); taskInstance.setFlag(Flag.YES); taskInstance.setName("ut task"); - taskInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + taskInstance.setState(ExecutionStatus.RUNNING_EXECUTION); taskInstance.setStartTime(new Date()); taskInstance.setEndTime(new Date()); taskInstance.setTaskJson("{}"); @@ -118,7 +118,7 @@ public class TaskInstanceMapperTest { taskInstanceMapper.updateById(task); List taskInstances = taskInstanceMapper.queryTaskByProcessIdAndState( task.getProcessInstanceId(), - ExecutionStatus.RUNNING_EXEUTION.ordinal() + ExecutionStatus.RUNNING_EXECUTION.ordinal() ); taskInstanceMapper.deleteById(task.getId()); Assert.assertNotEquals(taskInstances.size(), 0); @@ -162,7 +162,7 @@ public class TaskInstanceMapperTest { taskInstanceMapper.updateById(task); List taskInstances = taskInstanceMapper.queryByHostAndStatus( - task.getHost(), new int[]{ExecutionStatus.RUNNING_EXEUTION.ordinal()} + task.getHost(), new int[]{ExecutionStatus.RUNNING_EXECUTION.ordinal()} ); taskInstanceMapper.deleteById(task.getId()); Assert.assertNotEquals(taskInstances.size(), 0); @@ -179,7 +179,7 @@ public class TaskInstanceMapperTest { int setResult = taskInstanceMapper.setFailoverByHostAndStateArray( task.getHost(), - new int[]{ExecutionStatus.RUNNING_EXEUTION.ordinal()}, + new int[]{ExecutionStatus.RUNNING_EXECUTION.ordinal()}, ExecutionStatus.NEED_FAULT_TOLERANCE ); taskInstanceMapper.deleteById(task.getId()); @@ -268,7 +268,7 @@ public class TaskInstanceMapperTest { ProcessInstance processInstance = new ProcessInstance(); processInstance.setProcessDefinitionId(definition.getId()); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstance.setName("ut process"); processInstance.setStartTime(new Date()); processInstance.setEndTime(new Date()); diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/ConditionsTaskExecThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/ConditionsTaskExecThread.java index 826a7c8fb9..a410f99fc1 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/ConditionsTaskExecThread.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/ConditionsTaskExecThread.java @@ -124,7 +124,7 @@ public class ConditionsTaskExecThread extends MasterBaseTaskExecThread { private void initTaskParameters() { this.taskInstance.setLogPath(getTaskLogPath(taskInstance)); this.taskInstance.setHost(NetUtils.getHost() + Constants.COLON + masterConfig.getListenPort()); - taskInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + taskInstance.setState(ExecutionStatus.RUNNING_EXECUTION); taskInstance.setStartTime(new Date()); this.processService.saveTaskInstance(taskInstance); diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java index a67e24bcf2..183f1aac42 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/DependentTaskExecThread.java @@ -173,7 +173,7 @@ public class DependentTaskExecThread extends MasterBaseTaskExecThread { private void initTaskParameters() { taskInstance.setLogPath(getTaskLogPath(taskInstance)); taskInstance.setHost(NetUtils.getHost() + Constants.COLON + masterConfig.getListenPort()); - taskInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + taskInstance.setState(ExecutionStatus.RUNNING_EXECUTION); taskInstance.setStartTime(new Date()); processService.updateTaskInstance(taskInstance); } diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterBaseTaskExecThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterBaseTaskExecThread.java index c903dbc6b0..aac201c403 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterBaseTaskExecThread.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterBaseTaskExecThread.java @@ -172,7 +172,7 @@ public class MasterBaseTaskExecThread implements Callable { return true; } // task cannot submit when running - if(taskInstance.getState() == ExecutionStatus.RUNNING_EXEUTION){ + if(taskInstance.getState() == ExecutionStatus.RUNNING_EXECUTION){ logger.info(String.format("submit to task, but task [%s] state already be running. ", taskInstance.getName())); return true; } diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java index 031533f26b..2a8e411c33 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java @@ -302,7 +302,7 @@ public class MasterExecThread implements Runnable { processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam)); } - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstance.setGlobalParams(ParameterUtils.curingGlobalParams( processInstance.getProcessDefinition().getGlobalParamMap(), processInstance.getProcessDefinition().getGlobalParamList(), @@ -725,7 +725,7 @@ public class MasterExecThread implements Runnable { // if the running task is not completed, the state remains unchanged return state; }else{ - return ExecutionStatus.RUNNING_EXEUTION; + return ExecutionStatus.RUNNING_EXECUTION; } } @@ -835,11 +835,11 @@ public class MasterExecThread implements Runnable { } // success - if(state == ExecutionStatus.RUNNING_EXEUTION){ + if(state == ExecutionStatus.RUNNING_EXECUTION){ List killTasks = getCompleteTaskByState(ExecutionStatus.KILL); if(readyToSubmitTaskList.size() > 0){ //tasks currently pending submission, no retries, indicating that depend is waiting to complete - return ExecutionStatus.RUNNING_EXEUTION; + return ExecutionStatus.RUNNING_EXECUTION; }else if(CollectionUtils.isNotEmpty(killTasks)){ // tasks maybe killed manually return ExecutionStatus.FAILURE; diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/SubProcessTaskExecThread.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/SubProcessTaskExecThread.java index ee290487b7..2b1508dc44 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/SubProcessTaskExecThread.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/SubProcessTaskExecThread.java @@ -93,7 +93,7 @@ public class SubProcessTaskExecThread extends MasterBaseTaskExecThread { return false; } - taskInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + taskInstance.setState(ExecutionStatus.RUNNING_EXECUTION); taskInstance.setStartTime(new Date()); processService.updateTaskInstance(taskInstance); return true; diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java index 788a1d7119..2ce4515279 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java @@ -167,7 +167,7 @@ public class TaskExecuteProcessor implements NettyRequestProcessor { private TaskExecuteAckCommand buildAckCommand(TaskExecutionContext taskExecutionContext) { TaskExecuteAckCommand ackCommand = new TaskExecuteAckCommand(); ackCommand.setTaskInstanceId(taskExecutionContext.getTaskInstanceId()); - ackCommand.setStatus(ExecutionStatus.RUNNING_EXEUTION.getCode()); + ackCommand.setStatus(ExecutionStatus.RUNNING_EXECUTION.getCode()); ackCommand.setLogPath(getTaskLogPath(taskExecutionContext)); ackCommand.setHost(taskExecutionContext.getHost()); ackCommand.setStartTime(new Date()); diff --git a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/ConditionsTaskTest.java b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/ConditionsTaskTest.java index 299d4ba800..f1ee8ccf11 100644 --- a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/ConditionsTaskTest.java +++ b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/ConditionsTaskTest.java @@ -124,7 +124,7 @@ public class ConditionsTaskTest { ProcessInstance processInstance = new ProcessInstance(); processInstance.setId(10112); processInstance.setProcessDefinitionId(100001); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); return processInstance; } diff --git a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/DependentTaskTest.java b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/DependentTaskTest.java index 66bc3afe84..351be8aa65 100644 --- a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/DependentTaskTest.java +++ b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/DependentTaskTest.java @@ -176,7 +176,7 @@ public class DependentTaskTest { ProcessInstance processInstance = new ProcessInstance(); processInstance.setId(10111); processInstance.setProcessDefinitionId(0); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); return processInstance; } diff --git a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskResponseServiceTest.java b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskResponseServiceTest.java index dcba83271c..f19e2b4b64 100644 --- a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskResponseServiceTest.java +++ b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/processor/queue/TaskResponseServiceTest.java @@ -43,7 +43,7 @@ public class TaskResponseServiceTest { @Test public void testAdd(){ - TaskResponseEvent taskResponseEvent = TaskResponseEvent.newAck(ExecutionStatus.RUNNING_EXEUTION, new Date(), + TaskResponseEvent taskResponseEvent = TaskResponseEvent.newAck(ExecutionStatus.RUNNING_EXECUTION, new Date(), "", "", "", 1); taskResponseService.addResponse(taskResponseEvent); Assert.assertTrue(taskResponseService.getEventQueue().size() == 1); @@ -57,7 +57,7 @@ public class TaskResponseServiceTest { @Test public void testStop(){ - TaskResponseEvent taskResponseEvent = TaskResponseEvent.newAck(ExecutionStatus.RUNNING_EXEUTION, new Date(), + TaskResponseEvent taskResponseEvent = TaskResponseEvent.newAck(ExecutionStatus.RUNNING_EXECUTION, new Date(), "", "", "", 1); taskResponseService.addResponse(taskResponseEvent); taskResponseService.stop(); diff --git a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java index cdb469c511..7df56c6cdd 100644 --- a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java +++ b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java @@ -37,11 +37,8 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; - -import java.io.File; import java.util.*; import java.util.stream.Collectors; - import static java.util.stream.Collectors.toSet; import static org.apache.dolphinscheduler.common.Constants.*; @@ -54,7 +51,7 @@ public class ProcessService { private final Logger logger = LoggerFactory.getLogger(getClass()); private final int[] stateArray = new int[]{ExecutionStatus.SUBMITTED_SUCCESS.ordinal(), - ExecutionStatus.RUNNING_EXEUTION.ordinal(), + ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.READY_PAUSE.ordinal(), ExecutionStatus.READY_STOP.ordinal()}; @@ -454,7 +451,7 @@ public class ProcessService { Command command, Map cmdParam){ ProcessInstance processInstance = new ProcessInstance(processDefinition); - processInstance.setState(ExecutionStatus.RUNNING_EXEUTION); + processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstance.setRecovery(Flag.NO); processInstance.setStartTime(new Date()); processInstance.setRunTimes(1); @@ -616,7 +613,7 @@ public class ProcessService { } processInstance.setHost(host); - ExecutionStatus runStatus = ExecutionStatus.RUNNING_EXEUTION; + ExecutionStatus runStatus = ExecutionStatus.RUNNING_EXECUTION; int runTime = processInstance.getRunTimes(); switch (commandType){ case START_PROCESS: @@ -1068,7 +1065,7 @@ public class ProcessService { // running or killed // the task already exists in task queue // return state - state == ExecutionStatus.RUNNING_EXEUTION + state == ExecutionStatus.RUNNING_EXECUTION || state == ExecutionStatus.KILL || checkTaskExistsInTaskQueue(taskInstance) ){ diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js index 56d0168893..10ed59a589 100755 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/config.js @@ -153,7 +153,7 @@ const tasksState = { icoUnicode: 'ans-icon-dot-circle', isSpin: false }, - RUNNING_EXEUTION: { + RUNNING_EXECUTION: { id: 1, desc: `${i18n.$t('Executing')}`, color: '#0097e0', diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue index 549cb119f9..fe9b28b779 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/_source/nodeStatus.vue @@ -28,7 +28,7 @@ @@ -79,7 +79,7 @@ // btn loading this.isLoading = true this.$emit('dependItemListEvent', _.concat(this.dependItemList, this._rtNewParams())) - + // remove tooltip this._removeTip() }, @@ -223,4 +223,4 @@ } } } - \ No newline at end of file + diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/common.js b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/common.js index 254098a65b..694d04748c 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/common.js +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/_source/instanceConditions/common.js @@ -28,7 +28,7 @@ const stateType = [ code: 'SUBMITTED_SUCCESS', label: `${i18n.$t('Submitted successfully')}` }, { - code: 'RUNNING_EXEUTION', + code: 'RUNNING_EXECUTION', label: `${i18n.$t('Running')}` }, { code: 'READY_PAUSE', diff --git a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue index 005858da18..dc1acf5c7f 100644 --- a/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue +++ b/dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/instance/pages/list/_source/list.vue @@ -132,7 +132,7 @@ :title="item.state === 'STOP' ? $t('Recovery Suspend') : $t('Stop')" @click="_stop(item,$index)" :icon="item.state === 'STOP' ? 'ans-icon-pause-solid' : 'ans-icon-stop'" - :disabled="item.state !== 'RUNNING_EXEUTION' && item.state != 'STOP'"> + :disabled="item.state !== 'RUNNING_EXECUTION' && item.state != 'STOP'"> + :disabled="item.state !== 'RUNNING_EXECUTION' && item.state !== 'PAUSE'">