From 7eb7efbd3472e8a0c2ed050a3ea98becd296f690 Mon Sep 17 00:00:00 2001 From: qiaozhanwei Date: Mon, 25 May 2020 17:59:02 +0800 Subject: [PATCH] compatible old version host not port delete log file (#2811) * add LoggerServerTest UT * add LoggerServerTest UT * add LoggerServerTest UT add RemoveTaskLogRequestCommandTest UT add RemoveTaskLogResponseCommandTest * master select worker filter high load worker #2704 * master select worker filter high load worker #2704 * master select worker filter high load worker #2704 * master select worker filter high load worker #2704 * master select worker filter high load worker #2704 * master select worker filter high load worker #2704 * add not worker log and remove worker invalid property * process definition json worker group convert #2794 * process definition json worker group convert #2794 * process definition json worker group convert #2794 * process definition json worker group convert #2794 * process definition json worker group convert #2794 * process definition json worker group convert #2794 * process definition json worker group convert #2794 * process definition json worker group convert #2794 * compatible old version host not port delete log file Co-authored-by: qiaozhanwei --- .../dolphinscheduler/service/process/ProcessService.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java index 6c4356fe96..36e2b60d18 100644 --- a/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java +++ b/dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java @@ -325,8 +325,15 @@ public class ProcessService { if (StringUtils.isEmpty(taskInstance.getHost())){ continue; } - String ip = Host.of(taskInstance.getHost()).getIp(); int port = Constants.RPC_PORT; + String ip = ""; + try { + ip = Host.of(taskInstance.getHost()).getIp(); + }catch (Exception e){ + // compatible old version + ip = taskInstance.getHost(); + } + // remove task log from loggerserver logClient.removeTaskLog(ip,port,taskLogPath);