status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
unknown
language
stringclasses
5 values
commit_datetime
unknown
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
import org.apache.dolphinscheduler.dao.entity.Schedule; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.UdfFunc; import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.CommandMapper; import org.apache.dolphinscheduler.dao.mapper.DataSourceMapper; import org.apache.dolphinscheduler.dao.mapper.ErrorCommandMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.ResourceMapper; import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper; import org.apache.dolphinscheduler.dao.mapper.TaskInstanceMapper; import org.apache.dolphinscheduler.dao.mapper.TenantMapper; import org.apache.dolphinscheduler.dao.mapper.UdfFuncMapper; import org.apache.dolphinscheduler.dao.mapper.UserMapper; import org.apache.dolphinscheduler.remote.utils.Host; import org.apache.dolphinscheduler.service.log.LogClientService; import org.apache.dolphinscheduler.service.quartz.cron.CronUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
import java.util.Set; import java.util.stream.Collectors; import org.quartz.CronExpression; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import com.cronutils.model.Cron; import com.fasterxml.jackson.databind.node.ObjectNode; /** * process relative dao that some mappers in this. */ @Component public class ProcessService { private final Logger logger = LoggerFactory.getLogger(getClass()); private final int[] stateArray = new int[] {ExecutionStatus.SUBMITTED_SUCCESS.ordinal(), ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.DELAY_EXECUTION.ordinal(), ExecutionStatus.READY_PAUSE.ordinal(), ExecutionStatus.READY_STOP.ordinal()}; @Autowired private UserMapper userMapper; @Autowired private ProcessDefinitionMapper processDefineMapper; @Autowired private ProcessInstanceMapper processInstanceMapper; @Autowired private DataSourceMapper dataSourceMapper; @Autowired
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
private ProcessInstanceMapMapper processInstanceMapMapper; @Autowired private TaskInstanceMapper taskInstanceMapper; @Autowired private CommandMapper commandMapper; @Autowired private ScheduleMapper scheduleMapper; @Autowired private UdfFuncMapper udfFuncMapper; @Autowired private ResourceMapper resourceMapper; @Autowired private ErrorCommandMapper errorCommandMapper; @Autowired private TenantMapper tenantMapper; @Autowired private ProjectMapper projectMapper; /** * handle Command (construct ProcessInstance from Command) , wrapped in transaction * * @param logger logger * @param host host * @param validThreadNum validThreadNum * @param command found command * @return process instance */ @Transactional(rollbackFor = Exception.class) public ProcessInstance handleCommand(Logger logger, String host, int validThreadNum, Command command) { ProcessInstance processInstance = constructProcessInstance(command, host);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if (processInstance == null) { logger.error("scan command, command parameter is error: {}", command); moveToErrorCommand(command, "process instance is null"); return null; } if (!checkThreadNum(command, validThreadNum)) { logger.info("there is not enough thread for this command: {}", command); return setWaitingThreadProcess(command, processInstance); } processInstance.setCommandType(command.getCommandType()); processInstance.addHistoryCmd(command.getCommandType()); saveProcessInstance(processInstance); this.setSubProcessParam(processInstance); delCommandById(command.getId()); return processInstance; } /** * save error command, and delete original command * * @param command command * @param message message */ @Transactional(rollbackFor = Exception.class) public void moveToErrorCommand(Command command, String message) { ErrorCommand errorCommand = new ErrorCommand(command, message); this.errorCommandMapper.insert(errorCommand); delCommandById(command.getId()); } /** * set process waiting thread
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* * @param command command * @param processInstance processInstance * @return process instance */ private ProcessInstance setWaitingThreadProcess(Command command, ProcessInstance processInstance) { processInstance.setState(ExecutionStatus.WAITTING_THREAD); if (command.getCommandType() != CommandType.RECOVER_WAITTING_THREAD) { processInstance.addHistoryCmd(command.getCommandType()); } saveProcessInstance(processInstance); this.setSubProcessParam(processInstance); createRecoveryWaitingThreadCommand(command, processInstance); return null; } /** * check thread num * * @param command command * @param validThreadNum validThreadNum * @return if thread is enough */ private boolean checkThreadNum(Command command, int validThreadNum) { int commandThreadCount = this.workProcessThreadNumCount(command.getProcessDefinitionId()); return validThreadNum >= commandThreadCount; } /** * insert one command * * @param command command
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return create result */ public int createCommand(Command command) { int result = 0; if (command != null) { result = commandMapper.insert(command); } return result; } /** * find one command from queue list * * @return command */ public Command findOneCommand() { return commandMapper.getOneToRun(); } /** * check the input command exists in queue list * * @param command command * @return create command result */ public Boolean verifyIsNeedCreateCommand(Command command) { Boolean isNeedCreate = true; Map<CommandType, Integer> cmdTypeMap = new HashMap<CommandType, Integer>(); cmdTypeMap.put(CommandType.REPEAT_RUNNING, 1); cmdTypeMap.put(CommandType.RECOVER_SUSPENDED_PROCESS, 1); cmdTypeMap.put(CommandType.START_FAILURE_TASK_PROCESS, 1); CommandType commandType = command.getCommandType();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if (cmdTypeMap.containsKey(commandType)) { ObjectNode cmdParamObj = JSONUtils.parseObject(command.getCommandParam()); int processInstanceId = cmdParamObj.path(CMD_PARAM_RECOVER_PROCESS_ID_STRING).asInt(); List<Command> commands = commandMapper.selectList(null); for (Command tmpCommand : commands) { if (cmdTypeMap.containsKey(tmpCommand.getCommandType())) { ObjectNode tempObj = JSONUtils.parseObject(tmpCommand.getCommandParam()); if (tempObj != null && processInstanceId == tempObj.path(CMD_PARAM_RECOVER_PROCESS_ID_STRING).asInt()) { isNeedCreate = false; break; } } } } return isNeedCreate; } /** * find process instance detail by id * * @param processId processId * @return process instance */ public ProcessInstance findProcessInstanceDetailById(int processId) { return processInstanceMapper.queryDetailById(processId); } /** * get task node list by definitionId * * @param defineId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return */ public List<TaskNode> getTaskNodeListByDefinitionId(Integer defineId) { ProcessDefinition processDefinition = processDefineMapper.selectById(defineId); if (processDefinition == null) { logger.info("process define not exists"); return null; } String processDefinitionJson = processDefinition.getProcessDefinitionJson(); ProcessData processData = JSONUtils.parseObject(processDefinitionJson, ProcessData.class); if (null == processData) { logger.error("process data is null"); return new ArrayList<>(); } return processData.getTasks(); } /** * find process instance by id * * @param processId processId * @return process instance */ public ProcessInstance findProcessInstanceById(int processId) { return processInstanceMapper.selectById(processId); } /** * find process define by id. * * @param processDefinitionId processDefinitionId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return process definition */ public ProcessDefinition findProcessDefineById(int processDefinitionId) { return processDefineMapper.selectById(processDefinitionId); } /** * delete work process instance by id * * @param processInstanceId processInstanceId * @return delete process instance result */ public int deleteWorkProcessInstanceById(int processInstanceId) { return processInstanceMapper.deleteById(processInstanceId); } /** * delete all sub process by parent instance id * * @param processInstanceId processInstanceId * @return delete all sub process instance result */ public int deleteAllSubWorkProcessByParentId(int processInstanceId) { List<Integer> subProcessIdList = processInstanceMapMapper.querySubIdListByParentId(processInstanceId); for (Integer subId : subProcessIdList) { deleteAllSubWorkProcessByParentId(subId); deleteWorkProcessMapByParentId(subId); removeTaskLogFile(subId); deleteWorkProcessInstanceById(subId); } return 1; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
/** * remove task log file * * @param processInstanceId processInstanceId */ public void removeTaskLogFile(Integer processInstanceId) { LogClientService logClient = null; try { logClient = new LogClientService(); List<TaskInstance> taskInstanceList = findValidTaskListByProcessId(processInstanceId); if (CollectionUtils.isEmpty(taskInstanceList)) { return; } for (TaskInstance taskInstance : taskInstanceList) { String taskLogPath = taskInstance.getLogPath(); if (StringUtils.isEmpty(taskInstance.getHost())) { continue; } int port = Constants.RPC_PORT; String ip = ""; try { ip = Host.of(taskInstance.getHost()).getIp(); } catch (Exception e) { ip = taskInstance.getHost(); } logClient.removeTaskLog(ip, port, taskLogPath); } } finally {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if (logClient != null) { logClient.close(); } } } /** * calculate sub process number in the process define. * * @param processDefinitionId processDefinitionId * @return process thread num count */ private Integer workProcessThreadNumCount(Integer processDefinitionId) { List<Integer> ids = new ArrayList<>(); recurseFindSubProcessId(processDefinitionId, ids); return ids.size() + 1; } /** * recursive query sub process definition id by parent id. * * @param parentId parentId * @param ids ids */ public void recurseFindSubProcessId(int parentId, List<Integer> ids) { ProcessDefinition processDefinition = processDefineMapper.selectById(parentId); String processDefinitionJson = processDefinition.getProcessDefinitionJson(); ProcessData processData = JSONUtils.parseObject(processDefinitionJson, ProcessData.class); List<TaskNode> taskNodeList = processData.getTasks(); if (taskNodeList != null && taskNodeList.size() > 0) { for (TaskNode taskNode : taskNodeList) { String parameter = taskNode.getParams();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
ObjectNode parameterJson = JSONUtils.parseObject(parameter); if (parameterJson.get(CMD_PARAM_SUB_PROCESS_DEFINE_ID) != null) { SubProcessParameters subProcessParam = JSONUtils.parseObject(parameter, SubProcessParameters.class); ids.add(subProcessParam.getProcessDefinitionId()); recurseFindSubProcessId(subProcessParam.getProcessDefinitionId(), ids); } } } } /** * create recovery waiting thread command when thread pool is not enough for the process instance. * sub work process instance need not to create recovery command. * create recovery waiting thread command and delete origin command at the same time. * if the recovery command is exists, only update the field update_time * * @param originCommand originCommand * @param processInstance processInstance */ public void createRecoveryWaitingThreadCommand(Command originCommand, ProcessInstance processInstance) { if (processInstance.getIsSubProcess() == Flag.YES) { if (originCommand != null) { commandMapper.deleteById(originCommand.getId()); } return; } Map<String, String> cmdParam = new HashMap<>(); cmdParam.put(Constants.CMD_PARAM_RECOVERY_WAITING_THREAD, String.valueOf(processInstance.getId())); if (originCommand == null) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
Command command = new Command( CommandType.RECOVER_WAITTING_THREAD, processInstance.getTaskDependType(), processInstance.getFailureStrategy(), processInstance.getExecutorId(), processInstance.getProcessDefinitionId(), JSONUtils.toJsonString(cmdParam), processInstance.getWarningType(), processInstance.getWarningGroupId(), processInstance.getScheduleTime(), processInstance.getWorkerGroup(), processInstance.getProcessInstancePriority() ); saveCommand(command); return; } if (originCommand.getCommandType() == CommandType.RECOVER_WAITTING_THREAD) { originCommand.setUpdateTime(new Date()); saveCommand(originCommand); } else { commandMapper.deleteById(originCommand.getId()); originCommand.setId(0); originCommand.setCommandType(CommandType.RECOVER_WAITTING_THREAD); originCommand.setUpdateTime(new Date()); originCommand.setCommandParam(JSONUtils.toJsonString(cmdParam)); originCommand.setProcessInstancePriority(processInstance.getProcessInstancePriority()); saveCommand(originCommand); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} /** * get schedule time from command * * @param command command * @param cmdParam cmdParam map * @return date */ private Date getScheduleTime(Command command, Map<String, String> cmdParam) { Date scheduleTime = command.getScheduleTime(); if (scheduleTime == null) { if (cmdParam != null && cmdParam.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)) { scheduleTime = DateUtils.stringToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE)); } } return scheduleTime; } /** * generate a new work process instance from command. * * @param processDefinition processDefinition * @param command command * @param cmdParam cmdParam map * @return process instance */ private ProcessInstance generateNewProcessInstance(ProcessDefinition processDefinition, Command command, Map<String, String> cmdParam) { ProcessInstance processInstance = new ProcessInstance(processDefinition); processInstance.setState(ExecutionStatus.RUNNING_EXECUTION);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
processInstance.setRecovery(Flag.NO); processInstance.setStartTime(new Date()); processInstance.setRunTimes(1); processInstance.setMaxTryTimes(0); processInstance.setProcessDefinitionId(command.getProcessDefinitionId()); processInstance.setCommandParam(command.getCommandParam()); processInstance.setCommandType(command.getCommandType()); processInstance.setIsSubProcess(Flag.NO); processInstance.setTaskDependType(command.getTaskDependType()); processInstance.setFailureStrategy(command.getFailureStrategy()); processInstance.setExecutorId(command.getExecutorId()); WarningType warningType = command.getWarningType() == null ? WarningType.NONE : command.getWarningType(); processInstance.setWarningType(warningType); Integer warningGroupId = command.getWarningGroupId() == null ? 0 : command.getWarningGroupId(); processInstance.setWarningGroupId(warningGroupId); Date scheduleTime = getScheduleTime(command, cmdParam); if (scheduleTime != null) { processInstance.setScheduleTime(scheduleTime); } processInstance.setCommandStartTime(command.getStartTime()); processInstance.setLocations(processDefinition.getLocations()); processInstance.setConnects(processDefinition.getConnects()); processInstance.setGlobalParams(ParameterUtils.curingGlobalParams( processDefinition.getGlobalParamMap(), processDefinition.getGlobalParamList(), getCommandTypeIfComplement(processInstance, command), processInstance.getScheduleTime()));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
processInstance.setProcessInstanceJson(processDefinition.getProcessDefinitionJson()); processInstance.setProcessInstancePriority(command.getProcessInstancePriority()); String workerGroup = StringUtils.isBlank(command.getWorkerGroup()) ? Constants.DEFAULT_WORKER_GROUP : command.getWorkerGroup(); processInstance.setWorkerGroup(workerGroup); processInstance.setTimeout(processDefinition.getTimeout()); processInstance.setTenantId(processDefinition.getTenantId()); return processInstance; } /** * get process tenant * there is tenant id in definition, use the tenant of the definition. * if there is not tenant id in the definiton or the tenant not exist * use definition creator's tenant. * * @param tenantId tenantId * @param userId userId * @return tenant */ public Tenant getTenantForProcess(int tenantId, int userId) { Tenant tenant = null; if (tenantId >= 0) { tenant = tenantMapper.queryById(tenantId); } if (userId == 0) { return null; } if (tenant == null) { User user = userMapper.selectById(userId); tenant = tenantMapper.queryById(user.getTenantId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} return tenant; } /** * check command parameters is valid * * @param command command * @param cmdParam cmdParam map * @return whether command param is valid */ private Boolean checkCmdParam(Command command, Map<String, String> cmdParam) { if (command.getTaskDependType() == TaskDependType.TASK_ONLY || command.getTaskDependType() == TaskDependType.TASK_PRE) { if (cmdParam == null || !cmdParam.containsKey(Constants.CMD_PARAM_START_NODE_NAMES) || cmdParam.get(Constants.CMD_PARAM_START_NODE_NAMES).isEmpty()) { logger.error("command node depend type is {}, but start nodes is null ", command.getTaskDependType()); return false; } } return true; } /** * construct process instance according to one command. * * @param command command * @param host host * @return process instance */ private ProcessInstance constructProcessInstance(Command command, String host) { ProcessInstance processInstance = null;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
CommandType commandType = command.getCommandType(); Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam()); ProcessDefinition processDefinition = null; if (command.getProcessDefinitionId() != 0) { processDefinition = processDefineMapper.selectById(command.getProcessDefinitionId()); if (processDefinition == null) { logger.error("cannot find the work process define! define id : {}", command.getProcessDefinitionId()); return null; } } if (cmdParam != null) { Integer processInstanceId = 0; if (cmdParam.containsKey(Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING)) { String processId = cmdParam.get(Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING); processInstanceId = Integer.parseInt(processId); if (processInstanceId == 0) { logger.error("command parameter is error, [ ProcessInstanceId ] is 0"); return null; } } else if (cmdParam.containsKey(Constants.CMD_PARAM_SUB_PROCESS)) { String pId = cmdParam.get(Constants.CMD_PARAM_SUB_PROCESS); processInstanceId = Integer.parseInt(pId); } else if (cmdParam.containsKey(Constants.CMD_PARAM_RECOVERY_WAITING_THREAD)) { String pId = cmdParam.get(Constants.CMD_PARAM_RECOVERY_WAITING_THREAD); processInstanceId = Integer.parseInt(pId); } if (processInstanceId == 0) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
processInstance = generateNewProcessInstance(processDefinition, command, cmdParam); } else { processInstance = this.findProcessInstanceDetailById(processInstanceId); } processDefinition = processDefineMapper.selectById(processInstance.getProcessDefinitionId()); processInstance.setProcessDefinition(processDefinition); if (processInstance.getCommandParam() != null) { Map<String, String> processCmdParam = JSONUtils.toMap(processInstance.getCommandParam()); for (Map.Entry<String, String> entry : processCmdParam.entrySet()) { if (!cmdParam.containsKey(entry.getKey())) { cmdParam.put(entry.getKey(), entry.getValue()); } } } if (cmdParam.containsKey(Constants.CMD_PARAM_SUB_PROCESS)) { processInstance.setCommandParam(command.getCommandParam()); } } else { processInstance = generateNewProcessInstance(processDefinition, command, cmdParam); } if (!checkCmdParam(command, cmdParam)) { logger.error("command parameter check failed!"); return null; } if (command.getScheduleTime() != null) { processInstance.setScheduleTime(command.getScheduleTime()); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
processInstance.setHost(host); ExecutionStatus runStatus = ExecutionStatus.RUNNING_EXECUTION; int runTime = processInstance.getRunTimes(); switch (commandType) { case START_PROCESS: break; case START_FAILURE_TASK_PROCESS: List<Integer> failedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.FAILURE); List<Integer> toleranceList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.NEED_FAULT_TOLERANCE); List<Integer> killedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.KILL); cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING); failedList.addAll(killedList); failedList.addAll(toleranceList); for (Integer taskId : failedList) { initTaskInstance(this.findTaskInstanceById(taskId)); } cmdParam.put(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING, String.join(Constants.COMMA, convertIntListToString(failedList))); processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam)); processInstance.setRunTimes(runTime + 1); break; case START_CURRENT_TASK_PROCESS: break; case RECOVER_WAITTING_THREAD: break; case RECOVER_SUSPENDED_PROCESS: cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING); List<Integer> suspendedNodeList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.PAUSE);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
List<Integer> stopNodeList = findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.KILL); suspendedNodeList.addAll(stopNodeList); for (Integer taskId : suspendedNodeList) { initTaskInstance(this.findTaskInstanceById(taskId)); } cmdParam.put(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING, String.join(",", convertIntListToString(suspendedNodeList))); processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam)); processInstance.setRunTimes(runTime + 1); break; case RECOVER_TOLERANCE_FAULT_PROCESS: processInstance.setRecovery(Flag.YES); runStatus = processInstance.getState(); break; case COMPLEMENT_DATA: List<TaskInstance> taskInstanceList = this.findValidTaskListByProcessId(processInstance.getId()); for (TaskInstance taskInstance : taskInstanceList) { taskInstance.setFlag(Flag.NO); this.updateTaskInstance(taskInstance); } initComplementDataParam(processDefinition, processInstance, cmdParam); break; case REPEAT_RUNNING: if (cmdParam.containsKey(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING)) { cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING); processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} List<TaskInstance> validTaskList = findValidTaskListByProcessId(processInstance.getId()); for (TaskInstance taskInstance : validTaskList) { taskInstance.setFlag(Flag.NO); updateTaskInstance(taskInstance); } processInstance.setStartTime(new Date()); processInstance.setEndTime(null); processInstance.setRunTimes(runTime + 1); initComplementDataParam(processDefinition, processInstance, cmdParam); break; case SCHEDULER: break; default: break; } processInstance.setState(runStatus); return processInstance; } /** * return complement data if the process start with complement data * * @param processInstance processInstance * @param command command * @return command type */ private CommandType getCommandTypeIfComplement(ProcessInstance processInstance, Command command) { if (CommandType.COMPLEMENT_DATA == processInstance.getCmdTypeIfComplement()) { return CommandType.COMPLEMENT_DATA;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} else { return command.getCommandType(); } } /** * initialize complement data parameters * * @param processDefinition processDefinition * @param processInstance processInstance * @param cmdParam cmdParam */ private void initComplementDataParam(ProcessDefinition processDefinition, ProcessInstance processInstance, Map<String, String> cmdParam) { if (!processInstance.isComplementData()) { return; } Date startComplementTime = DateUtils.parse(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE), YYYY_MM_DD_HH_MM_SS); if (Flag.NO == processInstance.getIsSubProcess()) { processInstance.setScheduleTime(startComplementTime); } processInstance.setGlobalParams(ParameterUtils.curingGlobalParams( processDefinition.getGlobalParamMap(), processDefinition.getGlobalParamList(), CommandType.COMPLEMENT_DATA, processInstance.getScheduleTime())); } /** * set sub work process parameters. * handle sub work process instance, update relation table and command parameters
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* set sub work process flag, extends parent work process command parameters * * @param subProcessInstance subProcessInstance * @return process instance */ public ProcessInstance setSubProcessParam(ProcessInstance subProcessInstance) { String cmdParam = subProcessInstance.getCommandParam(); if (StringUtils.isEmpty(cmdParam)) { return subProcessInstance; } Map<String, String> paramMap = JSONUtils.toMap(cmdParam); if (paramMap.containsKey(CMD_PARAM_SUB_PROCESS) && CMD_PARAM_EMPTY_SUB_PROCESS.equals(paramMap.get(CMD_PARAM_SUB_PROCESS))) { paramMap.remove(CMD_PARAM_SUB_PROCESS); paramMap.put(CMD_PARAM_SUB_PROCESS, String.valueOf(subProcessInstance.getId())); subProcessInstance.setCommandParam(JSONUtils.toJsonString(paramMap)); subProcessInstance.setIsSubProcess(Flag.YES); this.saveProcessInstance(subProcessInstance); } String parentInstanceId = paramMap.get(CMD_PARAM_SUB_PROCESS_PARENT_INSTANCE_ID); if (StringUtils.isNotEmpty(parentInstanceId)) { ProcessInstance parentInstance = findProcessInstanceDetailById(Integer.parseInt(parentInstanceId)); if (parentInstance != null) { subProcessInstance.setGlobalParams( joinGlobalParams(parentInstance.getGlobalParams(), subProcessInstance.getGlobalParams())); this.saveProcessInstance(subProcessInstance); } else { logger.error("sub process command params error, cannot find parent instance: {} ", cmdParam);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} } ProcessInstanceMap processInstanceMap = JSONUtils.parseObject(cmdParam, ProcessInstanceMap.class); if (processInstanceMap == null || processInstanceMap.getParentProcessInstanceId() == 0) { return subProcessInstance; } processInstanceMap.setProcessInstanceId(subProcessInstance.getId()); this.updateWorkProcessInstanceMap(processInstanceMap); return subProcessInstance; } /** * join parent global params into sub process. * only the keys doesn't in sub process global would be joined. * * @param parentGlobalParams parentGlobalParams * @param subGlobalParams subGlobalParams * @return global params join */ private String joinGlobalParams(String parentGlobalParams, String subGlobalParams) { List<Property> parentPropertyList = JSONUtils.toList(parentGlobalParams, Property.class); List<Property> subPropertyList = JSONUtils.toList(subGlobalParams, Property.class); Map<String, String> subMap = subPropertyList.stream().collect(Collectors.toMap(Property::getProp, Property::getValue)); for (Property parent : parentPropertyList) { if (!subMap.containsKey(parent.getProp())) { subPropertyList.add(parent); } } return JSONUtils.toJsonString(subPropertyList); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
/** * initialize task instance * * @param taskInstance taskInstance */ private void initTaskInstance(TaskInstance taskInstance) { if (!taskInstance.isSubProcess()) { if (taskInstance.getState().typeIsCancel() || taskInstance.getState().typeIsFailure()) { taskInstance.setFlag(Flag.NO); updateTaskInstance(taskInstance); return; } } taskInstance.setState(ExecutionStatus.SUBMITTED_SUCCESS); updateTaskInstance(taskInstance); } /** * submit task to db * submit sub process to command * * @param taskInstance taskInstance * @return task instance */ @Transactional(rollbackFor = Exception.class) public TaskInstance submitTask(TaskInstance taskInstance) { ProcessInstance processInstance = this.findProcessInstanceDetailById(taskInstance.getProcessInstanceId()); logger.info("start submit task : {}, instance id:{}, state: {}", taskInstance.getName(), taskInstance.getProcessInstanceId(), processInstance.getState()); TaskInstance task = submitTaskInstanceToDB(taskInstance, processInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if (task == null) { logger.error("end submit task to db error, task name:{}, process id:{} state: {} ", taskInstance.getName(), taskInstance.getProcessInstance(), processInstance.getState()); return task; } if (!task.getState().typeIsFinished()) { createSubWorkProcess(processInstance, task); } logger.info("end submit task to db successfully:{} state:{} complete, instance id:{} state: {} ", taskInstance.getName(), task.getState(), processInstance.getId(), processInstance.getState()); return task; } /** * set work process instance map * consider o * repeat running does not generate new sub process instance * set map {parent instance id, task instance id, 0(child instance id)} * * @param parentInstance parentInstance * @param parentTask parentTask * @return process instance map */ private ProcessInstanceMap setProcessInstanceMap(ProcessInstance parentInstance, TaskInstance parentTask) { ProcessInstanceMap processMap = findWorkProcessMapByParent(parentInstance.getId(), parentTask.getId()); if (processMap != null) { return processMap; } if (parentInstance.getCommandType() == CommandType.REPEAT_RUNNING) { processMap = findPreviousTaskProcessMap(parentInstance, parentTask);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if (processMap != null) { processMap.setParentTaskInstanceId(parentTask.getId()); updateWorkProcessInstanceMap(processMap); return processMap; } } processMap = new ProcessInstanceMap(); processMap.setParentProcessInstanceId(parentInstance.getId()); processMap.setParentTaskInstanceId(parentTask.getId()); createWorkProcessInstanceMap(processMap); return processMap; } /** * find previous task work process map. * * @param parentProcessInstance parentProcessInstance * @param parentTask parentTask * @return process instance map */ private ProcessInstanceMap findPreviousTaskProcessMap(ProcessInstance parentProcessInstance, TaskInstance parentTask) { Integer preTaskId = 0; List<TaskInstance> preTaskList = this.findPreviousTaskListByWorkProcessId(parentProcessInstance.getId()); for (TaskInstance task : preTaskList) { if (task.getName().equals(parentTask.getName())) { preTaskId = task.getId(); ProcessInstanceMap map = findWorkProcessMapByParent(parentProcessInstance.getId(), preTaskId); if (map != null) { return map;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} } } logger.info("sub process instance is not found,parent task:{},parent instance:{}", parentTask.getId(), parentProcessInstance.getId()); return null; } /** * create sub work process command * * @param parentProcessInstance parentProcessInstance * @param task task */ public void createSubWorkProcess(ProcessInstance parentProcessInstance, TaskInstance task) { if (!task.isSubProcess()) { return; } ProcessInstanceMap instanceMap = findWorkProcessMapByParent(parentProcessInstance.getId(), task.getId()); if (null != instanceMap && CommandType.RECOVER_TOLERANCE_FAULT_PROCESS == parentProcessInstance.getCommandType()) { return; } instanceMap = setProcessInstanceMap(parentProcessInstance, task); ProcessInstance childInstance = null; if (instanceMap.getProcessInstanceId() != 0) { childInstance = findProcessInstanceById(instanceMap.getProcessInstanceId()); } Command subProcessCommand = createSubProcessCommand(parentProcessInstance, childInstance, instanceMap, task); updateSubProcessDefinitionByParent(parentProcessInstance, subProcessCommand.getProcessDefinitionId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
initSubInstanceState(childInstance); createCommand(subProcessCommand); logger.info("sub process command created: {} ", subProcessCommand); } /** * complement data needs transform parent parameter to child. * * @param instanceMap * @param parentProcessInstance * @return */ private String getSubWorkFlowParam(ProcessInstanceMap instanceMap, ProcessInstance parentProcessInstance) { String processMapStr = JSONUtils.toJsonString(instanceMap); Map<String, String> cmdParam = JSONUtils.toMap(processMapStr); if (parentProcessInstance.isComplementData()) { Map<String, String> parentParam = JSONUtils.toMap(parentProcessInstance.getCommandParam()); String endTime = parentParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE); String startTime = parentParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE); cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, endTime); cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, startTime); processMapStr = JSONUtils.toJsonString(cmdParam); } return processMapStr; } /** * create sub work process command * * @param parentProcessInstance * @param childInstance
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param instanceMap * @param task */ public Command createSubProcessCommand(ProcessInstance parentProcessInstance, ProcessInstance childInstance, ProcessInstanceMap instanceMap, TaskInstance task) { CommandType commandType = getSubCommandType(parentProcessInstance, childInstance); TaskNode taskNode = JSONUtils.parseObject(task.getTaskJson(), TaskNode.class); Map<String, String> subProcessParam = JSONUtils.toMap(taskNode.getParams()); Integer childDefineId = Integer.parseInt(subProcessParam.get(Constants.CMD_PARAM_SUB_PROCESS_DEFINE_ID)); String processParam = getSubWorkFlowParam(instanceMap, parentProcessInstance); return new Command( commandType, TaskDependType.TASK_POST, parentProcessInstance.getFailureStrategy(), parentProcessInstance.getExecutorId(), childDefineId, processParam, parentProcessInstance.getWarningType(), parentProcessInstance.getWarningGroupId(), parentProcessInstance.getScheduleTime(), task.getWorkerGroup(), parentProcessInstance.getProcessInstancePriority() ); } /** * initialize sub work flow state * child instance state would be initialized when 'recovery from pause/stop/failure' *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param childInstance */ private void initSubInstanceState(ProcessInstance childInstance) { if (childInstance != null) { childInstance.setState(ExecutionStatus.RUNNING_EXECUTION); updateProcessInstance(childInstance); } } /** * get sub work flow command type * child instance exist: child command = fatherCommand * child instance not exists: child command = fatherCommand[0] * * @param parentProcessInstance * @return */ private CommandType getSubCommandType(ProcessInstance parentProcessInstance, ProcessInstance childInstance) { CommandType commandType = parentProcessInstance.getCommandType(); if (childInstance == null) { String fatherHistoryCommand = parentProcessInstance.getHistoryCmd(); commandType = CommandType.valueOf(fatherHistoryCommand.split(Constants.COMMA)[0]); } return commandType; } /** * update sub process definition * * @param parentProcessInstance parentProcessInstance * @param childDefinitionId childDefinitionId */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
private void updateSubProcessDefinitionByParent(ProcessInstance parentProcessInstance, int childDefinitionId) { ProcessDefinition fatherDefinition = this.findProcessDefineById(parentProcessInstance.getProcessDefinitionId()); ProcessDefinition childDefinition = this.findProcessDefineById(childDefinitionId); if (childDefinition != null && fatherDefinition != null) { childDefinition.setReceivers(fatherDefinition.getReceivers()); childDefinition.setReceiversCc(fatherDefinition.getReceiversCc()); processDefineMapper.updateById(childDefinition); } } /** * submit task to mysql * * @param taskInstance taskInstance * @param processInstance processInstance * @return task instance */ public TaskInstance submitTaskInstanceToDB(TaskInstance taskInstance, ProcessInstance processInstance) { ExecutionStatus processInstanceState = processInstance.getState(); if (taskInstance.getState().typeIsFailure()) { if (taskInstance.isSubProcess()) { taskInstance.setRetryTimes(taskInstance.getRetryTimes() + 1); } else { if (processInstanceState != ExecutionStatus.READY_STOP && processInstanceState != ExecutionStatus.READY_PAUSE) { taskInstance.setFlag(Flag.NO); updateTaskInstance(taskInstance); if (taskInstance.getState() != ExecutionStatus.NEED_FAULT_TOLERANCE) { taskInstance.setRetryTimes(taskInstance.getRetryTimes() + 1);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} taskInstance.setSubmitTime(null); taskInstance.setStartTime(null); taskInstance.setEndTime(null); taskInstance.setFlag(Flag.YES); taskInstance.setHost(null); taskInstance.setId(0); } } } taskInstance.setExecutorId(processInstance.getExecutorId()); taskInstance.setProcessInstancePriority(processInstance.getProcessInstancePriority()); taskInstance.setState(getSubmitTaskState(taskInstance, processInstanceState)); if (taskInstance.getSubmitTime() == null) { taskInstance.setSubmitTime(new Date()); } if (taskInstance.getFirstSubmitTime() == null) { taskInstance.setFirstSubmitTime(taskInstance.getSubmitTime()); } boolean saveResult = saveTaskInstance(taskInstance); if (!saveResult) { return null; } return taskInstance; } /** * ${processInstancePriority}_${processInstanceId}_${taskInstancePriority}_${taskInstanceId}_${task executed by ip1},${ip2}... * The tasks with the highest priority are selected by comparing the priorities of the above four levels from high to low. * * @param taskInstance taskInstance
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return task zk queue str */ public String taskZkInfo(TaskInstance taskInstance) { String taskWorkerGroup = getTaskWorkerGroup(taskInstance); ProcessInstance processInstance = this.findProcessInstanceById(taskInstance.getProcessInstanceId()); if (processInstance == null) { logger.error("process instance is null. please check the task info, task id: " + taskInstance.getId()); return ""; } StringBuilder sb = new StringBuilder(100); sb.append(processInstance.getProcessInstancePriority().ordinal()).append(Constants.UNDERLINE) .append(taskInstance.getProcessInstanceId()).append(Constants.UNDERLINE) .append(taskInstance.getTaskInstancePriority().ordinal()).append(Constants.UNDERLINE) .append(taskInstance.getId()).append(Constants.UNDERLINE) .append(taskInstance.getWorkerGroup()); return sb.toString(); } /** * get submit task instance state by the work process state * cannot modify the task state when running/kill/submit success, or this * task instance is already exists in task queue . * return pause if work process state is ready pause * return stop if work process state is ready stop * if all of above are not satisfied, return submit success * * @param taskInstance taskInstance * @param processInstanceState processInstanceState * @return process instance state */ public ExecutionStatus getSubmitTaskState(TaskInstance taskInstance, ExecutionStatus processInstanceState) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
ExecutionStatus state = taskInstance.getState(); if ( state == ExecutionStatus.RUNNING_EXECUTION || state == ExecutionStatus.DELAY_EXECUTION || state == ExecutionStatus.KILL || checkTaskExistsInTaskQueue(taskInstance) ) { return state; } if (processInstanceState == ExecutionStatus.READY_PAUSE) { state = ExecutionStatus.PAUSE; } else if (processInstanceState == ExecutionStatus.READY_STOP || !checkProcessStrategy(taskInstance)) { state = ExecutionStatus.KILL; } else { state = ExecutionStatus.SUBMITTED_SUCCESS; } return state; } /** * check process instance strategy * * @param taskInstance taskInstance * @return check strategy result */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
private boolean checkProcessStrategy(TaskInstance taskInstance) { ProcessInstance processInstance = this.findProcessInstanceById(taskInstance.getProcessInstanceId()); FailureStrategy failureStrategy = processInstance.getFailureStrategy(); if (failureStrategy == FailureStrategy.CONTINUE) { return true; } List<TaskInstance> taskInstances = this.findValidTaskListByProcessId(taskInstance.getProcessInstanceId()); for (TaskInstance task : taskInstances) { if (task.getState() == ExecutionStatus.FAILURE) { return false; } } return true; } /** * check the task instance existing in queue * * @param taskInstance taskInstance * @return whether taskinstance exists queue */ public boolean checkTaskExistsInTaskQueue(TaskInstance taskInstance) { if (taskInstance.isSubProcess()) { return false; } String taskZkInfo = taskZkInfo(taskInstance); return false; } /** * create a new process instance *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param processInstance processInstance */ public void createProcessInstance(ProcessInstance processInstance) { if (processInstance != null) { processInstanceMapper.insert(processInstance); } } /** * insert or update work process instance to data base * * @param processInstance processInstance */ public void saveProcessInstance(ProcessInstance processInstance) { if (processInstance == null) { logger.error("save error, process instance is null!"); return; } if (processInstance.getId() != 0) { processInstanceMapper.updateById(processInstance); } else { createProcessInstance(processInstance); } } /** * insert or update command * * @param command command * @return save command result */ public int saveCommand(Command command) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
if (command.getId() != 0) { return commandMapper.updateById(command); } else { return commandMapper.insert(command); } } /** * insert or update task instance * * @param taskInstance taskInstance * @return save task instance result */ public boolean saveTaskInstance(TaskInstance taskInstance) { if (taskInstance.getId() != 0) { return updateTaskInstance(taskInstance); } else { return createTaskInstance(taskInstance); } } /** * insert task instance * * @param taskInstance taskInstance * @return create task instance result */ public boolean createTaskInstance(TaskInstance taskInstance) { int count = taskInstanceMapper.insert(taskInstance); return count > 0; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* update task instance * * @param taskInstance taskInstance * @return update task instance result */ public boolean updateTaskInstance(TaskInstance taskInstance) { int count = taskInstanceMapper.updateById(taskInstance); return count > 0; } /** * delete a command by id * * @param id id */ public void delCommandById(int id) { commandMapper.deleteById(id); } /** * find task instance by id * * @param taskId task id * @return task intance */ public TaskInstance findTaskInstanceById(Integer taskId) { return taskInstanceMapper.selectById(taskId); } /** * package task instance,associate processInstance and processDefine * * @param taskInstId taskInstId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return task instance */ public TaskInstance getTaskInstanceDetailByTaskId(int taskInstId) { // TaskInstance taskInstance = findTaskInstanceById(taskInstId); if (taskInstance == null) { return taskInstance; } // ProcessInstance processInstance = findProcessInstanceDetailById(taskInstance.getProcessInstanceId()); // ProcessDefinition processDefine = findProcessDefineById(taskInstance.getProcessDefinitionId()); taskInstance.setProcessInstance(processInstance); taskInstance.setProcessDefine(processDefine); return taskInstance; } /** * get id list by task state * * @param instanceId instanceId * @param state state * @return task instance states */ public List<Integer> findTaskIdByInstanceState(int instanceId, ExecutionStatus state) { return taskInstanceMapper.queryTaskByProcessIdAndState(instanceId, state.ordinal()); } /** * find valid task list by process definition id * * @param processInstanceId processInstanceId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return task instance list */ public List<TaskInstance> findValidTaskListByProcessId(Integer processInstanceId) { return taskInstanceMapper.findValidTaskListByProcessId(processInstanceId, Flag.YES); } /** * find previous task list by work process id * * @param processInstanceId processInstanceId * @return task instance list */ public List<TaskInstance> findPreviousTaskListByWorkProcessId(Integer processInstanceId) { return taskInstanceMapper.findValidTaskListByProcessId(processInstanceId, Flag.NO); } /** * update work process instance map * * @param processInstanceMap processInstanceMap * @return update process instance result */ public int updateWorkProcessInstanceMap(ProcessInstanceMap processInstanceMap) { return processInstanceMapMapper.updateById(processInstanceMap); } /** * create work process instance map * * @param processInstanceMap processInstanceMap * @return create process instance result */ public int createWorkProcessInstanceMap(ProcessInstanceMap processInstanceMap) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
int count = 0; if (processInstanceMap != null) { return processInstanceMapMapper.insert(processInstanceMap); } return count; } /** * find work process map by parent process id and parent task id. * * @param parentWorkProcessId parentWorkProcessId * @param parentTaskId parentTaskId * @return process instance map */ public ProcessInstanceMap findWorkProcessMapByParent(Integer parentWorkProcessId, Integer parentTaskId) { return processInstanceMapMapper.queryByParentId(parentWorkProcessId, parentTaskId); } /** * delete work process map by parent process id * * @param parentWorkProcessId parentWorkProcessId * @return delete process map result */ public int deleteWorkProcessMapByParentId(int parentWorkProcessId) { return processInstanceMapMapper.deleteByParentProcessId(parentWorkProcessId); } /** * find sub process instance * * @param parentProcessId parentProcessId * @param parentTaskId parentTaskId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @return process instance */ public ProcessInstance findSubProcessInstance(Integer parentProcessId, Integer parentTaskId) { ProcessInstance processInstance = null; ProcessInstanceMap processInstanceMap = processInstanceMapMapper.queryByParentId(parentProcessId, parentTaskId); if (processInstanceMap == null || processInstanceMap.getProcessInstanceId() == 0) { return processInstance; } processInstance = findProcessInstanceById(processInstanceMap.getProcessInstanceId()); return processInstance; } /** * find parent process instance * * @param subProcessId subProcessId * @return process instance */ public ProcessInstance findParentProcessInstance(Integer subProcessId) { ProcessInstance processInstance = null; ProcessInstanceMap processInstanceMap = processInstanceMapMapper.queryBySubProcessId(subProcessId); if (processInstanceMap == null || processInstanceMap.getProcessInstanceId() == 0) { return processInstance; } processInstance = findProcessInstanceById(processInstanceMap.getParentProcessInstanceId()); return processInstance; } /** * change task state * * @param state state
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param startTime startTime * @param host host * @param executePath executePath * @param logPath logPath * @param taskInstId taskInstId */ public void changeTaskState(TaskInstance taskInstance, ExecutionStatus state, Date startTime, String host, String executePath, String logPath, int taskInstId) { taskInstance.setState(state); taskInstance.setStartTime(startTime); taskInstance.setHost(host); taskInstance.setExecutePath(executePath); taskInstance.setLogPath(logPath); saveTaskInstance(taskInstance); } /** * update process instance * * @param processInstance processInstance * @return update process instance result */ public int updateProcessInstance(ProcessInstance processInstance) { return processInstanceMapper.updateById(processInstance); } /** * update the process instance * * @param processInstanceId processInstanceId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* @param processJson processJson * @param globalParams globalParams * @param scheduleTime scheduleTime * @param flag flag * @param locations locations * @param connects connects * @return update process instance result */ public int updateProcessInstance(Integer processInstanceId, String processJson, String globalParams, Date scheduleTime, Flag flag, String locations, String connects) { ProcessInstance processInstance = processInstanceMapper.queryDetailById(processInstanceId); if (processInstance != null) { processInstance.setProcessInstanceJson(processJson); processInstance.setGlobalParams(globalParams); processInstance.setScheduleTime(scheduleTime); processInstance.setLocations(locations); processInstance.setConnects(connects); return processInstanceMapper.updateById(processInstance); } return 0; } /** * change task state * * @param state state * @param endTime endTime * @param taskInstId taskInstId * @param varPool varPool */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
public void changeTaskState(TaskInstance taskInstance, ExecutionStatus state, Date endTime, int processId, String appIds, int taskInstId, String varPool) { taskInstance.setPid(processId); taskInstance.setAppLink(appIds); taskInstance.setState(state); taskInstance.setEndTime(endTime); taskInstance.setVarPool(varPool); saveTaskInstance(taskInstance); } /** * convert integer list to string list * * @param intList intList * @return string list */ public List<String> convertIntListToString(List<Integer> intList) { if (intList == null) { return new ArrayList<>(); } List<String> result = new ArrayList<String>(intList.size()); for (Integer intVar : intList) { result.add(String.valueOf(intVar)); } return result; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* query schedule by id * * @param id id * @return schedule */ public Schedule querySchedule(int id) { return scheduleMapper.selectById(id); } /** * query Schedule by processDefinitionId * * @param processDefinitionId processDefinitionId * @see Schedule */ public List<Schedule> queryReleaseSchedulerListByProcessDefinitionId(int processDefinitionId) { return scheduleMapper.queryReleaseSchedulerListByProcessDefinitionId(processDefinitionId); } /** * query need failover process instance * * @param host host * @return process instance list */ public List<ProcessInstance> queryNeedFailoverProcessInstances(String host) { return processInstanceMapper.queryByHostAndStatus(host, stateArray); } /** * process need failover process instance * * @param processInstance processInstance
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
*/ @Transactional(rollbackFor = RuntimeException.class) public void processNeedFailoverProcessInstances(ProcessInstance processInstance) { // processInstance.setHost(Constants.NULL); processInstanceMapper.updateById(processInstance); // Command cmd = new Command(); cmd.setProcessDefinitionId(processInstance.getProcessDefinitionId()); cmd.setCommandParam(String.format("{\"%s\":%d}", Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING, processInstance.getId())); cmd.setExecutorId(processInstance.getExecutorId()); cmd.setCommandType(CommandType.RECOVER_TOLERANCE_FAULT_PROCESS); createCommand(cmd); } /** * query all need failover task instances by host * * @param host host * @return task instance list */ public List<TaskInstance> queryNeedFailoverTaskInstances(String host) { return taskInstanceMapper.queryByHostAndStatus(host, stateArray); } /** * find data source by id * * @param id id * @return datasource */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
public DataSource findDataSourceById(int id) { return dataSourceMapper.selectById(id); } /** * update process instance state by id * * @param processInstanceId processInstanceId * @param executionStatus executionStatus * @return update process result */ public int updateProcessInstanceState(Integer processInstanceId, ExecutionStatus executionStatus) { ProcessInstance instance = processInstanceMapper.selectById(processInstanceId); instance.setState(executionStatus); return processInstanceMapper.updateById(instance); } /** * find process instance by the task id * * @param taskId taskId * @return process instance */ public ProcessInstance findProcessInstanceByTaskId(int taskId) { TaskInstance taskInstance = taskInstanceMapper.selectById(taskId); if (taskInstance != null) { return processInstanceMapper.selectById(taskInstance.getProcessInstanceId()); } return null; } /** * find udf function list by id list string
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* * @param ids ids * @return udf function list */ public List<UdfFunc> queryUdfFunListByIds(int[] ids) { return udfFuncMapper.queryUdfByIdStr(ids, null); } /** * find tenant code by resource name * * @param resName resource name * @param resourceType resource type * @return tenant code */ public String queryTenantCodeByResName(String resName, ResourceType resourceType) { // String fullName = resName.startsWith("/") ? resName : String.format("/%s", resName); return resourceMapper.queryTenantCodeByResourceName(fullName, resourceType.ordinal()); } /** * find schedule list by process define id. * * @param ids ids * @return schedule list */ public List<Schedule> selectAllByProcessDefineId(int[] ids) { return scheduleMapper.selectAllByProcessDefineArray( ids); } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* get dependency cycle by work process define id and scheduler fire time * * @param masterId masterId * @param processDefinitionId processDefinitionId * @param scheduledFireTime the time the task schedule is expected to trigger * @return CycleDependency * @throws Exception if error throws Exception */ public CycleDependency getCycleDependency(int masterId, int processDefinitionId, Date scheduledFireTime) throws Exception { List<CycleDependency> list = getCycleDependencies(masterId, new int[] {processDefinitionId}, scheduledFireTime); return list.size() > 0 ? list.get(0) : null; } /** * get dependency cycle list by work process define id list and scheduler fire time * * @param masterId masterId * @param ids ids * @param scheduledFireTime the time the task schedule is expected to trigger * @return CycleDependency list * @throws Exception if error throws Exception */ public List<CycleDependency> getCycleDependencies(int masterId, int[] ids, Date scheduledFireTime) throws Exception { List<CycleDependency> cycleDependencyList = new ArrayList<CycleDependency>(); if (null == ids || ids.length == 0) { logger.warn("ids[] is empty!is invalid!"); return cycleDependencyList; } if (scheduledFireTime == null) { logger.warn("scheduledFireTime is null!is invalid!"); return cycleDependencyList;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
} String strCrontab = ""; CronExpression depCronExpression; Cron depCron; List<Date> list; List<Schedule> schedules = this.selectAllByProcessDefineId(ids); // for (Schedule depSchedule : schedules) { strCrontab = depSchedule.getCrontab(); depCronExpression = CronUtils.parse2CronExpression(strCrontab); depCron = CronUtils.parse2Cron(strCrontab); CycleEnum cycleEnum = CronUtils.getMiniCycle(depCron); if (cycleEnum == null) { logger.error("{} is not valid", strCrontab); continue; } Calendar calendar = Calendar.getInstance(); switch (cycleEnum) { /*case MINUTE: calendar.add(Calendar.MINUTE,-61);*/ case HOUR: calendar.add(Calendar.HOUR, -25); break; case DAY: calendar.add(Calendar.DATE, -32); break; case WEEK: calendar.add(Calendar.DATE, -32); break; case MONTH:
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
calendar.add(Calendar.MONTH, -13); break; default: logger.warn("Dependent process definition's cycleEnum is {},not support!!", cycleEnum.name()); continue; } Date start = calendar.getTime(); if (depSchedule.getProcessDefinitionId() == masterId) { list = CronUtils.getSelfFireDateList(start, scheduledFireTime, depCronExpression); } else { list = CronUtils.getFireDateList(start, scheduledFireTime, depCronExpression); } if (list.size() >= 1) { start = list.get(list.size() - 1); CycleDependency dependency = new CycleDependency(depSchedule.getProcessDefinitionId(), start, CronUtils.getExpirationTime(start, cycleEnum), cycleEnum); cycleDependencyList.add(dependency); } } return cycleDependencyList; } /** * find last scheduler process instance in the date interval * * @param definitionId definitionId * @param dateInterval dateInterval * @return process instance */ public ProcessInstance findLastSchedulerProcessInterval(int definitionId, DateInterval dateInterval) { return processInstanceMapper.queryLastSchedulerProcess(definitionId, dateInterval.getStartTime(),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
dateInterval.getEndTime()); } /** * find last manual process instance interval * * @param definitionId process definition id * @param dateInterval dateInterval * @return process instance */ public ProcessInstance findLastManualProcessInterval(int definitionId, DateInterval dateInterval) { return processInstanceMapper.queryLastManualProcess(definitionId, dateInterval.getStartTime(), dateInterval.getEndTime()); } /** * find last running process instance * * @param definitionId process definition id * @param startTime start time * @param endTime end time * @return process instance */ public ProcessInstance findLastRunningProcess(int definitionId, Date startTime, Date endTime) { return processInstanceMapper.queryLastRunningProcess(definitionId, startTime, endTime, stateArray); } /** * query user queue by process instance id
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
* * @param processInstanceId processInstanceId * @return queue */ public String queryUserQueueByProcessInstanceId(int processInstanceId) { String queue = ""; ProcessInstance processInstance = processInstanceMapper.selectById(processInstanceId); if (processInstance == null) { return queue; } User executor = userMapper.selectById(processInstance.getExecutorId()); if (executor != null) { queue = executor.getQueue(); } return queue; } /** * get task worker group * * @param taskInstance taskInstance * @return workerGroupId */ public String getTaskWorkerGroup(TaskInstance taskInstance) { String workerGroup = taskInstance.getWorkerGroup(); if (StringUtils.isNotBlank(workerGroup)) { return workerGroup; } int processInstanceId = taskInstance.getProcessInstanceId(); ProcessInstance processInstance = findProcessInstanceById(processInstanceId); if (processInstance != null) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
return processInstance.getWorkerGroup(); } logger.info("task : {} will use default worker group", taskInstance.getId()); return Constants.DEFAULT_WORKER_GROUP; } /** * get have perm project list * * @param userId userId * @return project list */ public List<Project> getProjectListHavePerm(int userId) { List<Project> createProjects = projectMapper.queryProjectCreatedByUser(userId); List<Project> authedProjects = projectMapper.queryAuthedProjectListByUserId(userId); if (createProjects == null) { createProjects = new ArrayList<>(); } if (authedProjects != null) { createProjects.addAll(authedProjects); } return createProjects; } /** * get have perm project ids * * @param userId userId * @return project ids */ public List<Integer> getProjectIdListHavePerm(int userId) { List<Integer> projectIdList = new ArrayList<>();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
for (Project project : getProjectListHavePerm(userId)) { projectIdList.add(project.getId()); } return projectIdList; } /** * list unauthorized udf function * * @param userId user id * @param needChecks data source id array * @return unauthorized udf function list */ public <T> List<T> listUnauthorized(int userId, T[] needChecks, AuthorizationType authorizationType) { List<T> resultList = new ArrayList<T>(); if (Objects.nonNull(needChecks) && needChecks.length > 0) { Set<T> originResSet = new HashSet<T>(Arrays.asList(needChecks)); switch (authorizationType) { case RESOURCE_FILE_ID: Set<Integer> authorizedResourceFiles = resourceMapper.listAuthorizedResourceById(userId, needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedResourceFiles); break; case RESOURCE_FILE_NAME: Set<String> authorizedResources = resourceMapper.listAuthorizedResource(userId, needChecks).stream().map(t -> t.getFullName()).collect(toSet()); originResSet.removeAll(authorizedResources); break; case UDF_FILE: Set<Integer> authorizedUdfFiles = resourceMapper.listAuthorizedResourceById(userId, needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedUdfFiles); break; case DATASOURCE:
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
Set<Integer> authorizedDatasources = dataSourceMapper.listAuthorizedDataSource(userId, needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedDatasources); break; case UDF: Set<Integer> authorizedUdfs = udfFuncMapper.listAuthorizedUdfFunc(userId, needChecks).stream().map(t -> t.getId()).collect(toSet()); originResSet.removeAll(authorizedUdfs); break; default: break; } resultList.addAll(originResSet); } return resultList; } /** * get user by user id * * @param userId user id * @return User */ public User getUserById(int userId) { return userMapper.selectById(userId); } /** * get resource by resoruce id * * @param resoruceId resource id * @return Resource */ public Resource getResourceById(int resoruceId) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,215
[improvement] ProcessService invalid code removal
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.* **Describe the question** A clear and concise description of what the question is. org.apache.dolphinscheduler.service.process.ProcessService#checkTaskExistsInTaskQueue方法恒返回false **Which version of DolphinScheduler:** 1.1.3 **Additional context** Add any other context about the problem here. ![image](https://user-images.githubusercontent.com/41229600/101970917-6002e580-3c68-11eb-84c1-135b943ec38b.png) **Requirement or improvement** - Please describe about your requirements or improvement suggestions. 如果返回恒定值,业务逻辑是否完备
https://github.com/apache/dolphinscheduler/issues/4215
https://github.com/apache/dolphinscheduler/pull/4221
b694474c78cafb298dd41d03cc0c54d2179dde2a
426eb9af034ff481f22d5da0a03662f6c9c7e32c
"2020-12-12T02:53:50Z"
java
"2020-12-13T15:05:27Z"
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java
return resourceMapper.selectById(resoruceId); } /** * list resources by ids * * @param resIds resIds * @return resource list */ public List<Resource> listResourceByIds(Integer[] resIds) { return resourceMapper.listResourceByIds(resIds); } /** * format task app id in task instance * * @param taskInstance * @return */ public String formatTaskAppId(TaskInstance taskInstance) { ProcessDefinition definition = this.findProcessDefineById(taskInstance.getProcessDefinitionId()); ProcessInstance processInstanceById = this.findProcessInstanceById(taskInstance.getProcessInstanceId()); if (definition == null || processInstanceById == null) { return ""; } return String.format("%s_%s_%s", definition.getId(), processInstanceById.getId(), taskInstance.getId()); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
1,682
[suggest] The method getcurtaskparamsclass() of class abstracttask is the same as the function of class taskparametersutils Functions can be replaced
*For better global communication, please give priority to using English description, thx! * **Describe the bug** The method getCurTaskParamsClass() of class AbstractTask is the same as the function of class TaskParametersUtils Functions can be replaced **To Reproduce** **Expected behavior** - Delete the method getcurtaskparamsclass() of class abstracttask **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.2.1-dev] **Additional context** **Requirement or improvement Getcurtaskparamsclass() function of class abstracttask is replaced by taskparametersutils
https://github.com/apache/dolphinscheduler/issues/1682
https://github.com/apache/dolphinscheduler/pull/4262
3bcd3fbcd344983ed35f997bed1fea2c0cf6055d
24864512212a94f53da32eb20dc56673f960547a
"2020-01-02T08:42:35Z"
java
"2020-12-20T13:52:52Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractTask.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.server.worker.task;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
1,682
[suggest] The method getcurtaskparamsclass() of class abstracttask is the same as the function of class taskparametersutils Functions can be replaced
*For better global communication, please give priority to using English description, thx! * **Describe the bug** The method getCurTaskParamsClass() of class AbstractTask is the same as the function of class TaskParametersUtils Functions can be replaced **To Reproduce** **Expected behavior** - Delete the method getcurtaskparamsclass() of class abstracttask **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.2.1-dev] **Additional context** **Requirement or improvement Getcurtaskparamsclass() function of class abstracttask is replaced by taskparametersutils
https://github.com/apache/dolphinscheduler/issues/1682
https://github.com/apache/dolphinscheduler/pull/4262
3bcd3fbcd344983ed35f997bed1fea2c0cf6055d
24864512212a94f53da32eb20dc56673f960547a
"2020-01-02T08:42:35Z"
java
"2020-12-20T13:52:52Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractTask.java
import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.enums.TaskRecordStatus; import org.apache.dolphinscheduler.common.enums.TaskType; import org.apache.dolphinscheduler.common.process.Property; import org.apache.dolphinscheduler.common.task.AbstractParameters; import org.apache.dolphinscheduler.common.task.conditions.ConditionsParameters; import org.apache.dolphinscheduler.common.task.datax.DataxParameters; import org.apache.dolphinscheduler.common.task.flink.FlinkParameters; import org.apache.dolphinscheduler.common.task.mr.MapreduceParameters; import org.apache.dolphinscheduler.common.task.procedure.ProcedureParameters; import org.apache.dolphinscheduler.common.task.python.PythonParameters; import org.apache.dolphinscheduler.common.task.shell.ShellParameters; import org.apache.dolphinscheduler.common.task.spark.SparkParameters; import org.apache.dolphinscheduler.common.task.sql.SqlParameters; import org.apache.dolphinscheduler.common.task.sqoop.SqoopParameters; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.dao.TaskRecordDao; import org.apache.dolphinscheduler.server.entity.TaskExecutionContext; import org.apache.dolphinscheduler.server.utils.ParamUtils; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import java.util.List; import java.util.Map; import static ch.qos.logback.classic.ClassicConstants.FINALIZE_SESSION_MARKER; /** * executive task */ public abstract class AbstractTask {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
1,682
[suggest] The method getcurtaskparamsclass() of class abstracttask is the same as the function of class taskparametersutils Functions can be replaced
*For better global communication, please give priority to using English description, thx! * **Describe the bug** The method getCurTaskParamsClass() of class AbstractTask is the same as the function of class TaskParametersUtils Functions can be replaced **To Reproduce** **Expected behavior** - Delete the method getcurtaskparamsclass() of class abstracttask **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.2.1-dev] **Additional context** **Requirement or improvement Getcurtaskparamsclass() function of class abstracttask is replaced by taskparametersutils
https://github.com/apache/dolphinscheduler/issues/1682
https://github.com/apache/dolphinscheduler/pull/4262
3bcd3fbcd344983ed35f997bed1fea2c0cf6055d
24864512212a94f53da32eb20dc56673f960547a
"2020-01-02T08:42:35Z"
java
"2020-12-20T13:52:52Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractTask.java
/** * varPool string */ protected String varPool; /** * taskExecutionContext **/ TaskExecutionContext taskExecutionContext; /** * log record */ protected Logger logger; /** * SHELL process pid */ protected int processId; /** * other resource manager appId , for example : YARN etc */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
1,682
[suggest] The method getcurtaskparamsclass() of class abstracttask is the same as the function of class taskparametersutils Functions can be replaced
*For better global communication, please give priority to using English description, thx! * **Describe the bug** The method getCurTaskParamsClass() of class AbstractTask is the same as the function of class TaskParametersUtils Functions can be replaced **To Reproduce** **Expected behavior** - Delete the method getcurtaskparamsclass() of class abstracttask **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.2.1-dev] **Additional context** **Requirement or improvement Getcurtaskparamsclass() function of class abstracttask is replaced by taskparametersutils
https://github.com/apache/dolphinscheduler/issues/1682
https://github.com/apache/dolphinscheduler/pull/4262
3bcd3fbcd344983ed35f997bed1fea2c0cf6055d
24864512212a94f53da32eb20dc56673f960547a
"2020-01-02T08:42:35Z"
java
"2020-12-20T13:52:52Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractTask.java
protected String appIds; /** * cancel */ protected volatile boolean cancel = false; /** * exit code */ protected volatile int exitStatusCode = -1; /** * constructor * @param taskExecutionContext taskExecutionContext * @param logger logger */ protected AbstractTask(TaskExecutionContext taskExecutionContext, Logger logger) { this.taskExecutionContext = taskExecutionContext; this.logger = logger; } /** * init task * @throws Exception exception */ public void init() throws Exception { } /** * task handle * @throws Exception exception */ public abstract void handle() throws Exception; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
1,682
[suggest] The method getcurtaskparamsclass() of class abstracttask is the same as the function of class taskparametersutils Functions can be replaced
*For better global communication, please give priority to using English description, thx! * **Describe the bug** The method getCurTaskParamsClass() of class AbstractTask is the same as the function of class TaskParametersUtils Functions can be replaced **To Reproduce** **Expected behavior** - Delete the method getcurtaskparamsclass() of class abstracttask **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.2.1-dev] **Additional context** **Requirement or improvement Getcurtaskparamsclass() function of class abstracttask is replaced by taskparametersutils
https://github.com/apache/dolphinscheduler/issues/1682
https://github.com/apache/dolphinscheduler/pull/4262
3bcd3fbcd344983ed35f997bed1fea2c0cf6055d
24864512212a94f53da32eb20dc56673f960547a
"2020-01-02T08:42:35Z"
java
"2020-12-20T13:52:52Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractTask.java
* cancel application * @param status status * @throws Exception exception */ public void cancelApplication(boolean status) throws Exception { this.cancel = status; } /** * log handle * @param logs log list */ public void logHandle(List<String> logs) { if (logs.contains(FINALIZE_SESSION_MARKER.toString())) { logger.info(FINALIZE_SESSION_MARKER, FINALIZE_SESSION_MARKER.toString()); } else { logger.info(" -> {}", String.join("\n\t", logs)); } } public void setVarPool(String varPool) { this.varPool = varPool; } public String getVarPool() { return varPool; } /** * get exit status code * @return exit status code */ public int getExitStatusCode() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
1,682
[suggest] The method getcurtaskparamsclass() of class abstracttask is the same as the function of class taskparametersutils Functions can be replaced
*For better global communication, please give priority to using English description, thx! * **Describe the bug** The method getCurTaskParamsClass() of class AbstractTask is the same as the function of class TaskParametersUtils Functions can be replaced **To Reproduce** **Expected behavior** - Delete the method getcurtaskparamsclass() of class abstracttask **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.2.1-dev] **Additional context** **Requirement or improvement Getcurtaskparamsclass() function of class abstracttask is replaced by taskparametersutils
https://github.com/apache/dolphinscheduler/issues/1682
https://github.com/apache/dolphinscheduler/pull/4262
3bcd3fbcd344983ed35f997bed1fea2c0cf6055d
24864512212a94f53da32eb20dc56673f960547a
"2020-01-02T08:42:35Z"
java
"2020-12-20T13:52:52Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractTask.java
return exitStatusCode; } public void setExitStatusCode(int exitStatusCode) { this.exitStatusCode = exitStatusCode; } public String getAppIds() { return appIds; } public void setAppIds(String appIds) { this.appIds = appIds; } public int getProcessId() { return processId; } public void setProcessId(int processId) { this.processId = processId; } /** * get task parameters * @return AbstractParameters */ public abstract AbstractParameters getParameters(); /** * result processing */ public void after(){ if (getExitStatusCode() == Constants.EXIT_CODE_SUCCESS){ if (TaskRecordDao.getTaskRecordFlag() && TaskType.typeIsNormalTask(taskExecutionContext.getTaskType())){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
1,682
[suggest] The method getcurtaskparamsclass() of class abstracttask is the same as the function of class taskparametersutils Functions can be replaced
*For better global communication, please give priority to using English description, thx! * **Describe the bug** The method getCurTaskParamsClass() of class AbstractTask is the same as the function of class TaskParametersUtils Functions can be replaced **To Reproduce** **Expected behavior** - Delete the method getcurtaskparamsclass() of class abstracttask **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.2.1-dev] **Additional context** **Requirement or improvement Getcurtaskparamsclass() function of class abstracttask is replaced by taskparametersutils
https://github.com/apache/dolphinscheduler/issues/1682
https://github.com/apache/dolphinscheduler/pull/4262
3bcd3fbcd344983ed35f997bed1fea2c0cf6055d
24864512212a94f53da32eb20dc56673f960547a
"2020-01-02T08:42:35Z"
java
"2020-12-20T13:52:52Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractTask.java
AbstractParameters params = (AbstractParameters) JSONUtils.parseObject(taskExecutionContext.getTaskParams(), getCurTaskParamsClass()); Map<String, Property> paramsMap = ParamUtils.convert(ParamUtils.getUserDefParamsMap(taskExecutionContext.getDefinedParams()), taskExecutionContext.getDefinedParams(), params.getLocalParametersMap(), CommandType.of(taskExecutionContext.getCmdTypeIfComplement()), taskExecutionContext.getScheduleTime()); if (paramsMap != null && !paramsMap.isEmpty() && paramsMap.containsKey("v_proc_date")){ String vProcDate = paramsMap.get("v_proc_date").getValue(); if (!StringUtils.isEmpty(vProcDate)){ TaskRecordStatus taskRecordState = TaskRecordDao.getTaskRecordState(taskExecutionContext.getTaskName(), vProcDate); logger.info("task record status : {}",taskRecordState); if (taskRecordState == TaskRecordStatus.FAILURE){ setExitStatusCode(Constants.EXIT_CODE_FAILURE); } } } } }else if (getExitStatusCode() == Constants.EXIT_CODE_KILL){ setExitStatusCode(Constants.EXIT_CODE_KILL); }else { setExitStatusCode(Constants.EXIT_CODE_FAILURE); } } /** * get current task parameter class * @return Task Params Class */ private Class getCurTaskParamsClass(){
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
1,682
[suggest] The method getcurtaskparamsclass() of class abstracttask is the same as the function of class taskparametersutils Functions can be replaced
*For better global communication, please give priority to using English description, thx! * **Describe the bug** The method getCurTaskParamsClass() of class AbstractTask is the same as the function of class TaskParametersUtils Functions can be replaced **To Reproduce** **Expected behavior** - Delete the method getcurtaskparamsclass() of class abstracttask **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.2.1-dev] **Additional context** **Requirement or improvement Getcurtaskparamsclass() function of class abstracttask is replaced by taskparametersutils
https://github.com/apache/dolphinscheduler/issues/1682
https://github.com/apache/dolphinscheduler/pull/4262
3bcd3fbcd344983ed35f997bed1fea2c0cf6055d
24864512212a94f53da32eb20dc56673f960547a
"2020-01-02T08:42:35Z"
java
"2020-12-20T13:52:52Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractTask.java
Class paramsClass = null; TaskType taskType = TaskType.valueOf(taskExecutionContext.getTaskType()); switch (taskType){ case SHELL: paramsClass = ShellParameters.class; break; case SQL: paramsClass = SqlParameters.class; break; case PROCEDURE: paramsClass = ProcedureParameters.class; break; case MR: paramsClass = MapreduceParameters.class; break; case SPARK: paramsClass = SparkParameters.class; break; case FLINK: paramsClass = FlinkParameters.class; break; case PYTHON: paramsClass = PythonParameters.class; break; case DATAX: paramsClass = DataxParameters.class; break; case SQOOP: paramsClass = SqoopParameters.class;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
1,682
[suggest] The method getcurtaskparamsclass() of class abstracttask is the same as the function of class taskparametersutils Functions can be replaced
*For better global communication, please give priority to using English description, thx! * **Describe the bug** The method getCurTaskParamsClass() of class AbstractTask is the same as the function of class TaskParametersUtils Functions can be replaced **To Reproduce** **Expected behavior** - Delete the method getcurtaskparamsclass() of class abstracttask **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.2.1-dev] **Additional context** **Requirement or improvement Getcurtaskparamsclass() function of class abstracttask is replaced by taskparametersutils
https://github.com/apache/dolphinscheduler/issues/1682
https://github.com/apache/dolphinscheduler/pull/4262
3bcd3fbcd344983ed35f997bed1fea2c0cf6055d
24864512212a94f53da32eb20dc56673f960547a
"2020-01-02T08:42:35Z"
java
"2020-12-20T13:52:52Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractTask.java
break; case CONDITIONS: paramsClass = ConditionsParameters.class; break; default: logger.error("not support this task type: {}", taskType); throw new IllegalArgumentException("not support this task type"); } return paramsClass; } /** * get exit status according to exitCode * @return exit status */ public ExecutionStatus getExitStatus(){ ExecutionStatus status; switch (getExitStatusCode()){ case Constants.EXIT_CODE_SUCCESS: status = ExecutionStatus.SUCCESS; break; case Constants.EXIT_CODE_KILL: status = ExecutionStatus.KILL; break; default: status = ExecutionStatus.FAILURE; break; } return status; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/plugin/AlertPluginManager.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.alert.plugin; import static java.lang.String.format; import static java.util.Objects.requireNonNull; import static com.google.common.base.Preconditions.checkState;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/plugin/AlertPluginManager.java
import org.apache.dolphinscheduler.dao.entity.PluginDefine; import org.apache.dolphinscheduler.spi.DolphinSchedulerPlugin; import org.apache.dolphinscheduler.spi.alert.AlertChannel; import org.apache.dolphinscheduler.spi.alert.AlertChannelFactory; import org.apache.dolphinscheduler.spi.classloader.ThreadContextClassLoader; import org.apache.dolphinscheduler.spi.params.PluginParamsTransfer; import org.apache.dolphinscheduler.spi.params.base.PluginParams; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * load the configured alert plugin and manager them */ public class AlertPluginManager extends AbstractDolphinPluginManager { private static final Logger logger = LoggerFactory.getLogger(AlertPluginManager.class); private final Map<String, AlertChannelFactory> alertChannelFactoryMap = new ConcurrentHashMap<>(); private final Map<String, AlertChannel> alertChannelMap = new ConcurrentHashMap<>(); public void addAlertChannelFactory(AlertChannelFactory alertChannelFactory) { requireNonNull(alertChannelFactory, "alertChannelFactory is null"); if (alertChannelFactoryMap.putIfAbsent(alertChannelFactory.getName(), alertChannelFactory) != null) { throw new IllegalArgumentException(format("Alert Plugin '{}' is already registered", alertChannelFactory.getName())); } try { loadAlertChannel(alertChannelFactory.getName()); } catch (Exception e) { throw new IllegalArgumentException(format("Alert Plugin '{}' is can not load .", alertChannelFactory.getName())); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/plugin/AlertPluginManager.java
protected void loadAlertChannel(String name) { requireNonNull(name, "name is null"); AlertChannelFactory alertChannelFactory = alertChannelFactoryMap.get(name); checkState(alertChannelFactory != null, "Alert Plugin {} is not registered", name); try (ThreadContextClassLoader ignored = new ThreadContextClassLoader(alertChannelFactory.getClass().getClassLoader())) { AlertChannel alertChannel = alertChannelFactory.create(); this.alertChannelMap.put(name, alertChannel); } logger.info("-- Loaded Alert Plugin {} --", name); } public Map<String, AlertChannelFactory> getAlertChannelFactoryMap() { return alertChannelFactoryMap; } public Map<String, AlertChannel> getAlertChannelMap() { return alertChannelMap; } @Override public void installPlugin(DolphinSchedulerPlugin dolphinSchedulerPlugin) { for (AlertChannelFactory alertChannelFactory : dolphinSchedulerPlugin.getAlertChannelFactorys()) { logger.info("Registering Alert Plugin '{}'", alertChannelFactory.getName()); this.addAlertChannelFactory(alertChannelFactory); List<PluginParams> params = alertChannelFactory.getParams(); String nameEn = alertChannelFactory.getName(); String paramsJson = PluginParamsTransfer.transferParamsToJson(params); PluginDefine pluginDefine = new PluginDefine(nameEn, "alert", paramsJson); pluginDao.addOrUpdatePluginDefine(pluginDefine); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.api.enums; import java.util.Locale; import org.springframework.context.i18n.LocaleContextHolder; /** * status enum */ public enum Status { SUCCESS(0, "success", "成功"), INTERNAL_SERVER_ERROR_ARGS(10000, "Internal Server Error: {0}", "服务端异常: {0}"), REQUEST_PARAMS_NOT_VALID_ERROR(10001, "request parameter {0} is not valid", "请求参数[{0}]无效"), TASK_TIMEOUT_PARAMS_ERROR(10002, "task timeout parameter is not valid", "任务超时参数无效"), USER_NAME_EXIST(10003, "user name already exists", "用户名已存在"), USER_NAME_NULL(10004, "user name is null", "用户名不能为空"), HDFS_OPERATION_ERROR(10006, "hdfs operation error", "hdfs操作错误"), TASK_INSTANCE_NOT_FOUND(10008, "task instance not found", "任务实例不存在"), TENANT_NAME_EXIST(10009, "tenant code {0} already exists", "租户编码[{0}]已存在"), USER_NOT_EXIST(10010, "user {0} not exists", "用户[{0}]不存在"), ALERT_GROUP_NOT_EXIST(10011, "alarm group not found", "告警组不存在"), ALERT_GROUP_EXIST(10012, "alarm group already exists", "告警组名称已存在"), USER_NAME_PASSWD_ERROR(10013, "user name or password error", "用户名或密码错误"), LOGIN_SESSION_FAILED(10014, "create session failed!", "创建session失败"), DATASOURCE_EXIST(10015, "data source name already exists", "数据源名称已存在"), DATASOURCE_CONNECT_FAILED(10016, "data source connection failed", "建立数据源连接失败"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
TENANT_NOT_EXIST(10017, "tenant not exists", "租户不存在"), PROJECT_NOT_FOUNT(10018, "project {0} not found ", "项目[{0}]不存在"), PROJECT_ALREADY_EXISTS(10019, "project {0} already exists", "项目名称[{0}]已存在"), TASK_INSTANCE_NOT_EXISTS(10020, "task instance {0} does not exist", "任务实例[{0}]不存在"), TASK_INSTANCE_NOT_SUB_WORKFLOW_INSTANCE(10021, "task instance {0} is not sub process instance", "任务实例[{0}]不是子流程实例"), SCHEDULE_CRON_NOT_EXISTS(10022, "scheduler crontab {0} does not exist", "调度配置定时表达式[{0}]不存在"), SCHEDULE_CRON_ONLINE_FORBID_UPDATE(10023, "online status does not allow update operations", "调度配置上线状态不允许修改"), SCHEDULE_CRON_CHECK_FAILED(10024, "scheduler crontab expression validation failure: {0}", "调度配置定时表达式验证失败: {0}"), MASTER_NOT_EXISTS(10025, "master does not exist", "无可用master节点"), SCHEDULE_STATUS_UNKNOWN(10026, "unknown status: {0}", "未知状态: {0}"), CREATE_ALERT_GROUP_ERROR(10027, "create alert group error", "创建告警组错误"), QUERY_ALL_ALERTGROUP_ERROR(10028, "query all alertgroup error", "查询告警组错误"), LIST_PAGING_ALERT_GROUP_ERROR(10029, "list paging alert group error", "分页查询告警组错误"), UPDATE_ALERT_GROUP_ERROR(10030, "update alert group error", "更新告警组错误"), DELETE_ALERT_GROUP_ERROR(10031, "delete alert group error", "删除告警组错误"), ALERT_GROUP_GRANT_USER_ERROR(10032, "alert group grant user error", "告警组授权用户错误"), CREATE_DATASOURCE_ERROR(10033, "create datasource error", "创建数据源错误"), UPDATE_DATASOURCE_ERROR(10034, "update datasource error", "更新数据源错误"), QUERY_DATASOURCE_ERROR(10035, "query datasource error", "查询数据源错误"), CONNECT_DATASOURCE_FAILURE(10036, "connect datasource failure", "建立数据源连接失败"), CONNECTION_TEST_FAILURE(10037, "connection test failure", "测试数据源连接失败"), DELETE_DATA_SOURCE_FAILURE(10038, "delete data source failure", "删除数据源失败"), VERIFY_DATASOURCE_NAME_FAILURE(10039, "verify datasource name failure", "验证数据源名称失败"), UNAUTHORIZED_DATASOURCE(10040, "unauthorized datasource", "未经授权的数据源"), AUTHORIZED_DATA_SOURCE(10041, "authorized data source", "授权数据源失败"), LOGIN_SUCCESS(10042, "login success", "登录成功"), USER_LOGIN_FAILURE(10043, "user login failure", "用户登录失败"), LIST_WORKERS_ERROR(10044, "list workers error", "查询worker列表错误"), LIST_MASTERS_ERROR(10045, "list masters error", "查询master列表错误"), UPDATE_PROJECT_ERROR(10046, "update project error", "更新项目信息错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
QUERY_PROJECT_DETAILS_BY_ID_ERROR(10047, "query project details by id error", "查询项目详细信息错误"), CREATE_PROJECT_ERROR(10048, "create project error", "创建项目错误"), LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR(10049, "login user query project list paging error", "分页查询项目列表错误"), DELETE_PROJECT_ERROR(10050, "delete project error", "删除项目错误"), QUERY_UNAUTHORIZED_PROJECT_ERROR(10051, "query unauthorized project error", "查询未授权项目错误"), QUERY_AUTHORIZED_PROJECT(10052, "query authorized project", "查询授权项目错误"), QUERY_QUEUE_LIST_ERROR(10053, "query queue list error", "查询队列列表错误"), CREATE_RESOURCE_ERROR(10054, "create resource error", "创建资源错误"), UPDATE_RESOURCE_ERROR(10055, "update resource error", "更新资源错误"), QUERY_RESOURCES_LIST_ERROR(10056, "query resources list error", "查询资源列表错误"), QUERY_RESOURCES_LIST_PAGING(10057, "query resources list paging", "分页查询资源列表错误"), DELETE_RESOURCE_ERROR(10058, "delete resource error", "删除资源错误"), VERIFY_RESOURCE_BY_NAME_AND_TYPE_ERROR(10059, "verify resource by name and type error", "资源名称或类型验证错误"), VIEW_RESOURCE_FILE_ON_LINE_ERROR(10060, "view resource file online error", "查看资源文件错误"), CREATE_RESOURCE_FILE_ON_LINE_ERROR(10061, "create resource file online error", "创建资源文件错误"), RESOURCE_FILE_IS_EMPTY(10062, "resource file is empty", "资源文件内容不能为空"), EDIT_RESOURCE_FILE_ON_LINE_ERROR(10063, "edit resource file online error", "更新资源文件错误"), DOWNLOAD_RESOURCE_FILE_ERROR(10064, "download resource file error", "下载资源文件错误"), CREATE_UDF_FUNCTION_ERROR(10065, "create udf function error", "创建UDF函数错误"), VIEW_UDF_FUNCTION_ERROR(10066, "view udf function error", "查询UDF函数错误"), UPDATE_UDF_FUNCTION_ERROR(10067, "update udf function error", "更新UDF函数错误"), QUERY_UDF_FUNCTION_LIST_PAGING_ERROR(10068, "query udf function list paging error", "分页查询UDF函数列表错误"), QUERY_DATASOURCE_BY_TYPE_ERROR(10069, "query datasource by type error", "查询数据源信息错误"), VERIFY_UDF_FUNCTION_NAME_ERROR(10070, "verify udf function name error", "UDF函数名称验证错误"), DELETE_UDF_FUNCTION_ERROR(10071, "delete udf function error", "删除UDF函数错误"), AUTHORIZED_FILE_RESOURCE_ERROR(10072, "authorized file resource error", "授权资源文件错误"), AUTHORIZE_RESOURCE_TREE(10073, "authorize resource tree display error", "授权资源目录树错误"), UNAUTHORIZED_UDF_FUNCTION_ERROR(10074, "unauthorized udf function error", "查询未授权UDF函数错误"), AUTHORIZED_UDF_FUNCTION_ERROR(10075, "authorized udf function error", "授权UDF函数错误"), CREATE_SCHEDULE_ERROR(10076, "create schedule error", "创建调度配置错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
UPDATE_SCHEDULE_ERROR(10077, "update schedule error", "更新调度配置错误"), PUBLISH_SCHEDULE_ONLINE_ERROR(10078, "publish schedule online error", "上线调度配置错误"), OFFLINE_SCHEDULE_ERROR(10079, "offline schedule error", "下线调度配置错误"), QUERY_SCHEDULE_LIST_PAGING_ERROR(10080, "query schedule list paging error", "分页查询调度配置列表错误"), QUERY_SCHEDULE_LIST_ERROR(10081, "query schedule list error", "查询调度配置列表错误"), QUERY_TASK_LIST_PAGING_ERROR(10082, "query task list paging error", "分页查询任务列表错误"), QUERY_TASK_RECORD_LIST_PAGING_ERROR(10083, "query task record list paging error", "分页查询任务记录错误"), CREATE_TENANT_ERROR(10084, "create tenant error", "创建租户错误"), QUERY_TENANT_LIST_PAGING_ERROR(10085, "query tenant list paging error", "分页查询租户列表错误"), QUERY_TENANT_LIST_ERROR(10086, "query tenant list error", "查询租户列表错误"), UPDATE_TENANT_ERROR(10087, "update tenant error", "更新租户错误"), DELETE_TENANT_BY_ID_ERROR(10088, "delete tenant by id error", "删除租户错误"), VERIFY_TENANT_CODE_ERROR(10089, "verify tenant code error", "租户编码验证错误"), CREATE_USER_ERROR(10090, "create user error", "创建用户错误"), QUERY_USER_LIST_PAGING_ERROR(10091, "query user list paging error", "分页查询用户列表错误"), UPDATE_USER_ERROR(10092, "update user error", "更新用户错误"), DELETE_USER_BY_ID_ERROR(10093, "delete user by id error", "删除用户错误"), GRANT_PROJECT_ERROR(10094, "grant project error", "授权项目错误"), GRANT_RESOURCE_ERROR(10095, "grant resource error", "授权资源错误"), GRANT_UDF_FUNCTION_ERROR(10096, "grant udf function error", "授权UDF函数错误"), GRANT_DATASOURCE_ERROR(10097, "grant datasource error", "授权数据源错误"), GET_USER_INFO_ERROR(10098, "get user info error", "获取用户信息错误"), USER_LIST_ERROR(10099, "user list error", "查询用户列表错误"), VERIFY_USERNAME_ERROR(10100, "verify username error", "用户名验证错误"), UNAUTHORIZED_USER_ERROR(10101, "unauthorized user error", "查询未授权用户错误"), AUTHORIZED_USER_ERROR(10102, "authorized user error", "查询授权用户错误"), QUERY_TASK_INSTANCE_LOG_ERROR(10103, "view task instance log error", "查询任务实例日志错误"), DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR(10104, "download task instance log file error", "下载任务日志文件错误"), CREATE_PROCESS_DEFINITION(10105, "create process definition", "创建工作流错误"), VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR(10106, "verify process definition name unique error", "工作流名称已存在"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
UPDATE_PROCESS_DEFINITION_ERROR(10107, "update process definition error", "更新工作流定义错误"), RELEASE_PROCESS_DEFINITION_ERROR(10108, "release process definition error", "上线工作流错误"), QUERY_DATAIL_OF_PROCESS_DEFINITION_ERROR(10109, "query datail of process definition error", "查询工作流详细信息错误"), QUERY_PROCESS_DEFINITION_LIST(10110, "query process definition list", "查询工作流列表错误"), ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR(10111, "encapsulation treeview structure error", "查询工作流树形图数据错误"), GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR(10112, "get tasks list by process definition id error", "查询工作流定义节点信息错误"), QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR(10113, "query process instance list paging error", "分页查询工作流实例列表错误"), QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR(10114, "query task list by process instance id error", "查询任务实例列表错误"), UPDATE_PROCESS_INSTANCE_ERROR(10115, "update process instance error", "更新工作流实例错误"), QUERY_PROCESS_INSTANCE_BY_ID_ERROR(10116, "query process instance by id error", "查询工作流实例错误"), DELETE_PROCESS_INSTANCE_BY_ID_ERROR(10117, "delete process instance by id error", "删除工作流实例错误"), QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR(10118, "query sub process instance detail info by task id error", "查询子流程任务实例错误"), QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR(10119, "query parent process instance detail info by sub process instance id error", "查询子流程该工作流实例错误"), QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR(10120, "query process instance all variables error", "查询工作流自定义变量信息错误"), ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR(10121, "encapsulation process instance gantt structure error", "查询工作流实例甘特图数据错误"), QUERY_PROCESS_DEFINITION_LIST_PAGING_ERROR(10122, "query process definition list paging error", "分页查询工作流定义列表错误"), SIGN_OUT_ERROR(10123, "sign out error", "退出错误"), TENANT_CODE_HAS_ALREADY_EXISTS(10124, "tenant code has already exists", "租户编码已存在"), IP_IS_EMPTY(10125, "ip is empty", "IP地址不能为空"), SCHEDULE_CRON_REALEASE_NEED_NOT_CHANGE(10126, "schedule release is already {0}", "调度配置上线错误[{0}]"), CREATE_QUEUE_ERROR(10127, "create queue error", "创建队列错误"), QUEUE_NOT_EXIST(10128, "queue {0} not exists", "队列ID[{0}]不存在"), QUEUE_VALUE_EXIST(10129, "queue value {0} already exists", "队列值[{0}]已存在"), QUEUE_NAME_EXIST(10130, "queue name {0} already exists", "队列名称[{0}]已存在"), UPDATE_QUEUE_ERROR(10131, "update queue error", "更新队列信息错误"), NEED_NOT_UPDATE_QUEUE(10132, "no content changes, no updates are required", "数据未变更,不需要更新队列信息"), VERIFY_QUEUE_ERROR(10133, "verify queue error", "验证队列信息错误"), NAME_NULL(10134, "name must be not null", "名称不能为空"), NAME_EXIST(10135, "name {0} already exists", "名称[{0}]已存在"), SAVE_ERROR(10136, "save error", "保存错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
DELETE_PROJECT_ERROR_DEFINES_NOT_NULL(10137, "please delete the process definitions in project first!", "请先删除全部工作流定义"), BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR(10117, "batch delete process instance by ids {0} error", "批量删除工作流实例错误"), PREVIEW_SCHEDULE_ERROR(10139, "preview schedule error", "预览调度配置错误"), PARSE_TO_CRON_EXPRESSION_ERROR(10140, "parse cron to cron expression error", "解析调度表达式错误"), SCHEDULE_START_TIME_END_TIME_SAME(10141, "The start time must not be the same as the end", "开始时间不能和结束时间一样"), DELETE_TENANT_BY_ID_FAIL(10142, "delete tenant by id fail, for there are {0} process instances in executing using it", "删除租户失败,有[{0}]个运行中的工作流实例正在使用"), DELETE_TENANT_BY_ID_FAIL_DEFINES(10143, "delete tenant by id fail, for there are {0} process definitions using it", "删除租户失败,有[{0}]个工作流定义正在使用"), DELETE_TENANT_BY_ID_FAIL_USERS(10144, "delete tenant by id fail, for there are {0} users using it", "删除租户失败,有[{0}]个用户正在使用"), DELETE_WORKER_GROUP_BY_ID_FAIL(10145, "delete worker group by id fail, for there are {0} process instances in executing using it", "删除Worker分组失败,有[{0}]个运行中的工作流实例正在使用"), QUERY_WORKER_GROUP_FAIL(10146, "query worker group fail ", "查询worker分组失败"), DELETE_WORKER_GROUP_FAIL(10147, "delete worker group fail ", "删除worker分组失败"), USER_DISABLED(10148, "The current user is disabled", "当前用户已停用"), COPY_PROCESS_DEFINITION_ERROR(10149, "copy process definition from {0} to {1} error : {2}", "从{0}复制工作流到{1}错误 : {2}"), MOVE_PROCESS_DEFINITION_ERROR(10150, "move process definition from {0} to {1} error : {2}", "从{0}移动工作流到{1}错误 : {2}"), SWITCH_PROCESS_DEFINITION_VERSION_ERROR(10151, "Switch process definition version error", "切换工作流版本出错"), SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_ERROR(10152 , "Switch process definition version error: not exists process definition, [process definition id {0}]", "切换工作流版本出错:工作流不存在,[工作流id {0}]"), SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_VERSION_ERROR(10153 , "Switch process definition version error: not exists process definition version, [process definition id {0}] [version number {1}]", "切换工作流版本出错:工作流版本信息不存在,[工作流id {0}] [版本号 {1}]"), QUERY_PROCESS_DEFINITION_VERSIONS_ERROR(10154, "query process definition versions error", "查询工作流历史版本信息出错"), QUERY_PROCESS_DEFINITION_VERSIONS_PAGE_NO_OR_PAGE_SIZE_LESS_THAN_1_ERROR(10155 , "query process definition versions error: [page number:{0}] < 1 or [page size:{1}] < 1", "查询工作流历史版本出错:[pageNo:{0}] < 1 或 [pageSize:{1}] < 1"), DELETE_PROCESS_DEFINITION_VERSION_ERROR(10156, "delete process definition version error", "删除工作流历史版本出错"), QUERY_USER_CREATED_PROJECT_ERROR(10157, "query user created project error error", "查询用户创建的项目错误"), PROCESS_DEFINITION_IDS_IS_EMPTY(10158, "process definition ids is empty", "工作流IDS不能为空"), BATCH_COPY_PROCESS_DEFINITION_ERROR(10159, "batch copy process definition error", "复制工作流错误"), BATCH_MOVE_PROCESS_DEFINITION_ERROR(10160, "batch move process definition error", "移动工作流错误"), QUERY_WORKFLOW_LINEAGE_ERROR(10161, "query workflow lineage error", "查询血缘失败"), DELETE_PROCESS_DEFINITION_BY_ID_FAIL(10162, "delete process definition by id fail, for there are {0} process instances in executing using it", "删除工作流定义失败,有[{0}]个运行中的工作流实例正在使用"), CHECK_TENANT_CODE_ERROR(10163, "Please enter the English tenant code", "请输入英文租户编码"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
CREATE_ALERT_PLUGIN_INSTANCE_ERROR(10164, "create alert plugin instance error", "创建告警组和告警组插件实例错误"), UPDATE_ALERT_PLUGIN_INSTANCE_ERROR(10165, "update alert plugin instance error", "更新告警组和告警组插件实例错误"), DELETE_ALERT_PLUGIN_INSTANCE_ERROR(10166, "delete alert plugin instance error", "删除告警组和告警组插件实例错误"), GET_ALERT_PLUGIN_INSTANCE_ERROR(10167, "get alert plugin instance error", "获取告警组和告警组插件实例错误"), UDF_FUNCTION_NOT_EXIST(20001, "UDF function not found", "UDF函数不存在"), UDF_FUNCTION_EXISTS(20002, "UDF function already exists", "UDF函数已存在"), RESOURCE_NOT_EXIST(20004, "resource not exist", "资源不存在"), RESOURCE_EXIST(20005, "resource already exists", "资源已存在"), RESOURCE_SUFFIX_NOT_SUPPORT_VIEW(20006, "resource suffix do not support online viewing", "资源文件后缀不支持查看"), RESOURCE_SIZE_EXCEED_LIMIT(20007, "upload resource file size exceeds limit", "上传资源文件大小超过限制"), RESOURCE_SUFFIX_FORBID_CHANGE(20008, "resource suffix not allowed to be modified", "资源文件后缀不支持修改"), UDF_RESOURCE_SUFFIX_NOT_JAR(20009, "UDF resource suffix name must be jar", "UDF资源文件后缀名只支持[jar]"), HDFS_COPY_FAIL(20010, "hdfs copy {0} -> {1} fail", "hdfs复制失败:[{0}] -> [{1}]"), RESOURCE_FILE_EXIST(20011, "resource file {0} already exists in hdfs,please delete it or change name!", "资源文件[{0}]在hdfs中已存在,请删除或修改资源名"), RESOURCE_FILE_NOT_EXIST(20012, "resource file {0} not exists in hdfs!", "资源文件[{0}]在hdfs中不存在"), UDF_RESOURCE_IS_BOUND(20013, "udf resource file is bound by UDF functions:{0}", "udf函数绑定了资源文件[{0}]"), RESOURCE_IS_USED(20014, "resource file is used by process definition", "资源文件被上线的流程定义使用了"), PARENT_RESOURCE_NOT_EXIST(20015, "parent resource not exist", "父资源文件不存在"), RESOURCE_NOT_EXIST_OR_NO_PERMISSION(20016, "resource not exist or no permission,please view the task node and remove error resource", "请检查任务节点并移除无权限或者已删除的资源"), RESOURCE_IS_AUTHORIZED(20017, "resource is authorized to user {0},suffix not allowed to be modified", "资源文件已授权其他用户[{0}],后缀不允许修改"), USER_NO_OPERATION_PERM(30001, "user has no operation privilege", "当前用户没有操作权限"), USER_NO_OPERATION_PROJECT_PERM(30002, "user {0} is not has project {1} permission", "当前用户[{0}]没有[{1}]项目的操作权限"), PROCESS_INSTANCE_NOT_EXIST(50001, "process instance {0} does not exist", "工作流实例[{0}]不存在"), PROCESS_INSTANCE_EXIST(50002, "process instance {0} already exists", "工作流实例[{0}]已存在"), PROCESS_DEFINE_NOT_EXIST(50003, "process definition {0} does not exist", "工作流定义[{0}]不存在"), PROCESS_DEFINE_NOT_RELEASE(50004, "process definition {0} not on line", "工作流定义[{0}]不是上线状态"), PROCESS_INSTANCE_ALREADY_CHANGED(50005, "the status of process instance {0} is already {1}", "工作流实例[{0}]的状态已经是[{1}]"), PROCESS_INSTANCE_STATE_OPERATION_ERROR(50006, "the status of process instance {0} is {1},Cannot perform {2} operation", "工作流实例[{0}]的状态是[{1}],无法执行[{2}]操作"), SUB_PROCESS_INSTANCE_NOT_EXIST(50007, "the task belong to process instance does not exist", "子工作流实例不存在"), PROCESS_DEFINE_NOT_ALLOWED_EDIT(50008, "process definition {0} does not allow edit", "工作流定义[{0}]不允许修改"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
PROCESS_INSTANCE_EXECUTING_COMMAND(50009, "process instance {0} is executing the command, please wait ...", "工作流实例[{0}]正在执行命令,请稍等..."), PROCESS_INSTANCE_NOT_SUB_PROCESS_INSTANCE(50010, "process instance {0} is not sub process instance", "工作流实例[{0}]不是子工作流实例"), TASK_INSTANCE_STATE_COUNT_ERROR(50011, "task instance state count error", "查询各状态任务实例数错误"), COUNT_PROCESS_INSTANCE_STATE_ERROR(50012, "count process instance state error", "查询各状态流程实例数错误"), COUNT_PROCESS_DEFINITION_USER_ERROR(50013, "count process definition user error", "查询各用户流程定义数错误"), START_PROCESS_INSTANCE_ERROR(50014, "start process instance error", "运行工作流实例错误"), EXECUTE_PROCESS_INSTANCE_ERROR(50015, "execute process instance error", "操作工作流实例错误"), CHECK_PROCESS_DEFINITION_ERROR(50016, "check process definition error", "检查工作流实例错误"), QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR(50017, "query recipients and copyers by process definition error", "查询收件人和抄送人错误"), DATA_IS_NOT_VALID(50017, "data {0} not valid", "数据[{0}]无效"), DATA_IS_NULL(50018, "data {0} is null", "数据[{0}]不能为空"), PROCESS_NODE_HAS_CYCLE(50019, "process node has cycle", "流程节点间存在循环依赖"), PROCESS_NODE_S_PARAMETER_INVALID(50020, "process node {0} parameter invalid", "流程节点[{0}]参数无效"), PROCESS_DEFINE_STATE_ONLINE(50021, "process definition {0} is already on line", "工作流定义[{0}]已上线"), DELETE_PROCESS_DEFINE_BY_ID_ERROR(50022, "delete process definition by id error", "删除工作流定义错误"), SCHEDULE_CRON_STATE_ONLINE(50023, "the status of schedule {0} is already on line", "调度配置[{0}]已上线"), DELETE_SCHEDULE_CRON_BY_ID_ERROR(50024, "delete schedule by id error", "删除调度配置错误"), BATCH_DELETE_PROCESS_DEFINE_ERROR(50025, "batch delete process definition error", "批量删除工作流定义错误"), BATCH_DELETE_PROCESS_DEFINE_BY_IDS_ERROR(50026, "batch delete process definition by ids {0} error", "批量删除工作流定义[{0}]错误"), TENANT_NOT_SUITABLE(50027, "there is not any tenant suitable, please choose a tenant available.", "没有合适的租户,请选择可用的租户"), EXPORT_PROCESS_DEFINE_BY_ID_ERROR(50028, "export process definition by id error", "导出工作流定义错误"), BATCH_EXPORT_PROCESS_DEFINE_BY_IDS_ERROR(50028, "batch export process definition by ids error", "批量导出工作流定义错误"), IMPORT_PROCESS_DEFINE_ERROR(50029, "import process definition error", "导入工作流定义错误"), HDFS_NOT_STARTUP(60001, "hdfs not startup", "hdfs未启用"), /** * for monitor */ QUERY_DATABASE_STATE_ERROR(70001, "query database state error", "查询数据库状态错误"), QUERY_ZOOKEEPER_STATE_ERROR(70002, "query zookeeper state error", "查询zookeeper状态错误"), CREATE_ACCESS_TOKEN_ERROR(70010, "create access token error", "创建访问token错误"),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java
GENERATE_TOKEN_ERROR(70011, "generate token error", "生成token错误"), QUERY_ACCESSTOKEN_LIST_PAGING_ERROR(70012, "query access token list paging error", "分页查询访问token列表错误"), UPDATE_ACCESS_TOKEN_ERROR(70013, "update access token error", "更新访问token错误"), DELETE_ACCESS_TOKEN_ERROR(70014, "delete access token error", "删除访问token错误"), ACCESS_TOKEN_NOT_EXIST(70015, "access token not exist", "访问token不存在"), COMMAND_STATE_COUNT_ERROR(80001, "task instance state count error", "查询各状态任务实例数错误"), NEGTIVE_SIZE_NUMBER_ERROR(80002, "query size number error", "查询size错误"), START_TIME_BIGGER_THAN_END_TIME_ERROR(80003, "start time bigger than end time error", "开始时间在结束时间之后错误"), QUEUE_COUNT_ERROR(90001, "queue count error", "查询队列数据错误"), KERBEROS_STARTUP_STATE(100001, "get kerberos startup state error", "获取kerberos启动状态错误"), ; private final int code; private final String enMsg; private final String zhMsg; private Status(int code, String enMsg, String zhMsg) { this.code = code; this.enMsg = enMsg; this.zhMsg = zhMsg; } public int getCode() { return this.code; } public String getMsg() { if (Locale.SIMPLIFIED_CHINESE.getLanguage().equals(LocaleContextHolder.getLocale().getLanguage())) { return this.zhMsg; } else { return this.enMsg; } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/PluginDefineMapper.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.dao.mapper; import org.apache.dolphinscheduler.dao.entity.PluginDefine; import org.apache.ibatis.annotations.Param; import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; public interface PluginDefineMapper extends BaseMapper<PluginDefine> {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,310
[Feature][Alert-SPI] Plug-ins containing UI components provide display pages
*Some plugins (such as alert plugin) need to provide UI interfaces to users. * We use from-creat to dynamically generate UI interfaces. Related parameters are mainly provided by pluginParams. * From-create can generate dynamic ui based on this parameter.
https://github.com/apache/dolphinscheduler/issues/4310
https://github.com/apache/dolphinscheduler/pull/4311
0f31152aeedf56e3a16883ded012952dbcacfc6b
17d44216a4795d9b5a93a35b1457a2ead1f2b2c8
"2020-12-25T09:01:31Z"
java
"2020-12-28T03:25:00Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/PluginDefineMapper.java
/** * query all plugin define * * @return PluginDefine list */ List<PluginDefine> queryAllPluginDefineList(); /** * query by plugin type * * @param pluginType pluginType * @return PluginDefine list */ List<PluginDefine> queryByPluginType(@Param("pluginType") String pluginType); /** * query by name and type * * @param pluginName * @param pluginType * @return */ List<PluginDefine> queryByNameAndType(@Param("pluginName") String pluginName, @Param("pluginType") String pluginType); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.dolphinscheduler.common.utils; import static org.apache.dolphinscheduler.common.Constants.RESOURCE_UPLOAD_PATH; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.enums.ResUploadType; import org.apache.dolphinscheduler.common.enums.ResourceType; import org.apache.commons.io.IOUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileStatus;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.fs.Path; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.yarn.client.cli.RMAdminCLI; import java.io.BufferedReader; import java.io.Closeable; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.security.PrivilegedExceptionAction; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.Stream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; /** * hadoop utils * single instance */ public class HadoopUtils implements Closeable {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
private static final Logger logger = LoggerFactory.getLogger(HadoopUtils.class); private static String hdfsUser = PropertyUtils.getString(Constants.HDFS_ROOT_USER); public static final String resourceUploadPath = PropertyUtils.getString(RESOURCE_UPLOAD_PATH, "/dolphinscheduler"); public static final String rmHaIds = PropertyUtils.getString(Constants.YARN_RESOURCEMANAGER_HA_RM_IDS); public static final String appAddress = PropertyUtils.getString(Constants.YARN_APPLICATION_STATUS_ADDRESS); public static final String jobHistoryAddress = PropertyUtils.getString(Constants.YARN_JOB_HISTORY_STATUS_ADDRESS); private static final String HADOOP_UTILS_KEY = "HADOOP_UTILS_KEY"; private static final LoadingCache<String, HadoopUtils> cache = CacheBuilder .newBuilder() .expireAfterWrite(PropertyUtils.getInt(Constants.KERBEROS_EXPIRE_TIME, 2), TimeUnit.HOURS) .build(new CacheLoader<String, HadoopUtils>() { @Override public HadoopUtils load(String key) throws Exception { return new HadoopUtils(); } }); private static volatile boolean yarnEnabled = false; private Configuration configuration; private FileSystem fs; private HadoopUtils() { init(); initHdfsPath(); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
public static HadoopUtils getInstance() { return cache.getUnchecked(HADOOP_UTILS_KEY); } /** * init dolphinscheduler root path in hdfs */ private void initHdfsPath() { Path path = new Path(resourceUploadPath); try { if (!fs.exists(path)) { fs.mkdirs(path); } } catch (Exception e) { logger.error(e.getMessage(), e); } } /** * init hadoop configuration */ private void init() { try { configuration = new Configuration(); String resourceStorageType = PropertyUtils.getUpperCaseString(Constants.RESOURCE_STORAGE_TYPE); ResUploadType resUploadType = ResUploadType.valueOf(resourceStorageType); if (resUploadType == ResUploadType.HDFS) { if (PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false)) { System.setProperty(Constants.JAVA_SECURITY_KRB5_CONF, PropertyUtils.getString(Constants.JAVA_SECURITY_KRB5_CONF_PATH)); configuration.set(Constants.HADOOP_SECURITY_AUTHENTICATION, "kerberos"); hdfsUser = "";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
UserGroupInformation.setConfiguration(configuration); UserGroupInformation.loginUserFromKeytab(PropertyUtils.getString(Constants.LOGIN_USER_KEY_TAB_USERNAME), PropertyUtils.getString(Constants.LOGIN_USER_KEY_TAB_PATH)); } String defaultFS = configuration.get(Constants.FS_DEFAULTFS); if (defaultFS.startsWith("file")) { String defaultFSProp = PropertyUtils.getString(Constants.FS_DEFAULTFS); if (StringUtils.isNotBlank(defaultFSProp)) { Map<String, String> fsRelatedProps = PropertyUtils.getPrefixedProperties("fs."); configuration.set(Constants.FS_DEFAULTFS, defaultFSProp); fsRelatedProps.forEach((key, value) -> configuration.set(key, value)); } else { logger.error("property:{} can not to be empty, please set!", Constants.FS_DEFAULTFS); throw new RuntimeException( String.format("property: %s can not to be empty, please set!", Constants.FS_DEFAULTFS) ); } } else { logger.info("get property:{} -> {}, from core-site.xml hdfs-site.xml ", Constants.FS_DEFAULTFS, defaultFS); } if (fs == null) { if (StringUtils.isNotEmpty(hdfsUser)) { UserGroupInformation ugi = UserGroupInformation.createRemoteUser(hdfsUser); ugi.doAs(new PrivilegedExceptionAction<Boolean>() { @Override public Boolean run() throws Exception { fs = FileSystem.get(configuration); return true;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
} }); } else { logger.warn("hdfs.root.user is not set value!"); fs = FileSystem.get(configuration); } } } else if (resUploadType == ResUploadType.S3) { System.setProperty(Constants.AWS_S3_V4, Constants.STRING_TRUE); configuration.set(Constants.FS_DEFAULTFS, PropertyUtils.getString(Constants.FS_DEFAULTFS)); configuration.set(Constants.FS_S3A_ENDPOINT, PropertyUtils.getString(Constants.FS_S3A_ENDPOINT)); configuration.set(Constants.FS_S3A_ACCESS_KEY, PropertyUtils.getString(Constants.FS_S3A_ACCESS_KEY)); configuration.set(Constants.FS_S3A_SECRET_KEY, PropertyUtils.getString(Constants.FS_S3A_SECRET_KEY)); fs = FileSystem.get(configuration); } } catch (Exception e) { logger.error(e.getMessage(), e); } } /** * @return Configuration */ public Configuration getConfiguration() { return configuration; } /** * get application url * * @param applicationId application id * @return url of application
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
*/ public String getApplicationUrl(String applicationId) throws Exception { /** * if rmHaIds contains xx, it signs not use resourcemanager * otherwise: * if rmHaIds is empty, single resourcemanager enabled * if rmHaIds not empty: resourcemanager HA enabled */ String appUrl = ""; if (StringUtils.isEmpty(rmHaIds)) { appUrl = appAddress; yarnEnabled = true; } else { appUrl = getAppAddress(appAddress, rmHaIds); yarnEnabled = true; logger.info("application url : {}", appUrl); } if (StringUtils.isBlank(appUrl)) { throw new Exception("application url is blank"); } return String.format(appUrl, applicationId); } public String getJobHistoryUrl(String applicationId) { String jobId = applicationId.replace("application", "job"); return String.format(jobHistoryAddress, jobId); } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
* cat file on hdfs * * @param hdfsFilePath hdfs file path * @return byte[] byte array * @throws IOException errors */ public byte[] catFile(String hdfsFilePath) throws IOException { if (StringUtils.isBlank(hdfsFilePath)) { logger.error("hdfs file path:{} is blank", hdfsFilePath); return new byte[0]; } try (FSDataInputStream fsDataInputStream = fs.open(new Path(hdfsFilePath))) { return IOUtils.toByteArray(fsDataInputStream); } } /** * cat file on hdfs * * @param hdfsFilePath hdfs file path * @param skipLineNums skip line numbers * @param limit read how many lines * @return content of file * @throws IOException errors */ public List<String> catFile(String hdfsFilePath, int skipLineNums, int limit) throws IOException { if (StringUtils.isBlank(hdfsFilePath)) { logger.error("hdfs file path:{} is blank", hdfsFilePath); return Collections.emptyList(); } try (FSDataInputStream in = fs.open(new Path(hdfsFilePath))) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
BufferedReader br = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8)); Stream<String> stream = br.lines().skip(skipLineNums).limit(limit); return stream.collect(Collectors.toList()); } } /** * make the given file and all non-existent parents into * directories. Has the semantics of Unix 'mkdir -p'. * Existence of the directory hierarchy is not an error. * * @param hdfsPath path to create * @return mkdir result * @throws IOException errors */ public boolean mkdir(String hdfsPath) throws IOException { return fs.mkdirs(new Path(hdfsPath)); } /** * copy files between FileSystems * * @param srcPath source hdfs path * @param dstPath destination hdfs path * @param deleteSource whether to delete the src * @param overwrite whether to overwrite an existing file * @return if success or not * @throws IOException errors */ public boolean copy(String srcPath, String dstPath, boolean deleteSource, boolean overwrite) throws IOException { return FileUtil.copy(fs, new Path(srcPath), fs, new Path(dstPath), deleteSource, overwrite, fs.getConf()); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
/** * the src file is on the local disk. Add it to FS at * the given dst name. * * @param srcFile local file * @param dstHdfsPath destination hdfs path * @param deleteSource whether to delete the src * @param overwrite whether to overwrite an existing file * @return if success or not * @throws IOException errors */ public boolean copyLocalToHdfs(String srcFile, String dstHdfsPath, boolean deleteSource, boolean overwrite) throws IOException { Path srcPath = new Path(srcFile); Path dstPath = new Path(dstHdfsPath); fs.copyFromLocalFile(deleteSource, overwrite, srcPath, dstPath); return true; } /** * copy hdfs file to local * * @param srcHdfsFilePath source hdfs file path * @param dstFile destination file * @param deleteSource delete source * @param overwrite overwrite * @return result of copy hdfs file to local * @throws IOException errors */ public boolean copyHdfsToLocal(String srcHdfsFilePath, String dstFile, boolean deleteSource, boolean overwrite) throws IOException { Path srcPath = new Path(srcHdfsFilePath); File dstPath = new File(dstFile);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
if (dstPath.exists()) { if (dstPath.isFile()) { if (overwrite) { Files.delete(dstPath.toPath()); } } else { logger.error("destination file must be a file"); } } if (!dstPath.getParentFile().exists()) { dstPath.getParentFile().mkdirs(); } return FileUtil.copy(fs, srcPath, dstPath, deleteSource, fs.getConf()); } /** * delete a file * * @param hdfsFilePath the path to delete. * @param recursive if path is a directory and set to * true, the directory is deleted else throws an exception. In * case of a file the recursive can be set to either true or false. * @return true if delete is successful else false. * @throws IOException errors */ public boolean delete(String hdfsFilePath, boolean recursive) throws IOException { return fs.delete(new Path(hdfsFilePath), recursive); } /** * check if exists *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
* @param hdfsFilePath source file path * @return result of exists or not * @throws IOException errors */ public boolean exists(String hdfsFilePath) throws IOException { return fs.exists(new Path(hdfsFilePath)); } /** * Gets a list of files in the directory * * @param filePath file path * @return {@link FileStatus} file status * @throws Exception errors */ public FileStatus[] listFileStatus(String filePath) throws Exception { try { return fs.listStatus(new Path(filePath)); } catch (IOException e) { logger.error("Get file list exception", e); throw new Exception("Get file list exception", e); } } /** * Renames Path src to Path dst. Can take place on local fs * or remote DFS. * * @param src path to be renamed * @param dst new path after rename * @return true if rename is successful * @throws IOException on failure
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
*/ public boolean rename(String src, String dst) throws IOException { return fs.rename(new Path(src), new Path(dst)); } /** * hadoop resourcemanager enabled or not * * @return result */ public boolean isYarnEnabled() { return yarnEnabled; } /** * get the state of an application * * @param applicationId application id * @return the return may be null or there may be other parse exceptions */ public ExecutionStatus getApplicationStatus(String applicationId) throws Exception { if (StringUtils.isEmpty(applicationId)) { return null; } String result = Constants.FAILED; String applicationUrl = getApplicationUrl(applicationId); logger.info("applicationUrl={}", applicationUrl); String responseContent; if (PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false)) { responseContent = KerberosHttpClient.get(applicationUrl); } else { responseContent = HttpUtils.get(applicationUrl);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
} if (responseContent != null) { ObjectNode jsonObject = JSONUtils.parseObject(responseContent); if (!jsonObject.has("app")) { return ExecutionStatus.FAILURE; } result = jsonObject.path("app").path("finalStatus").asText(); } else { String jobHistoryUrl = getJobHistoryUrl(applicationId); logger.info("jobHistoryUrl={}", jobHistoryUrl); responseContent = HttpUtils.get(jobHistoryUrl); if (null != responseContent) { ObjectNode jsonObject = JSONUtils.parseObject(responseContent); if (!jsonObject.has("job")) { return ExecutionStatus.FAILURE; } result = jsonObject.path("job").path("state").asText(); } else { return ExecutionStatus.FAILURE; } } switch (result) { case Constants.ACCEPTED: return ExecutionStatus.SUBMITTED_SUCCESS; case Constants.SUCCEEDED: return ExecutionStatus.SUCCESS; case Constants.NEW: case Constants.NEW_SAVING: case Constants.SUBMITTED:
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
case Constants.FAILED: return ExecutionStatus.FAILURE; case Constants.KILLED: return ExecutionStatus.KILL; case Constants.RUNNING: default: return ExecutionStatus.RUNNING_EXECUTION; } } /** * get data hdfs path * * @return data hdfs path */ public static String getHdfsDataBasePath() { if ("/".equals(resourceUploadPath)) { return ""; } else { return resourceUploadPath; } } /** * hdfs resource dir * * @param tenantCode tenant code * @param resourceType resource type * @return hdfs resource dir */ public static String getHdfsDir(ResourceType resourceType, String tenantCode) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,314
[Question] dolphinscheduler cannot get the YARN address
The task is submitted and run successfully, but dolphinscheduler reports that the task status failed After querying the log, it is found that the obtained yarn address is null, but the hosts and common are configured normally, and the yarn node is normally accessed 任务提交并运行成功,但dolphinscheduler报告任务状态失败 查询日志后发现获取到的yarn地址为null,但hosts与common均配置正常,且yarn节点正常访问 hosts ```properties 192.169.199.105 hdnn01 192.168.199.106 hdnn02 192.168.199.107 hdnn03 ``` common.properties ```properties # if resourcemanager HA enable, please type the HA ips ; if resourcemanager is single, make this value empty yarn.resourcemanager.ha.rm.ids=hdnn01,hdnn02,hdnn03 # if resourcemanager HA enable or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname. yarn.application.status.address=http://yarnIp1:8088/ws/v1/cluster/apps/%s ``` dolphinscheduler-worker.log ``` [INFO] 2020-12-25 18:17:30.759 - [taskAppId=TASK-3-4-17]:[193] - process start, process id is: 107032 [INFO] 2020-12-25 18:18:52.502 - [taskAppId=TASK-3-4-17]:[202] - process has exited, execute path:/tmp/dolphinscheduler/exec/process/1/3/4/17, processId:107032 ,exitStatusCode:0 [INFO] 2020-12-25 18:18:52.504 - [taskAppId=TASK-3-4-17]:[419] - find app id: application_1608880603127_0014 [INFO] 2020-12-25 18:18:52.576 org.apache.dolphinscheduler.common.utils.HadoopUtils:[144] - get property:fs.defaultFS -> hdfs://hdcluster, from core-site.xml hdfs-site.xml [INFO] 2020-12-25 18:19:09.220 org.apache.dolphinscheduler.common.utils.HadoopUtils:[206] - application url : http://null:8088/ws/v1/cluster/apps/%s [ERROR] 2020-12-25 18:19:24.259 org.apache.dolphinscheduler.common.utils.HttpUtils:[73] - null: Name or service not known java.net.UnknownHostException: null: Name or service not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.dolphinscheduler.common.utils.HttpUtils.get(HttpUtils.java:60) at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:412) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [ERROR] 2020-12-25 18:19:24.260 - [taskAppId=TASK-3-4-17]:[392] - yarn applications: [application_1608880603127_0014] status failed java.lang.NullPointerException: null at org.apache.dolphinscheduler.common.utils.HadoopUtils.getApplicationStatus(HadoopUtils.java:415) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.isSuccessOfYarnState(AbstractCommandExecutor.java:378) at org.apache.dolphinscheduler.server.worker.task.AbstractCommandExecutor.run(AbstractCommandExecutor.java:218) at org.apache.dolphinscheduler.server.worker.task.AbstractYarnTask.handle(AbstractYarnTask.java:57) at org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread.run(TaskExecuteThread.java:129) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) [INFO] 2020-12-25 18:19:24.261 org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread:[137] - task instance id : 17,task final status : FAILURE ```
https://github.com/apache/dolphinscheduler/issues/4314
https://github.com/apache/dolphinscheduler/pull/4344
b9e8dbed2f9dd29f51b30411f80bc92a0ca04c06
ccd06fec16bae7da97bc4f61c45d4b471dccebc4
"2020-12-26T06:57:41Z"
java
"2020-12-30T03:03:36Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
String hdfsDir = ""; if (resourceType.equals(ResourceType.FILE)) { hdfsDir = getHdfsResDir(tenantCode); } else if (resourceType.equals(ResourceType.UDF)) { hdfsDir = getHdfsUdfDir(tenantCode); } return hdfsDir; } /** * hdfs resource dir * * @param tenantCode tenant code * @return hdfs resource dir */ public static String getHdfsResDir(String tenantCode) { return String.format("%s/resources", getHdfsTenantDir(tenantCode)); } /** * hdfs user dir * * @param tenantCode tenant code * @param userId user id * @return hdfs resource dir */ public static String getHdfsUserDir(String tenantCode, int userId) { return String.format("%s/home/%d", getHdfsTenantDir(tenantCode), userId); } /** * hdfs udf dir *