From 84edea7593216688d839b458d47785d6ade18ad0 Mon Sep 17 00:00:00 2001 From: Rick Cheng <38122586+rickchengx@users.noreply.github.com> Date: Sat, 6 May 2023 17:00:53 +0800 Subject: [PATCH] [Improvement-14052][Log] Remove the useless filter in getAppIdsFromLogFile (#14053) --- .../dolphinscheduler/plugin/task/api/utils/LogUtils.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/LogUtils.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/LogUtils.java index de2f8d68a1..b2aee43325 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/LogUtils.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-api/src/main/java/org/apache/dolphinscheduler/plugin/task/api/utils/LogUtils.java @@ -164,10 +164,7 @@ public class LogUtils { } Set appIds = new HashSet<>(); try (Stream stream = Files.lines(Paths.get(logPath))) { - stream.filter(line -> { - Matcher matcher = APPLICATION_REGEX.matcher(line); - return matcher.find(); - }).forEach(line -> { + stream.forEach(line -> { Matcher matcher = APPLICATION_REGEX.matcher(line); if (matcher.find()) { String appId = matcher.group();