gaojun2048 commented on a change in pull request #5562:
URL: https://github.com/apache/dolphinscheduler/pull/5562#discussion_r647911597
##########
File path:
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/WorkerGroupServiceImpl.java
##########
@@ -150,7 +153,7 @@ private boolean checkWorkerGroupNameExists(WorkerGroup
workerGroup) {
* @return boolean
*/
private String checkWorkerGroupAddrList(WorkerGroup workerGroup) {
- Map<String, String> serverMaps =
zookeeperMonitor.getServerMaps(ZKNodeType.WORKER, true);
+ Map<String, String> serverMaps =
registryMonitor.getServerMaps(NodeType.WORKER, true);
for (String addr : workerGroup.getAddrList().split(Constants.COMMA)) {
Review comment:
A little question, can we guarantee that addrList in each workergroup is
not null?
##########
File path:
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/PropertyUtils.java
##########
@@ -255,4 +258,21 @@ public static void setValue(String key, String value) {
properties.setProperty(key, value);
}
+ public static Map<String, String> getPropertiesByPrefix(String prefix) {
+ if (Strings.isEmpty(prefix)) {
+ return null;
Review comment:
Return 'null' in this method can trigger a NullPointException at line 98
of class file RegistryCenter.java
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]