use of com.dtstack.taier.develop.vo.console.EngineVO in project Taier by DTStack.
the class ConsoleClusterService method fillEngineQueueInfo.
private ClusterEngineVO fillEngineQueueInfo(Map<Long, Set<MultiEngineType>> clusterEngineMapping, Map<Long, List<Queue>> engineQueueMapping, Cluster cluster) {
ClusterEngineVO vo = ClusterEngineVO.toVO(cluster);
Set<MultiEngineType> engineList = clusterEngineMapping.get(vo.getClusterId());
if (CollectionUtils.isNotEmpty(engineList)) {
List<EngineVO> engineVOS = new ArrayList<>();
for (MultiEngineType multiEngineType : engineList) {
EngineVO engineVO = new EngineVO();
engineVO.setEngineType(multiEngineType.getType());
engineVO.setEngineName(multiEngineType.getName());
engineVO.setClusterId(cluster.getId());
if (MultiEngineType.HADOOP.equals(multiEngineType)) {
engineVO.setQueues(QueueVO.toVOs(engineQueueMapping.get(cluster.getId())));
}
engineVOS.add(engineVO);
}
engineVOS.sort(Comparator.comparingInt(EngineVO::getEngineType));
vo.setEngines(engineVOS);
}
return vo;
}
Aggregations