[Feature-3134]Refactor to use a shared singleton Curator Zookeeper Client#3244
Conversation
sync official
sync official
sync official
sync official
sync official
sync official
...-server/src/main/java/org/apache/dolphinscheduler/server/master/registry/MasterRegistry.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## dev #3244 +/- ##
============================================
+ Coverage 34.15% 34.39% +0.23%
- Complexity 2422 2446 +24
============================================
Files 443 444 +1
Lines 20637 20634 -3
Branches 2531 2527 -4
============================================
+ Hits 7049 7097 +48
+ Misses 12926 12870 -56
- Partials 662 667 +5
Continue to review full report at Codecov.
|
| public void initStateLister() { | ||
| checkNotNull(zkClient); | ||
|
|
||
| zkClient.getConnectionStateListenable().addListener((client, newState) -> { |
There was a problem hiding this comment.
Hi,
Because remove the master zk address log from MasterRegistry, please add the master zk address to log, not the zk server info.
因为我们是从masterregistry中删除了master zk节点的日志,想要添加到CuratorZkCLient中。所以CuratorZkCLient日志信息应该是master zk节点的日志信息,而不是zk地址信息。
If you have any question or suggestion, please put forward.
There was a problem hiding this comment.
又看了一下,这里不只是日志的问题,而是原来代码里在Reconnected的时候,有个保存临时节点的操作。那可能确实不能简单地删掉,还要再分析下
There was a problem hiding this comment.
又看了一下,这里不是日志的问题,而是原来代码里在Reconnected的时候,有个保存临时节点的操作。那可能确实不能简单地删掉,还要再分析下
I agree with you~
There was a problem hiding this comment.
已经把对这个类的修改恢复了
|
Kudos, SonarCloud Quality Gate passed!
|

Tips
What is the purpose of the pull request
fix #3134
Brief change log
(for example:)
Verify this pull request
(Please pick either of the following options)
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)