Skip to content

Refactor registry plugin and simplify its usage#6712

Merged
CalvinKirs merged 1 commit intoapache:devfrom
kezhenxu94:plugin-refactor/registry
Nov 7, 2021
Merged

Refactor registry plugin and simplify its usage#6712
CalvinKirs merged 1 commit intoapache:devfrom
kezhenxu94:plugin-refactor/registry

Conversation

@kezhenxu94
Copy link
Member

@kezhenxu94 kezhenxu94 commented Nov 6, 2021

Purpose of the pull request

This pull request refactors the registry plugin mechanism and simplifies its usage and registry plugin development.

Now the configuration to run locally and in production is the same so users won't get errors like #6129 #5643 and #5793

Brief change log

  • Split the registry plugin from DolphinScheduler's plugin system and use Java SPI directly.
  • Minimize the interface of registry so contributors can easily develop a new registry plugin.

@kezhenxu94
Copy link
Member Author

kezhenxu94 commented Nov 6, 2021

@CalvinKirs @dailidong @lenboo can you please take a look?

@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2021

Codecov Report

Merging #6712 (c7f1528) into dev (1144360) will increase coverage by 0.20%.
The diff coverage is 13.97%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #6712      +/-   ##
============================================
+ Coverage     37.69%   37.90%   +0.20%     
+ Complexity     3236     3233       -3     
============================================
  Files           650      642       -8     
  Lines         26546    26378     -168     
  Branches       2876     2858      -18     
============================================
- Hits          10006     9998       -8     
+ Misses        15621    15462     -159     
+ Partials        919      918       -1     
Impacted Files Coverage Δ
...scheduler/api/service/impl/MonitorServiceImpl.java 13.95% <0.00%> (-0.34%) ⬇️
.../org/apache/dolphinscheduler/common/Constants.java 79.16% <ø> (ø)
...apache/dolphinscheduler/common/enums/NodeType.java 0.00% <0.00%> (ø)
...gin/registry/zookeeper/ZookeeperConfiguration.java 100.00% <ø> (ø)
...ry/zookeeper/ZookeeperConnectionStateListener.java 0.00% <0.00%> (ø)
...n/registry/zookeeper/ZookeeperRegistryFactory.java 0.00% <0.00%> (ø)
...er/master/registry/MasterRegistryDataListener.java 0.00% <0.00%> (ø)
...uler/server/master/registry/ServerNodeManager.java 1.29% <0.00%> (-0.04%) ⬇️
...nscheduler/server/monitor/RegistryMonitorImpl.java 0.00% <0.00%> (ø)
...olphinscheduler/server/registry/HeartBeatTask.java 27.58% <0.00%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1144360...c7f1528. Read the comment docs.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

23.7% 23.7% Coverage
0.0% 0.0% Duplication

registry.plugin.dir=./dolphinscheduler-dist/target/dolphinscheduler-dist-2.0.0-SNAPSHOT/lib/plugin/registry/zookeeper
registry.plugin.name=zookeeper
registry.servers=127.0.0.1:2181
dolphinscheduler/dolphinscheduler-e2e @kezhenxu94
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it necessary? '@kezhenxu94'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it necessary? '@kezhenxu94'

This is an example to list "maintainers" for some specific modules, github will automatically request their review when these modules are modified in pull requests, you and other maintainers can also add the modules you are responsible for. Does it make sense to you?

Copy link
Member

@CalvinKirs CalvinKirs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@CalvinKirs CalvinKirs merged commit 5400abc into apache:dev Nov 7, 2021
@kezhenxu94 kezhenxu94 deleted the plugin-refactor/registry branch November 7, 2021 07:25
@davidzollo
Copy link
Contributor

good job

@CalvinKirs CalvinKirs added this to the 2.0.0-release milestone Nov 10, 2021
lenboo pushed a commit that referenced this pull request Nov 26, 2021
…6999)

* [2.0.1-prepare#6712]Refactor registry plugin and simplify its usage (#6712)

* upgrade version and fix dep err

* Clean up the utility codes (#6732)

* remove code style check

* upgrade docker version

Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants