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("启动表压缩任务")