* update english documents * refactor zk client * update documents * update zkclient * update zkclient * update documents * add architecture-design * change i18n * update i18n * update english documents * add architecture-design * update english documents * update en-US documents * add architecture-design * update demo site * add mybatis plus model * modify mybatisplus * modify mybatisplus * change interface by mybatisplus * add unit test * refactor dao interface. * add unit test for dao... * add unit test for dao... * add unit test for dao... * Merge remote-tracking branch 'upstream/dev-db' into dev-db # Conflicts: # dolphinscheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProjectMapper.xml # dolphinscheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ScheduleMapper.xml # escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProcessInstanceMapper.xml # escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProjectUserMapper.xml # escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/QueueMapper.xml # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessInstanceMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProjectUserMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/QueueMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ResourceUserMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ScheduleMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/SessionMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/TenantMapperTest.java * Merge remote-tracking branch 'upstream/dev-db' into dev-db # Conflicts: # dolphinscheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProjectMapper.xml # dolphinscheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ScheduleMapper.xml # escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProcessInstanceMapper.xml # escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/ProjectUserMapper.xml # escheduler-dao/src/main/resources/cn.escheduler.dao.mapper/QueueMapper.xml # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProcessInstanceMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ProjectUserMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/QueueMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ResourceUserMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/ScheduleMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/SessionMapperTest.java # escheduler-dao/src/test/java/cn/escheduler/dao/mapper/TenantMapperTest.java * Merge remote-tracking branch 'upstream/dev-db' into dev-db # Conflicts: # dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProjectMapper.xml # dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ResourceMapper.xml # dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.xml * update some dao bugs * update for some bugs * update some bugs * Merge remote-tracking branch 'upstream/dev-db' into dev-db # Conflicts: # dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProjectMapper.xml # dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ResourceMapper.xml # dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/TaskInstanceMapper.xml * update * update * add multiply settings for application.yml * add multiply settings for application.yml * revert * update configuration settings in task record dao... * change application_master to application-master * change application_master to application-master * update application.yml to application.properties * revert * revert * add properties * add properties * revert * revert * add api start up.. add alert send try catch * update dao info level * fix bug: task cannot submit when recovery failover * fix bug: task cannot submit when recovery failover * merge from dev-db * revert * revert * fix bug: get process definition list failed. * fix bug: process instance interval is error * revert * revert
This commit is contained in:
parent
1452c1479d
commit
19ccd4f531
|
|
@ -893,11 +893,15 @@ public class ProcessDefinitionService extends BaseDAGService {
|
|||
public Map<String, Object> getTaskNodeListByDefinitionIdList(String defineIdList) throws Exception {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
|
||||
Map<Integer, List<TaskNode>> taskNodeMap = new HashMap<>();
|
||||
String[] idList = defineIdList.split(",");
|
||||
List<String> definitionIdList = Arrays.asList(idList);
|
||||
List<ProcessDefinition> processDefinitionList = processDefineMapper.queryDefinitionListByIdList( definitionIdList.toArray(new Integer[definitionIdList.size()]));
|
||||
List<Integer> idIntList = new ArrayList<>();
|
||||
for(String definitionId : definitionIdList) {
|
||||
idIntList.add(Integer.parseInt(definitionId));
|
||||
}
|
||||
Integer[] idArray = idIntList.toArray(new Integer[idIntList.size()]);
|
||||
List<ProcessDefinition> processDefinitionList = processDefineMapper.queryDefinitionListByIdList(idArray);
|
||||
if (processDefinitionList == null || processDefinitionList.size() ==0) {
|
||||
logger.info("process definition not exists");
|
||||
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, defineIdList);
|
||||
|
|
|
|||
|
|
@ -193,12 +193,10 @@ public class ProcessInstanceService extends BaseDAGService {
|
|||
processInstanceMapper.queryProcessInstanceListPaging(page,
|
||||
project.getId(), processDefineId, searchVal, statusArray, host, start, end);
|
||||
|
||||
for(ProcessInstance processInstance:processInstanceList.getRecords()){
|
||||
if (StringUtils.isNotEmpty(startDate)
|
||||
&& StringUtils.isNotEmpty(endDate)){
|
||||
processInstance.setDuration(DateUtils.differSec(processInstance.getStartTime(),processInstance.getEndTime()));
|
||||
}
|
||||
List<ProcessInstance> processInstances = processInstanceList.getRecords();
|
||||
|
||||
for(ProcessInstance processInstance: processInstances){
|
||||
processInstance.setDuration(DateUtils.differSec(processInstance.getStartTime(),processInstance.getEndTime()));
|
||||
}
|
||||
|
||||
Set<String> exclusionSet = new HashSet<String>(){{
|
||||
|
|
@ -210,7 +208,7 @@ public class ProcessInstanceService extends BaseDAGService {
|
|||
|
||||
PageInfo pageInfo = new PageInfo<ProcessInstance>(pageNo, pageSize);
|
||||
pageInfo.setTotalCount((int) processInstanceList.getTotal());
|
||||
pageInfo.setLists(CollectionUtils.getListByExclusion(processInstanceList.getRecords(), exclusionSet));
|
||||
pageInfo.setLists(CollectionUtils.getListByExclusion(processInstances, exclusionSet));
|
||||
result.put(Constants.DATA_LIST, pageInfo);
|
||||
putMsg(result, Status.SUCCESS);
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -901,6 +901,10 @@ public final class Constants {
|
|||
*/
|
||||
public static final String LOGIN_USER_KEY_TAB_PATH = "login.user.keytab.path";
|
||||
|
||||
/**
|
||||
* task log info format
|
||||
*/
|
||||
public static final String TASK_LOG_INFO_FORMAT = "TaskLogInfo-%s";
|
||||
|
||||
/**
|
||||
* hive conf
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class DependentTask extends AbstractTask {
|
|||
@Override
|
||||
public void handle(){
|
||||
// set the name of the current thread
|
||||
String threadLoggerInfoName = String.format("TaskLogInfo-%s", taskProps.getTaskAppId());
|
||||
String threadLoggerInfoName = String.format(Constants.TASK_LOG_INFO_FORMAT, taskProps.getTaskAppId());
|
||||
Thread.currentThread().setName(threadLoggerInfoName);
|
||||
|
||||
try{
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
package org.apache.dolphinscheduler.server.worker.task.http;
|
||||
|
||||
|
||||
import org.apache.dolphinscheduler.common.Constants;
|
||||
import org.apache.dolphinscheduler.common.enums.HttpMethod;
|
||||
import org.apache.dolphinscheduler.common.enums.HttpParametersType;
|
||||
import org.apache.dolphinscheduler.common.process.HttpProperty;
|
||||
|
|
@ -53,6 +54,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* http task
|
||||
*/
|
||||
|
|
@ -92,7 +94,7 @@ public class HttpTask extends AbstractTask {
|
|||
|
||||
@Override
|
||||
public void handle() throws Exception {
|
||||
String threadLoggerInfoName = String.format("TaskLogInfo-%s", taskProps.getTaskAppId());
|
||||
String threadLoggerInfoName = String.format(Constants.TASK_LOG_INFO_FORMAT, taskProps.getTaskAppId());
|
||||
Thread.currentThread().setName(threadLoggerInfoName);
|
||||
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
package org.apache.dolphinscheduler.server.worker.task.processdure;
|
||||
|
||||
import org.apache.dolphinscheduler.common.Constants;
|
||||
import org.apache.dolphinscheduler.common.enums.DataType;
|
||||
import org.apache.dolphinscheduler.common.enums.Direct;
|
||||
import org.apache.dolphinscheduler.common.enums.TaskTimeoutStrategy;
|
||||
|
|
@ -82,7 +83,7 @@ public class ProcedureTask extends AbstractTask {
|
|||
@Override
|
||||
public void handle() throws Exception {
|
||||
// set the name of the current thread
|
||||
String threadLoggerInfoName = String.format("TaskLogInfo-%s", taskProps.getTaskAppId());
|
||||
String threadLoggerInfoName = String.format(Constants.TASK_LOG_INFO_FORMAT, taskProps.getTaskAppId());
|
||||
Thread.currentThread().setName(threadLoggerInfoName);
|
||||
|
||||
logger.info("processdure type : {}, datasource : {}, method : {} , localParams : {}",
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import com.alibaba.fastjson.serializer.SerializerFeature;
|
|||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.EnumUtils;
|
||||
import org.apache.dolphinscheduler.alert.utils.MailUtils;
|
||||
import org.apache.dolphinscheduler.common.Constants;
|
||||
import org.apache.dolphinscheduler.common.enums.ShowType;
|
||||
import org.apache.dolphinscheduler.common.enums.TaskTimeoutStrategy;
|
||||
import org.apache.dolphinscheduler.common.enums.UdfType;
|
||||
|
|
@ -103,7 +104,7 @@ public class SqlTask extends AbstractTask {
|
|||
@Override
|
||||
public void handle() throws Exception {
|
||||
// set the name of the current thread
|
||||
String threadLoggerInfoName = String.format("TaskLogInfo-%s", taskProps.getTaskAppId());
|
||||
String threadLoggerInfoName = String.format(Constants.TASK_LOG_INFO_FORMAT, taskProps.getTaskAppId());
|
||||
Thread.currentThread().setName(threadLoggerInfoName);
|
||||
logger.info(sqlParameters.toString());
|
||||
logger.info("sql type : {}, datasource : {}, sql : {} , localParams : {},udfs : {},showType : {},connParams : {}",
|
||||
|
|
|
|||
Loading…
Reference in New Issue