@ -23,6 +23,7 @@ import org.apache.dolphinscheduler.api.dto.TaskCountDto;
import org.apache.dolphinscheduler.api.enums.Status ;
import org.apache.dolphinscheduler.api.enums.Status ;
import org.apache.dolphinscheduler.api.utils.Constants ;
import org.apache.dolphinscheduler.api.utils.Constants ;
import org.apache.dolphinscheduler.common.enums.CommandType ;
import org.apache.dolphinscheduler.common.enums.CommandType ;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus ;
import org.apache.dolphinscheduler.common.enums.UserType ;
import org.apache.dolphinscheduler.common.enums.UserType ;
import org.apache.dolphinscheduler.common.queue.ITaskQueue ;
import org.apache.dolphinscheduler.common.queue.ITaskQueue ;
import org.apache.dolphinscheduler.common.queue.TaskQueueFactory ;
import org.apache.dolphinscheduler.common.queue.TaskQueueFactory ;
@ -246,15 +247,18 @@ public class DataAnalysisService {
Date start = null ;
Date start = null ;
Date end = null ;
Date end = null ;
try {
if ( startDate ! = null & & endDate ! = null ) {
start = DateUtils . getScheduleDate ( startDate ) ;
try {
end = DateUtils . getScheduleDate ( endDate ) ;
start = DateUtils . getScheduleDate ( startDate ) ;
} catch ( Exception e ) {
end = DateUtils . getScheduleDate ( endDate ) ;
logger . error ( e . getMessage ( ) , e ) ;
} catch ( Exception e ) {
putErrorRequestParamsMsg ( result ) ;
logger . error ( e . getMessage ( ) , e ) ;
return result ;
putErrorRequestParamsMsg ( result ) ;
return result ;
}
}
}
Integer [ ] projectIdArray = getProjectIdsArrays ( loginUser , projectId ) ;
Integer [ ] projectIdArray = getProjectIdsArrays ( loginUser , projectId ) ;
// count command state
// count command state
List < CommandCount > commandStateCounts =
List < CommandCount > commandStateCounts =
@ -278,18 +282,21 @@ public class DataAnalysisService {
// init data map
// init data map
// dataMap.put(ExecutionStatus.SUBMITTED_SUCCESS,commonCommand);
/ * *
// dataMap.put(ExecutionStatus.RUNNING_EXEUTION,commonCommand);
* START_PROCESS , START_CURRENT_TASK_PROCESS , RECOVER_TOLERANCE_FAULT_PROCESS , RECOVER_SUSPENDED_PROCESS ,
// dataMap.put(ExecutionStatus.READY_PAUSE,commonCommand);
START_FAILURE_TASK_PROCESS , COMPLEMENT_DATA , SCHEDULER , REPEAT_RUNNING , PAUSE , STOP , RECOVER_WAITTING_THREAD ;
// dataMap.put(ExecutionStatus.PAUSE,commonCommand);
* /
// dataMap.put(ExecutionStatus.READY_STOP,commonCommand);
dataMap . put ( CommandType . START_PROCESS , commonCommand ) ;
// dataMap.put(ExecutionStatus.STOP,commonCommand);
dataMap . put ( CommandType . START_CURRENT_TASK_PROCESS , commonCommand ) ;
// dataMap.put(ExecutionStatus.FAILURE,commonCommand);
dataMap . put ( CommandType . RECOVER_TOLERANCE_FAULT_PROCESS , commonCommand ) ;
// dataMap.put(ExecutionStatus.SUCCESS,commonCommand);
dataMap . put ( CommandType . RECOVER_SUSPENDED_PROCESS , commonCommand ) ;
// dataMap.put(ExecutionStatus.NEED_FAULT_TOLERANCE,commonCommand);
dataMap . put ( CommandType . START_FAILURE_TASK_PROCESS , commonCommand ) ;
// dataMap.put(ExecutionStatus.KILL,commonCommand);
dataMap . put ( CommandType . COMPLEMENT_DATA , commonCommand ) ;
// dataMap.put(ExecutionStatus.WAITTING_THREAD,commonCommand);
dataMap . put ( CommandType . SCHEDULER , commonCommand ) ;
// dataMap.put(ExecutionStatus.WAITTING_DEPEND,commonCommand);
dataMap . put ( CommandType . REPEAT_RUNNING , commonCommand ) ;
dataMap . put ( CommandType . PAUSE , commonCommand ) ;
dataMap . put ( CommandType . STOP , commonCommand ) ;
dataMap . put ( CommandType . RECOVER_WAITTING_THREAD , commonCommand ) ;
// put command state
// put command state
for ( CommandCount executeStatusCount : commandStateCounts ) {
for ( CommandCount executeStatusCount : commandStateCounts ) {