apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code
https://dolphinscheduler.apache.org/
Apache License 2.0
12.88k stars 4.63k forks source link

[DSIP-54][Master] Use ClusterManager to manage the cluster in master #16262

Closed ruanwenjun closed 4 months ago

ruanwenjun commented 4 months ago

Search before asking

Motivation

Right now, ds will use master slot to calculate the command slot, and use worker group mapping to select the worker to dispatched the task to worker.

The problem is the code in master is difficult to maintain, there are rise a lot of bug related to the node manager. This PR is aim to refactor the ServerNodeManager and split the code in different component.

Design Detail

The design looks like below:

image

ClusterManager: used to manage the metadata of the whole clusters include master clusters/worker clusters. MasterClusters: used to manage the metadata of the master clusters. WorkerCluster: used to manage the metadata of the worker clusters, include the worker group mapping.

The key point is split the business code from registry, the business code don't need to take care of the registry component.

Compatibility, Deprecation, and Migration Plan

Compatibility

Test Plan

Test by UT and E2E

Code of Conduct