|
|
@ -292,9 +292,9 @@ public class WorkerGroupServiceImpl extends BaseServiceImpl implements WorkerGro |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
workerGroups = workerGroupMapper.queryAllWorkerGroup(); |
|
|
|
workerGroups = workerGroupMapper.queryAllWorkerGroup(); |
|
|
|
} |
|
|
|
} |
|
|
|
Optional<Boolean> containDefaultWorkerGroups = workerGroups.stream() |
|
|
|
boolean containDefaultWorkerGroups = workerGroups.stream() |
|
|
|
.map(workerGroup -> Constants.DEFAULT_WORKER_GROUP.equals(workerGroup.getName())).findAny(); |
|
|
|
.anyMatch(workerGroup -> Constants.DEFAULT_WORKER_GROUP.equals(workerGroup.getName())); |
|
|
|
if (!containDefaultWorkerGroups.isPresent() || !containDefaultWorkerGroups.get()) { |
|
|
|
if (!containDefaultWorkerGroups) { |
|
|
|
// there doesn't exist a default WorkerGroup, we will add all worker to the default worker group.
|
|
|
|
// there doesn't exist a default WorkerGroup, we will add all worker to the default worker group.
|
|
|
|
Set<String> activeWorkerNodes = registryClient.getServerNodeSet(NodeType.WORKER); |
|
|
|
Set<String> activeWorkerNodes = registryClient.getServerNodeSet(NodeType.WORKER); |
|
|
|
WorkerGroup defaultWorkerGroup = new WorkerGroup(); |
|
|
|
WorkerGroup defaultWorkerGroup = new WorkerGroup(); |
|
|
|