feature(web): 增加 a4 集群的监控

This commit is contained in:
2023-05-31 18:50:52 +08:00
parent 08f2b43ee6
commit 6132f46325
8 changed files with 276 additions and 155 deletions

View File

@@ -7,7 +7,8 @@ import com.lanyuanxiaoyao.service.configuration.entity.AmisResponse;
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnApplication;
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnQueue;
import com.lanyuanxiaoyao.service.configuration.entity.yarn.YarnRootQueue;
import com.lanyuanxiaoyao.service.forest.service.*;
import com.lanyuanxiaoyao.service.forest.service.YarnClusterService;
import com.lanyuanxiaoyao.service.forest.service.YarnService;
import com.lanyuanxiaoyao.service.web.entity.YarnApplicationVO;
import com.lanyuanxiaoyao.service.web.entity.YarnClusterVO;
import com.lanyuanxiaoyao.service.web.utils.ComparatorUtil;
@@ -47,14 +48,8 @@ public class YarnController extends BaseController {
);
private final ImmutableMap<String, YarnService> yarnServices;
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
public YarnController(YarnB1Service yarnB1Service, YarnB5SyncService yarnB5SyncService, YarnB4Service yarnB4Service, YarnB5Service yarnB5Service) {
yarnServices = Maps.immutable.ofAll(MapUtil.<String, YarnService>builder()
.put("b1", yarnB1Service)
.put("b5-sync", yarnB5SyncService)
.put("b4", yarnB4Service)
.put("b5", yarnB5Service)
.build());
public YarnController(YarnClusterService yarnClusterService) {
this.yarnServices = yarnClusterService.servicesMap();
}
private YarnService getService(String cluster) {