Browse Source

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
pull/2/head
lgcareer 5 years ago committed by qiaozhanwei
parent
commit
aff872a4c0
  1. 11
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/TaskCountDto.java

11
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/TaskCountDto.java

@ -33,7 +33,7 @@ public class TaskCountDto {
private int totalCount; private int totalCount;
/** /**
* * task state count list
*/ */
private List<TaskStateCount> taskCountDtos; private List<TaskStateCount> taskCountDtos;
@ -54,7 +54,6 @@ public class TaskCountDto {
int need_fault_tolerance = 0; int need_fault_tolerance = 0;
int kill = 0; int kill = 0;
int waitting_thread = 0; int waitting_thread = 0;
int waitting_depend = 0;
for(ExecuteStatusCount taskInstanceStateCount : taskInstanceStateCounts){ for(ExecuteStatusCount taskInstanceStateCount : taskInstanceStateCounts){
ExecutionStatus status = taskInstanceStateCount.getExecutionStatus(); ExecutionStatus status = taskInstanceStateCount.getExecutionStatus();
@ -85,16 +84,13 @@ public class TaskCountDto {
success += taskInstanceStateCount.getCount(); success += taskInstanceStateCount.getCount();
break; break;
case NEED_FAULT_TOLERANCE: case NEED_FAULT_TOLERANCE:
failure += taskInstanceStateCount.getCount(); need_fault_tolerance += taskInstanceStateCount.getCount();
break; break;
case KILL: case KILL:
kill += taskInstanceStateCount.getCount(); kill += taskInstanceStateCount.getCount();
break; break;
case WAITTING_THREAD: case WAITTING_THREAD:
kill += taskInstanceStateCount.getCount(); waitting_thread += taskInstanceStateCount.getCount();
break;
case WAITTING_DEPEND:
kill += taskInstanceStateCount.getCount();
break; break;
default: 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.NEED_FAULT_TOLERANCE, need_fault_tolerance));
this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.KILL, kill)); 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_THREAD, waitting_thread));
this.taskCountDtos.add(new TaskStateCount(ExecutionStatus.WAITTING_DEPEND, waitting_depend));
} }

Loading…
Cancel
Save