DarkAssassinator commented on code in PR #12136:
URL: https://github.com/apache/dolphinscheduler/pull/12136#discussion_r984268332
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkerGroupServiceImpl.java:
##########
@@ -400,4 +400,22 @@ public Map<String, Object> getWorkerAddressList() {
return result;
}
+ /**
+ * get all worker group names
+ *
+ * @return worker group name list
+ */
+ @Override
+ public List<String> getAllWorkerGroupNames() {
+ List<WorkerGroup> workerGroups = getWorkerGroups(false, null);
+ List<String> availableWorkerGroupList = workerGroups.stream()
+ .map(WorkerGroup::getName)
+ .collect(Collectors.toList());
+ if
(!availableWorkerGroupList.contains(Constants.DEFAULT_WORKER_GROUP)) {
Review Comment:
> availableWorkerGroupList maybe null.
It will not be null, because mybatis mapper will return a empty list, not
null. Mybatis just will return null if return type is a DTO. thx
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]