You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/30 06:45:02 UTC
[GitHub] [dolphinscheduler] hstdream commented on a diff in pull request #12136: [Improvement][Master]add worker group checking steps before workflow executor
hstdream commented on code in PR #12136:
URL: https://github.com/apache/dolphinscheduler/pull/12136#discussion_r984259953
##########
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.
--
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org