From aff872a4c07012ddeb55b0db0b07dc8a996a071a Mon Sep 17 00:00:00 2001 From: lgcareer <18610854716@163.com> Date: Thu, 17 Oct 2019 20:29:52 +0800 Subject: [PATCH] fix NEED_FAULT_TOLERANCE and WAITTING_THREAD count fail (#1052) * rename from DatasourceUserMapper to DataSourceUserMapper * add unit test in UserMapper and WorkerGroupMapper * change cn.escheduler to org.apache.dolphinscheduler * add unit test in UdfFuncMapperTest * add unit test in UdfFuncMapperTest * remove DatabaseConfiguration * add ConnectionFactoryTest * cal duration in processInstancesList * change desc to description * change table name in mysql ddl * change table name in mysql ddl * change escheduler to dolphinscheduler * change escheduler to dolphinscheduler * change escheduler to dolphinscheduler * remove log4j-1.2-api and modify AlertMapperTest * remove log4j-1.2-api * Add alertDao to spring management * Add alertDao to spring management * get SqlSessionFactory from MybatisSqlSessionFactoryBean * get processDao by DaoFactory * read druid properties in ConneciontFactory * read druid properties in ConneciontFactory * change get alertDao by spring to DaoFactory * add log4j to resolve #967 * resole verify udf name error and delete udf error * Determine if principal is empty * Determine whether the logon user has the right to delete the project * Fixed an issue that produced attatch file named such as ATT00002.bin * fix too many connection in upgrade or create * fix NEED_FAULT_TOLERANCE and WAITTING_THREAD count fail --- .../apache/dolphinscheduler/api/dto/TaskCountDto.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 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 b6b587bde6..e7b182076d 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 @@ -33,7 +33,7 @@ public class TaskCountDto { private int totalCount; /** - * + * task state count list */ private List taskCountDtos; @@ -54,7 +54,6 @@ public class TaskCountDto { int need_fault_tolerance = 0; int kill = 0; int waitting_thread = 0; - int waitting_depend = 0; for(ExecuteStatusCount taskInstanceStateCount : taskInstanceStateCounts){ ExecutionStatus status = taskInstanceStateCount.getExecutionStatus(); @@ -85,16 +84,13 @@ public class TaskCountDto { success += taskInstanceStateCount.getCount(); break; case NEED_FAULT_TOLERANCE: - failure += taskInstanceStateCount.getCount(); + need_fault_tolerance += taskInstanceStateCount.getCount(); break; case KILL: kill += taskInstanceStateCount.getCount(); break; case WAITTING_THREAD: - kill += taskInstanceStateCount.getCount(); - break; - case WAITTING_DEPEND: - kill += taskInstanceStateCount.getCount(); + waitting_thread += taskInstanceStateCount.getCount(); break; default: @@ -113,7 +109,6 @@ public class TaskCountDto { this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.NEED_FAULT_TOLERANCE, need_fault_tolerance)); this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.KILL, kill)); this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.WAITTING_THREAD, waitting_thread)); - this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.WAITTING_DEPEND, waitting_depend)); }