From ed04835c952b01b621f55ed669e832ffae763e37 Mon Sep 17 00:00:00 2001 From: qiaozhanwei Date: Tue, 8 Oct 2019 18:31:24 +0800 Subject: [PATCH] running through the big process error modify (#962) * add ConnectionFactoryTest and ConnectionFactory read datasource from appliction.yml * .escheduler_env.sh to dolphinscheduler_env.sh * dao yml assembly to conf directory * table name modify * entity title table name modify * logback log name modify * running through the big process * running through the big process error modify --- .../api/service/ProcessInstanceService.java | 8 ++++++-- .../apache/dolphinscheduler/server/zk/ZKMasterClient.java | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessInstanceService.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessInstanceService.java index 05cb9d5830..2239646787 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessInstanceService.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/ProcessInstanceService.java @@ -194,7 +194,11 @@ public class ProcessInstanceService extends BaseDAGService { project.getId(), processDefineId, searchVal, statusArray, host, start, end); for(ProcessInstance processInstance:processInstanceList.getRecords()){ - processInstance.setDuration(DateUtils.differSec(processInstance.getStartTime(),processInstance.getEndTime())); + if (StringUtils.isNotEmpty(startDate) + && StringUtils.isNotEmpty(endDate)){ + processInstance.setDuration(DateUtils.differSec(processInstance.getStartTime(),processInstance.getEndTime())); + } + } Set exclusionSet = new HashSet(){{ @@ -205,7 +209,7 @@ public class ProcessInstanceService extends BaseDAGService { }}; PageInfo pageInfo = new PageInfo(pageNo, pageSize); - pageInfo.setTotalCount((int)processInstanceList.getTotal()); + pageInfo.setTotalCount((int) processInstanceList.getTotal()); pageInfo.setLists(CollectionUtils.getListByExclusion(processInstanceList.getRecords(), exclusionSet)); result.put(Constants.DATA_LIST, pageInfo); putMsg(result, Status.SUCCESS); diff --git a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java index af2f25b9aa..758e29bd5c 100644 --- a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java +++ b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/zk/ZKMasterClient.java @@ -141,7 +141,7 @@ public class ZKMasterClient extends AbstractZKClient { */ public void initDao(){ this.alertDao = DaoFactory.getDaoInstance(AlertDao.class); - this.processDao = DaoFactory.getDaoInstance(ProcessDao.class); +// this.processDao = DaoFactory.getDaoInstance(ProcessDao.class); } /** * get alert dao