fix(command): 修复没有初始化launcher service
This commit is contained in:
@@ -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("启动表压缩任务")
|
||||
|
||||
Reference in New Issue
Block a user