fix(web): 修复获取 yarn 队列没有过滤集群
This commit is contained in:
@@ -60,6 +60,10 @@ public class YarnClusterService {
|
|||||||
return servicesMap.valuesView().toList().toImmutable();
|
return servicesMap.valuesView().toList().toImmutable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ImmutableList<YarnService> services(ImmutableSet<String> clusters) {
|
||||||
|
return clusters.toList().collect(this::service).toImmutable();
|
||||||
|
}
|
||||||
|
|
||||||
public ImmutableMap<String, YarnService> servicesMap() {
|
public ImmutableMap<String, YarnService> servicesMap() {
|
||||||
return servicesMap;
|
return servicesMap;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class YarnController extends BaseController {
|
|||||||
public AmisResponse queueList(@RequestParam("clusters") List<String> clusters, @RequestParam(value = "names", defaultValue = "") String names) {
|
public AmisResponse queueList(@RequestParam("clusters") List<String> clusters, @RequestParam(value = "names", defaultValue = "") String names) {
|
||||||
boolean isFilterNames = StrUtil.isNotBlank(names);
|
boolean isFilterNames = StrUtil.isNotBlank(names);
|
||||||
ImmutableList<String> filterNames = Lists.immutable.of(names.split(","));
|
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)
|
.asParallel(EXECUTOR, 1)
|
||||||
.collect(yarnService -> {
|
.collect(yarnService -> {
|
||||||
YarnRootQueue cluster = yarnService.cluster();
|
YarnRootQueue cluster = yarnService.cluster();
|
||||||
|
|||||||
Reference in New Issue
Block a user