fix(web): 修复获取 yarn 队列没有过滤集群

This commit is contained in:
2023-05-31 23:54:36 +08:00
parent 156ddf8033
commit d4c25c812e
2 changed files with 5 additions and 1 deletions

View File

@@ -60,6 +60,10 @@ public class YarnClusterService {
return servicesMap.valuesView().toList().toImmutable();
}
public ImmutableList<YarnService> services(ImmutableSet<String> clusters) {
return clusters.toList().collect(this::service).toImmutable();
}
public ImmutableMap<String, YarnService> servicesMap() {
return servicesMap;
}

View File

@@ -109,7 +109,7 @@ public class YarnController extends BaseController {
public AmisResponse queueList(@RequestParam("clusters") List<String> clusters, @RequestParam(value = "names", defaultValue = "") String names) {
boolean isFilterNames = StrUtil.isNotBlank(names);
ImmutableList<String> filterNames = Lists.immutable.of(names.split(","));
ImmutableList<YarnClusterVO> results = yarnClusterService.services()
ImmutableList<YarnClusterVO> results = yarnClusterService.services(Sets.immutable.ofAll(clusters))
.asParallel(EXECUTOR, 1)
.collect(yarnService -> {
YarnRootQueue cluster = yarnService.cluster();