Apache DolphinScheduler 大家应该都比较熟悉了吧,是国内团队做的,在文档、使用体验和社区沟通上,国内都比较有优势的。它是一个分布式去中心化,易扩展的可视化DAG工作流任务调度平台。致力于解决数据处理流程中错综复杂的依赖关系,使调度系统在数据处理流程中开箱即用。
说的简单点: DS 就是一个调度平台。
开发环境搭建开发环境的具体依赖要求和搭建过程,大家可以参考文档:https://dolphinscheduler.apache.org/zh-cn/development/development-environment-setup.html。这里简单介绍一下官方建议的两种开发环境。
DolphinScheduler 开发环境配置有两个方式,分别是standalone模式,以及普通模式
- standalone模式:推荐使用,但仅支持 1.3.9 及以后的版本,方便快速的开发环境搭建,能解决大部分场景的开发。这种方式开发起来特别简单,没有运行软件的强依赖。
- 普通模式:master、worker、api等单独启动,能更好的的模拟真实生产环境,可以覆盖的测试环境更多。这种方式接近生产环境,对 Zookeeper 和 关系型数据库 MySQL/PostgreSQL 有强依赖。
源码下载完成后,直接运行 mvn clean install -Prelease -Dmaven.test.skip=true
报错如下:
[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 15:40 min [INFO] Finished at: 2022-06-13T15:59:16+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.12.1:install-node-and-pnpm (install node and pnpm) on project dolphinscheduler-ui: Could not download Node.js: Could not download https://nodejs.org/dist/v16.13.1/node-v16.13.1-darwin-x64.tar.gz: Remote host terminated the handshake: SSL peer shut down incorrectly -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn-rf :dolphinscheduler-ui
解决方法:
该问题是由于外网访问速度受限导致的,解决外网访问问题后,即可解决该问题。
2.standalone 源码在IDEA run报错根据文档如下要求,启动 IDEA 中的项目:
启动后端
在 Intellij IDEA 找到并启动类 org.apache.dolphinscheduler.server.StandaloneServer 即可完成后端启动
报错信息如下:
/Users/chris/dolphinscheduler/dolphinscheduler/dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-hive/src/main/java/org/apache/dolphinscheduler/plugin/datasource/hive/HiveDataSourceClient.java:34:25 java: 程序包sun.security.krb5不存在
其实还存在很多其他的报错,截图如下:
解决方法:
这个问题是由于项目的开发环境 SDK 配置不正确导致的,Dolphin Scheduler 当前支持 JDK 1.8,还不支持 Java 11,我本地有两个 JDK 环境,所以需要手工切换一下:
1.选择菜单 File -> Project Structure…
2.选择 Project 标签,修改 SDK 为 Java 1.8,然后保存退出
3.重新运行项目即可,该问题解决。



