未验证 提交 445b08c4 编写于 作者: J JiPeng Wang 提交者: GitHub

Merge pull request #74 from insist777/default-worker-group

Skip default group name check
...@@ -118,12 +118,12 @@ public class WorkerGroupServiceImpl extends BaseServiceImpl implements WorkerGro ...@@ -118,12 +118,12 @@ public class WorkerGroupServiceImpl extends BaseServiceImpl implements WorkerGro
putMsg(result, Status.WORKER_ADDRESS_INVALID, invalidAddr); putMsg(result, Status.WORKER_ADDRESS_INVALID, invalidAddr);
return result; return result;
} }
handleDefaultWorkGroup(workerGroupMapper, workerGroup, loginUser, otherParamsJson); saveWorkGroup(workerGroupMapper, workerGroup, loginUser, otherParamsJson);
putMsg(result, Status.SUCCESS); putMsg(result, Status.SUCCESS);
return result; return result;
} }
protected void handleDefaultWorkGroup(WorkerGroupMapper workerGroupMapper, WorkerGroup workerGroup, User loginUser, String otherParamsJson) { protected void saveWorkGroup(WorkerGroupMapper workerGroupMapper, WorkerGroup workerGroup, User loginUser, String otherParamsJson) {
if (workerGroup.getId() != 0) { if (workerGroup.getId() != 0) {
workerGroupMapper.updateById(workerGroup); workerGroupMapper.updateById(workerGroup);
} else { } else {
...@@ -152,6 +152,10 @@ public class WorkerGroupServiceImpl extends BaseServiceImpl implements WorkerGro ...@@ -152,6 +152,10 @@ public class WorkerGroupServiceImpl extends BaseServiceImpl implements WorkerGro
} }
} }
} }
// skip default group name check
if (Constants.DEFAULT.equals(workerGroup.getName())) {
return false;
}
// check zookeeper // check zookeeper
String workerGroupPath = Constants.REGISTRY_DOLPHINSCHEDULER_WORKERS + Constants.SINGLE_SLASH + workerGroup.getName(); String workerGroupPath = Constants.REGISTRY_DOLPHINSCHEDULER_WORKERS + Constants.SINGLE_SLASH + workerGroup.getName();
return registryClient.exists(workerGroupPath); return registryClient.exists(workerGroupPath);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册