From 0b5cea70532ff08fce84e6baa8c2b36c6a50f3ee Mon Sep 17 00:00:00 2001 From: v-zhangjc9 Date: Tue, 19 Mar 2024 16:27:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(command):=20=E4=BF=AE=E5=A4=8D=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=88=9D=E5=A7=8B=E5=8C=96launcher=20service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/command/commands/CompactionCommand.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/service-command/src/main/java/com/lanyuanxiaoyao/service/command/commands/CompactionCommand.java b/service-command/src/main/java/com/lanyuanxiaoyao/service/command/commands/CompactionCommand.java index 49a0509..7ec4c78 100644 --- a/service-command/src/main/java/com/lanyuanxiaoyao/service/command/commands/CompactionCommand.java +++ b/service-command/src/main/java/com/lanyuanxiaoyao/service/command/commands/CompactionCommand.java @@ -5,8 +5,10 @@ import com.lanyuanxiaoyao.service.command.utils.CommandLineUtils; import com.lanyuanxiaoyao.service.command.utils.TableUtils; import com.lanyuanxiaoyao.service.common.Constants; import com.lanyuanxiaoyao.service.common.entity.TableMeta; +import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnClusters; import com.lanyuanxiaoyao.service.forest.service.InfoService; import com.lanyuanxiaoyao.service.forest.service.launcher.LauncherService; +import com.lanyuanxiaoyao.service.forest.service.launcher.LaunchersService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.shell.standard.ShellComponent; @@ -28,9 +30,10 @@ public class CompactionCommand extends AbstractUtilShellComponent { private final InfoService infoService; private final LauncherService launcherService; - public CompactionCommand(InfoService infoService, LauncherService launcherService) { + public CompactionCommand(InfoService infoService, YarnClusters yarnClusters, LaunchersService launchersService) { this.infoService = infoService; - this.launcherService = launcherService; + logger.info("Default sync cluster: {}", yarnClusters.getDefaultSyncCluster()); + this.launcherService = launchersService.getService(yarnClusters.getDefaultSyncCluster()); } @ShellMethod("启动表压缩任务")