Skip to content

Instantly share code, notes, and snippets.

@wjf222
Last active March 31, 2023 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wjf222/3096c65bae2b4e9073f484b3dc090de6 to your computer and use it in GitHub Desktop.
Save wjf222/3096c65bae2b4e9073f484b3dc090de6 to your computer and use it in GitHub Desktop.

Project: Apache DolphinScheduler: Support etcd as registry
Related Issue: apache/dolphinscheduler#8975
Code Repository: https://github.com/wjf222/dolphinscheduler
Mentors: Wenjun Ruan,Caishunfeng

Project Abstract

The registry of DolphinScheduler is mainly used to store metadata information of Master and Worker nodes. Currently dolphinscheduler-registry-api has defined the standard for implementing the plugin.

Currently DolphinScheduler has implemented the Zookeepeer plugin as a registry, Zookeeper uses the client-side framework Curator to implement the following interfaces, interface functionality is divided into several main parts: CRUD, Subscribe (Watch), Auth, Sessiontime Lock, Active close,ConnectionStateListen.

Etcd is a distributed key-value storage system with excellent mechanisms for read and write performance, consistency and availability, making it ideal for the configuration center role. This can help user who only familiar with etcd to use dolphinscheduler.

Contributions

This module is the etcd registry plugin module, this plugin will use etcd as the registry center.

How to use

If you want to set the registry center as etcd, you need to set the registry properties in master/worker/api/appplication.yml

registry:
  type: etcd
  endpoints: "http://etcd0:2379, http://etcd1:2379, http://etcd2:2379"
  # The options below have default values
  namespace: dolphinscheduler
  connectionTimeout: 9s
  # The unit is milliseconds
  retryDelay: 60ms
  retryMaxDelay: 300ms
  retryMaxDuration: 1500ms
  # The following options are set according to personal needs
  user: ""
  password: ""
  authority: ""
  loadBalancerPolicy: ""

After do this config, you can start your DolphinScheduler cluster, your cluster will use etcd as registry center to store server metadata.

Merged pull requests

Conclusion

Gsoc allowed me to work on a large project for the first time and implement a feature. Community members have actively reviewed my code, which has greatly improved the code I wrote compared to the original version, and gained a deeper understanding of non-code issues such as licenses, specifications, and ease of use. Special thanks to Mr. Wenjun for his help.

Thank you
Regards
Wenjun Ruan,Caishunfeng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment