Compare commits

...

306 Commits

Author SHA1 Message Date
WangJPLeo e64a263007 sql fix 2022-11-23 16:58:30 +08:00
WangJPLeo a00b1503e3 upgrade to 3.0.0 fix 2022-11-23 13:46:40 +08:00
WangJPLeo 309cde8fee upgrade to 3.0.0 fix 2022-11-23 13:45:51 +08:00
Jiajie Zhong 9badb2d2fb [doc] Add missing docs metrics.md
fix: #11575
2022-08-23 15:22:56 +08:00
Jiajie Zhong 77cc47720f impv: Versioning python document 2022-08-11 10:37:30 +08:00
Jiajie Zhong d7b987d2d0 [doc] Remove not exists task for version 3.0.0 2022-08-09 17:34:23 +08:00
Jiajie Zhong 9d45421fd5 [doc] Correct check style path
ref: 9ac1f61a
2022-08-09 14:15:36 +08:00
Jiajie Zhong 9ac1f61ab2 [doc] Fix checkstyle path
checkstyle file remove in #11272
2022-08-09 14:07:48 +08:00
xiangzihao 92ca3df127 [Doc] Add tools/libs to the init database steps (#11345)
(cherry picked from commit 983f9b41bf)
2022-08-09 13:55:30 +08:00
Jiajie Zhong baa59f28c7 [doc] Fixed hadoop link to avoid dead link
https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CommandsManual.html#jar
point to the latest docs and will be changed more frequent than fixed link
https://hadoop.apache.org/docs/r3.2.4/hadoop-project-dist/hadoop-common/CommandsManual.html#jar.
So I change to the fixed link
2022-08-09 11:54:07 +08:00
Jiajie Zhong 889fd580e3 [maven-release-plugin] prepare for next development iteration 2022-08-05 18:16:57 +08:00
Jiajie Zhong 9efd1ace78 [maven-release-plugin] prepare release 3.0.0 2022-08-05 18:16:57 +08:00
Jiajie Zhong d302718360 Correct docdev.js version 2022-08-05 18:06:54 +08:00
Jiajie Zhong 77aa313fa3 [doc] migrate community and development docs into main repo (#11313)
(cherry picked from commit bf5f7a88c5)
2022-08-05 18:01:36 +08:00
Wenjun Ruan 230adbf621
Fix TaskGroup cannot work and will cause master dead loop (#11254) (#11318)
* Fix TaskGroup cannot work and will cause master dead loop

* Remove acquireTaskGroupAgain in ProcessServiceImpl

(cherry picked from commit acd3d3fab1)
2022-08-05 17:40:22 +08:00
Jiajie Zhong a6db4a591c Some docs version change 2022-08-05 16:03:18 +08:00
Jiajie Zhong 4d7dded819 fix: cherry pick bug for document img path 2022-08-04 12:35:44 +08:00
rickchengx 7f679356b5 [Doc] update the configuration doc (#11113)
(cherry picked from commit 39186b1a6d)
2022-08-04 12:05:04 +08:00
Jiajie Zhong 54196c9ef4 [doc] Add notice when environment can not select (#11276)
ref: #11249

Co-authored-by: Eric Gao <ericgao.apache@gmail.com>

(cherry picked from commit dc3ab6af11)
2022-08-04 12:01:49 +08:00
xuhhui 9740a6e42f fix: Current node settings number of failed retries may not be negative (#10530)
(cherry picked from commit 198e00db58)
2022-08-03 19:41:14 +08:00
旺阳 7104063e0d [Fix]Recovery Traffic Control Config (#10505)
* recovery traffic config

* run ci

* update

(cherry picked from commit 6e4b2e6992)
2022-08-03 19:41:14 +08:00
syyangs799 ae7df493a8 Modify obsolete swagger parameters in AuditLogController (#10494)
Co-authored-by: syyang <730122+syyang99@user.noreply.gitee.com>
(cherry picked from commit 79ce5d78cd)
2022-08-03 19:41:14 +08:00
chuxing a27a45fcfe [fix][master]: fix condition npe (#10478)
* [fix][master]: fix condition npe

* [fix][master]: fix condition npe

Co-authored-by: huaangcg <huangcg@getui.com>
(cherry picked from commit 0dd6f4008e)
2022-08-03 19:41:14 +08:00
飞侠美如画 64b72a2968 Update SparkRuntimeEnvironment.java (#10549)
Add spark support for hive

(cherry picked from commit 08e2c245a8)
2022-08-03 19:41:14 +08:00
xiangzihao a05d7cc8f4 fix_10514 (#10568)
(cherry picked from commit 0f38217b12)
2022-08-03 19:41:14 +08:00
xiangzihao e52fd0b04b fix dependent task re-run params error (#10580)
(cherry picked from commit 393cb648f9)
2022-08-03 19:41:14 +08:00
xiangzihao 5e129d478e add datasource health check to the healthcheck endpoint (#10588)
(cherry picked from commit 1111371c9a)
2022-08-03 19:41:14 +08:00
xiangzihao b0113a9b64 dependent node log output optimization and fix checkstyle (#10593)
(cherry picked from commit 397e51fa63)
2022-08-03 19:41:14 +08:00
liudi1184 1e498a5f89 [fix-10596] Workflow relationship cannot be displayed normally (#10625)
Workflow relationship cannot be displayed normally

Closes #10596

Co-authored-by: liudadi <liudi@thinkingdata.cn>
(cherry picked from commit 56d3db0306)
2022-08-03 19:41:14 +08:00
Amy0104 6b8e040443 [Fix][UI] Fix bytesToSize function calculation error. (#10627)
(cherry picked from commit a6fc70cdd1)
2022-08-03 19:41:14 +08:00
Wenjun Ruan 09e3608980 Add improvement template (#10764)
(cherry picked from commit 7c740da242)
2022-08-03 19:41:14 +08:00
WangJPLeo 749a82a78d [API] Do not specify rollback for ensure in case of any exception or error. (#10793)
(cherry picked from commit b7fbf6c4ad)
2022-08-03 19:41:14 +08:00
pinkhello dca87a4b0c [Fixed-10833] [Bug] [Quartz] timezone display doesn't match the next_fire_time in ds 3.0.0-beta1 version (#10865)
* closed [10619]  [Improvement][Master] batch remove TaskInstaceId and workflowInstanceId

* fixed # 10833 timezone display error

* checkstyle

(cherry picked from commit 030fb89d6e)
2022-08-03 19:41:14 +08:00
Mr.An d2ea5316ad [Fix-11003]Task group queue is not updated to final state (#11004)
* fix after the task group is forced to start the task. Task group status has not changed

(cherry picked from commit d7df899909)
2022-08-03 18:19:05 +08:00
qinchaofeng cfa08b3337 [Doc]Chinese translation updated (#11146)
* Update python.md Chinese translations

* Update zeppelin.md Chinese translations

(cherry picked from commit c28774e5dd)
2022-08-03 18:12:48 +08:00
Amy0104 9df9a37331 [Improvement][UI] Improve monaco-editor component in ts. (#11274)
(cherry picked from commit adfec41986)
2022-08-03 15:23:38 +08:00
Devosend 5e366ff6f1 [Fix][UI] fix bug where log modal display object (#11271)
(cherry picked from commit 9ba9a0ff82)
2022-08-03 14:41:42 +08:00
Jiajie Zhong c31087bd95 fix: Upgrade database DDL to avoid log path too long error 2022-08-03 14:35:00 +08:00
Devosend 2c469224dd fix bug where confirm disable error (#11251)
(cherry picked from commit 78e9122573)
2022-08-02 19:09:18 +08:00
Wenjun Ruan 072672a127 Fix recovery from failed task will dead loop (#11239)
(cherry picked from commit 04f3aa9713)
2022-08-02 19:07:08 +08:00
阿福Chris 7dc8aab821 [doc] Fix installation typo (#11220)
Co-authored-by: xiangzihao <460888207@qq.com>
(cherry picked from commit 01fc6c8a3a)
2022-08-02 19:03:07 +08:00
JinYong Li 68a73b04a2 [Fix-11007] [Master] fix forced_success bug (#11088)
* fix forced_success bug

* add comments

* add transactional

* refactor code

Co-authored-by: JinyLeeChina <jiny.li@foxmail.com>

(cherry picked from commit e5cca0e79b)
2022-08-02 19:02:01 +08:00
xuhhui d550f9917e fix error (#11206)
(cherry picked from commit bfff3a7c5d)
2022-08-02 18:57:18 +08:00
Devosend 7821d3ce7e fix nodeSize is not a function bug (#11200)
(cherry picked from commit 91a944f967)
2022-08-02 18:52:52 +08:00
Jiajie Zhong 9281f2b650 [ci] Make cluster test work on release branch (#11199)
When I try to release the 3.0.0 on branch `3.0.0-prepare`,
I find out cluster-test error due to version change of
tarball, I think we should make cluster test work on both
dev and prepare release branch, so I add this patch

(cherry picked from commit 93a73b1292)
2022-08-02 18:52:29 +08:00
Jiajie Zhong ab73121401 [python] Add directly install without clone source code (#11179)
Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>

(cherry picked from commit 9e692f919a)
2022-08-02 18:51:46 +08:00
Tq 59f3bce232 add Feishu alert doc and configure email alert doc to the docsdev.js (#11173)
add Feishu alert doc and configure email alert doc to the docsdev.js

(cherry picked from commit 9859b5da1f)
2022-08-02 18:50:29 +08:00
caishunfeng a8b1b61bd2 [Bug-11071] fix local params (#11184)
* fix local params

* add CI case

(cherry picked from commit 818648df7d)
2022-08-02 18:49:53 +08:00
pinkhello f7ed6ef850 [Fix] Parameter values disappear when editing Zeppelin task (#11115)
(cherry picked from commit 2e81f30298)
2022-08-02 18:48:15 +08:00
Jiajie Zhong dd34a1da67 [fix] data quality dml error 2022-08-02 18:07:39 +08:00
Jiajie Zhong 3915c4f40a [fix] Make DDL work in version 3.0
* Add missing database ddl
* Because postgres supported `if not exist` and `if exists` syntax
  so we can use bare SQL directly instead of store process
2022-08-02 16:26:34 +08:00
Sheldon 91da5be260 [fix] 300 error cherry-pick and other bug 2022-07-29 11:22:33 +08:00
Sheldon 1f55cc89c1 [Fix-10665] [S3] Fix s3 download method (#10675)
when overwrite param is true and dest file is exist, throw exception
make dirs for ancestor directories of the source file path if it is not exists
To describe the error more clearly, change "the file isn`t exists" to specific error message

Co-authored-by: sheldonliu <sheldonliu>
(cherry picked from commit efd68f4805)
2022-07-28 11:22:31 +08:00
caishunfeng 034475bfbe [Bug-11101] fix task failover NPE (#11168)
(cherry picked from commit 6c7e00c4aa)
2022-07-28 11:14:33 +08:00
Jiajie Zhong 88712b423a [fix] Some cherry pick error 2022-07-28 11:13:48 +08:00
陈家名 4da1240b0e [Python] Supports creating or editing resources. (#10823)
(cherry picked from commit 59cd86157f)
2022-07-28 11:13:48 +08:00
Jiajie Zhong e4ab488426 [python] Fix tasks with multiple upstream and workflow query error (#10941)
* when task with more than one upstreams, mapper
   TaskDefinitionMapper method queryByName will return
   more than one record, and failed the mybatis result
   type, so we have to add `limit 1` to it to
* add multiple runs of example in integrate test
* Change from subprocess.Popen to subprocess.call_check
  in integrating test which will raise an error when failed

(cherry picked from commit 81930e5420)
2022-07-28 11:13:48 +08:00
Jiajie Zhong c67f9ee85d [fix] update queue and tenant with same code error (#10877)
in ae6aa53f I use the same logic test to create or update
tenant and queue which failed create with the same value,
this patch will fix it. and also I use the constructor to reduce
the new object logic here

(cherry picked from commit a6154220dc)
2022-07-28 11:13:48 +08:00
Jiajie Zhong b2ad6f3f8e [python] Integrate test run strategy change (#10825)
this patch change python integrate test strategy,
before that, only content change in dir
dolphinscheduler-python will run the test. And it
will fail our python api startter when some code
change in java gateway. So we should start the
integrate test except docs change.

and in the future, we may add python ci to
.asf.yaml to make sure it pass

close: #10488
(cherry picked from commit 598290487c)
2022-07-28 11:13:48 +08:00
Jiajie Zhong d3f28c8411 [python] Fix submit and run error (#10792)
because we add permission, so it failed out
createQueue method. this patch fix it and
do some refactor of our tenant and queue
validator code

(cherry picked from commit ae6aa53f96)
2022-07-28 11:13:48 +08:00
caishunfeng cec5e88319
[Bug-11071] Fix task local params NPE (#11166)
* fix local param NPE

* delete empty files
2022-07-28 09:43:58 +08:00
xuhhui acc2fba6cd [doc] Fix bugs in doc installation, design and glossary (#11084)
(cherry picked from commit 8b50578bdb)
2022-07-27 22:43:17 +08:00
Jiajie Zhong 6bab63cc7b [python] fix doc build error (#10810)
(cherry picked from commit 113a67122f)
2022-07-27 22:36:34 +08:00
Jiajie Zhong 6f5ea6e411 [python] Correct some docs for python api (#10772)
* Remove add leading `$` from command
* Add copy button from code block
* Using `python -m pip` to install package avoid error

(cherry picked from commit b4eee7edb6)
2022-07-27 22:34:40 +08:00
sneh-wha c4c4771435 [doc] Change subprocess dependent (#10637)
(cherry picked from commit 1f46078ab8)
2022-07-27 22:29:03 +08:00
Eric Gao 4324ddd28e [docs] Add links to metrics docs (#10583)
(cherry picked from commit 16144a8858)
2022-07-27 22:24:30 +08:00
Stalary fe8525744d [doc] Add run the task alone doc. (#10581)
(cherry picked from commit b2df357814)
2022-07-27 22:23:23 +08:00
xiangzihao b88b522827 [doc] Add doc about how to use healthcheck endpoints (#10592)
(cherry picked from commit 33cc68ed4a)
2022-07-27 22:20:13 +08:00
xiangzihao b943c003a6 [doc] Add docs about complement dependent mode (#10587)
(cherry picked from commit b21e211d2c)
2022-07-27 22:19:27 +08:00
陈家名 dd4b99298a [python] Support using full-name definitions for resources (#10551)
(cherry picked from commit 7970573365)
2022-07-27 22:13:04 +08:00
Devosend 4f37b7c377
fix space validate for create folder bug (#11106) (#11172)
(cherry picked from commit 2f2de7f90e)
2022-07-27 17:16:58 +08:00
caishunfeng 9742502ea3 fix k8s master and worker start error (#11156) 2022-07-27 09:39:15 +08:00
Devosend ebdc34b25f [Fix][UI] Add duplicate of file suffix (#11136) 2022-07-27 09:38:34 +08:00
zhuxt2015 1b0f8c04d3 [Bug] [API] If the single log length is long, it will causes the View Log page to hang (#10612) 2022-07-27 09:38:25 +08:00
Devosend 4622a8036a [Fix][UI] fix bug where The Gantt chart does not show the execution status (#11135)
* fix bug where The Gantt chart does not show the execution status of all components

* modify round method
2022-07-27 09:38:02 +08:00
Wenjun Ruan b791e9158e [Fix-10918] Close datasource when expire from guava cache (#11120)
* Close datasource when expire from guava cache
* Remove duplicate datasource in HiveDataSourceClient
2022-07-27 09:37:18 +08:00
songjianet 8581a464db [Fix][UI] Fix the problem of too large spacing in operation. (#11090)
* [Fix][UI] Fix the problem of too large spacing in operation.

* [Fix][UI] Fix the problem of too large spacing in operation.
2022-07-27 09:35:04 +08:00
Devosend 9164ec8bf1 fix view variable display bug (#11100) 2022-07-27 09:34:43 +08:00
Amy0104 34d2c513c5 [Fix][UI] Widen the segment separator input box. (#11096) 2022-07-27 09:34:30 +08:00
xiangzihao dba1d076c1 add oracle dependency (#11095) 2022-07-27 09:34:05 +08:00
Assert 7e1d8c2d86 [Feature-10594][ui] Data Quality Result Display Optimize (#10835) 2022-07-20 14:56:36 +08:00
pinkhello 59d8f222c8 [Fix-10539] [Bug] [UI] Copy task a to B, change the user-defined para… (#10611)
* fixed 10539: [Bug] [ui]Copy task a to B, change the user-defined parameters of Task B, and change the parameters of task a

* fixed 10539: [Bug] [ui]Copy task a to B, change the user-defined parameters of Task B, and change the parameters of task a

* feat: reactor code

* feat: remove console.info

* fixed: reactor deepclone

* feat: code style
2022-07-20 11:40:43 +08:00
caishunfeng b9e3187ad5 [Feature-10871] add workflow executing data query (#10875)
* add workflow executing data query
* fix sonar check for interrupted
2022-07-19 16:10:42 +08:00
Amy0104 bb6aaf755e [Fix][UI] Set the next node to not required. (#10932)
* [Fix][UI] Set the next node to not required.

* [Fix][UI] Remove the unuse i
2022-07-19 15:37:14 +08:00
Amy0104 47782ba555 [Fix][UI] Add validator to the next node field of the switch task. (#10898) 2022-07-19 15:37:02 +08:00
Wenjun Ruan 5a2ea0b76b Fix compile error 2022-07-19 12:30:26 +08:00
Wenjun Ruan 648d469b62 Return status 2022-07-19 12:27:49 +08:00
Wenjun Ruan f3250bf5fa Fix worker cannot shutdown due to resource close failed or heart beat check failed (#10979)
* Use try-with-resource to close resource, and add heart error threshold to avoid worker cannot close due to heart beat check failed

* Move heartbeat error threshold to applicaiton.yml

(cherry picked from commit 2be1d4bf0a)
2022-07-19 12:23:20 +08:00
Wenjun Ruan 17f0be5bfb Kill task when we do master failover to avoid task lost (#10997)
(cherry picked from commit 998e4d74dd)
2022-07-19 12:22:26 +08:00
Wenjun Ruan 44ddb6908e Fix kill yarn job error when failover caused by doesn't set ProcessDefinition (#10948)
(cherry picked from commit b245e7c973)
2022-07-19 12:22:13 +08:00
Wenjun Ruan 812d7a8f26 Fix taskInstance's host is not worker nettyServer address (#10926)
* Fix taskInstance's host is not worker nettyServer address

* Remove unnecessary mock

(cherry picked from commit df0416c193)
2022-07-19 12:21:59 +08:00
Wenjun Ruan 527ee472fb Catch exception when check state in StateWheelExecuteThread (#10908)
* Catch exception when check state

(cherry picked from commit 2a67866718)
2022-07-19 12:21:20 +08:00
Wenjun Ruan 9ee20cffef [Fix-10827] Fix network error cause worker cannot send message to master (#10886)
* Fix network error cause worker cannot send message to master

(cherry picked from commit cade66a9b6)
2022-07-19 12:20:18 +08:00
Wenjun Ruan b259deb196 [Fix-10854] Fix database restart may lost task instance status (#10866)
* Fix database update error doesn't rollback the task instance status

* Fix database error may cause workflow dead with running status

(cherry picked from commit f639a2eed4)
2022-07-19 12:12:57 +08:00
Wenjun Ruan 71edaf41a2 [Fix-10842] Fix master/worker failover will cause status incorrect (#10839)
* Fix master failover will not update task instance status
* Add some failover log
* Fix worker failover will rerun task more than once
* Fix workflowInstance failover may rerun already success taskInstance

(cherry picked from commit 3f69ec8f28)
2022-07-19 12:08:32 +08:00
Wenjun Ruan 4fc9bce444 [Fix-10785] Fix state event handle error will not retry (#10786)
* Fix state event handle error will not retry

* Use state event handler to deal with the event

(cherry picked from commit 67d14fb7b3)
2022-07-19 12:03:15 +08:00
Wenjun Ruan da03ef32e9 Fix compile error 2022-07-19 12:00:37 +08:00
Wenjun Ruan 04c47034d4 Add task prepare metrics 2022-07-19 11:52:18 +08:00
Wenjun Ruan 7500e99682 [Fix-10785] Fix state event handle error will not retry (#10786)
* Fix state event handle error will not retry

* Use state event handler to deal with the event

(cherry picked from commit 67d14fb7b3)
2022-07-19 11:52:06 +08:00
Wenjun Ruan 3b923e5933 [Fix-10666] Workflow submit failed will still in memory and never retry (#10667)
* Workflow submit failed will still in memory and never retry

(cherry picked from commit 35a10d092f)
2022-07-19 11:47:04 +08:00
Wenjun Ruan 6c83967ebe [Improvement-10617] Add comment in slot check (#10618)
(cherry picked from commit 247ca4ae8a)
2022-07-19 11:42:31 +08:00
Wenjun Ruan 4b224ae2e5 Validate master/worker config (#10649)
(cherry picked from commit 35b25da863)
2022-07-19 11:42:17 +08:00
Wenjun Ruan db31deb54f [Bug] [Master] Worker failover will cause task cannot be failover (#10631)
* fix worker failover may lose event

(cherry picked from commit 66624c5c86)
2022-07-19 11:41:25 +08:00
Wenjun Ruan c488a9f828 Fix compile error 2022-07-19 11:36:34 +08:00
Wenjun Ruan fc1c1f6ad1 add CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST 2022-07-19 11:30:47 +08:00
Wenjun Ruan 3ab9ee13fc Optimize master log, use MDC to inject workflow instance id and task instance id in log (#10516)
* Optimize master log, add workflow instance id and task instance id in log

* Use MDC to set the workflow info in log4j

* Add workflowInstanceId and taskInstanceId in MDC

(cherry picked from commit db595b3eff)
2022-07-19 11:29:41 +08:00
Wenjun Ruan 9a28d32057 Remove the schedule thread in LowerWeightHostManager (#10310)
(cherry picked from commit b100f6c489)
2022-07-19 11:23:59 +08:00
Wenjun Ruan 90c87f0121 [Fix-10413] Fix Master startup failure the server still hang (#10500)
* Fix Master startup failure the server still hang

(cherry picked from commit 117f78ec4b)
2022-07-19 11:22:53 +08:00
Wenjun Ruan 9a59054655 Fix PeerTaskInstancePriorityQueue cannot contains method use taskInstanceId to check (#10491)
(cherry picked from commit 0bdfa0cff9)
2022-07-19 11:22:33 +08:00
Wenjun Ruan 9a4c7f876a Fix TaskProcessorFactory#getTaskProcessor get common processor is not thread safe (#10479)
* Fix TaskProcessorFactory#getTaskProcessor get common processor is not thread safe

(cherry picked from commit ad2646ff1f)
2022-07-19 11:22:16 +08:00
Wenjun Ruan 1def1729bc Add lombok 2022-07-19 11:20:37 +08:00
Wenjun Ruan 52815975bc Add some warning log in master (#10383)
* Add some warn log in master

* fix may skip sleep

(cherry picked from commit b0d9d3f9ab)
2022-07-19 11:13:39 +08:00
Wenjun Ruan 318a8e3ae0 [Feature][metrics] Add master, worker metrics (#10326)
* Add mater metrics

* fix UT

* Add url to mysql profile

* Add worker metrics

* Update grafana config

* Add system metrics doc

* Add process failover counter

* Add metrics image

* Change jpg to png

* Add command insert metrics

* Fix UT

* Revert UT

(cherry picked from commit e21d7b1551)
2022-07-19 11:12:28 +08:00
Wenjun Ruan 81cadd15d2 Optimize MasterServer, add MasterRPCService (#10371)
* Optimize MasterServer, avoid NPE

(cherry picked from commit 3ecbee3885)
2022-07-19 11:10:08 +08:00
Wenjun Ruan 4ceb420873 Fix TaskProcessorFactory#getTaskProcessor get common processor is not thread safe (#10479)
* Fix TaskProcessorFactory#getTaskProcessor get common processor is not thread safe

(cherry picked from commit ad2646ff1f)
2022-07-19 11:02:57 +08:00
juzimao ae4c3ab4e1 [Fix] Fix the JSONUtils tool class time zone problem #10282 (#10284)
* [Fix] Fix the JSONUtils tool class time zone problem #10282

* [Fix] Fix the JSONUtils tool class time zone problem #10282

* Update JSONUtils.java

remove unnessnary log

* Update JSONUtilsTest.java

add timezone import

Co-authored-by: xiangzihao <460888207@qq.com>
2022-07-19 09:47:58 +08:00
caishunfeng a015aa8fdc remove task in dev 2022-07-19 09:45:53 +08:00
Assert 85e5031786 [Fix-10595][api] Fix Dependent Node Only View Projects Created By Self (#10834)
* [Fix-10595][api] Fix Dependent Node Only View Projects Created By Self
2022-07-18 17:36:54 +08:00
rockfang 6880a72984 [Fix-10890] fix some bugs in the Resource page (#10907)
* [Fix-10890] fix some bugs in the Resource page

* fix: cancel the unnecessary verifications and reset the form when canceling FileUploadModal

* fix: use se `resetForm` method to reset the form
2022-07-18 17:36:54 +08:00
SongTao Zhuang d7582c9864 fix: typo task definition. (#10958) 2022-07-18 17:36:54 +08:00
pinkhello bc690501c4 [FIX-10784][Bug] [ALERT-SERVER] FEISHU Plugin might block the whole alert process loop (#10888)
* closed 10784 [Bug] [ALERT-SERVER] FEISHU Plugin might block the whole alert process loop
2022-07-18 17:36:54 +08:00
WangJPLeo d1cf6fe86b Solve transaction problems under multi-threading (#10917) 2022-07-18 17:17:28 +08:00
Devosend c450e7a5ac fix bug where task name display in gantt (#10900) 2022-07-18 17:14:59 +08:00
zhuxt2015 92492244d5 display timing record start time (#10915) 2022-07-18 17:14:53 +08:00
Tq 1543cdd1b5 [bug][task-plugins]fix switch class name and add param check to the switch task plugin (#10894)
* fix switch class name and add param check to the switch task plugin
2022-07-18 17:13:56 +08:00
Jiajie Zhong c40492d52a [doc] Add missing doc change by snehal (#10892) 2022-07-18 17:13:44 +08:00
Devosend 00393be7c6 [Fix][UI] Fix hive datasource doesn't show principal bug (#10876)
* fix hive datasource doesn't show principal bug

* delete IDataBase

* restore DataSourceController.java
2022-07-18 17:13:12 +08:00
WangJPLeo 7b7ec0f20f Complement numbers will run in a loop under the serial strategy fixed. (#10862)
* Complement numbers will run in a loop under the serial strategy fixed.

* e2e rerun
2022-07-18 17:02:42 +08:00
Luke Yan 9a3cb76863 [Fix-10830][Doc] Change the start or install script command sh in the document to bash (#10831)
* Change sh to bash

Change the script execution command sh to bash

* Change sh to bash

Change the script execution command sh to bash

* Change sh to bash

Change the script execution command sh to bash

* Change sh to bash

Change the script execution command sh to bash

* Change sh to bash

Co-authored-by: luke <luke.yan@china-entercom.net>
2022-07-18 17:02:11 +08:00
Eric Gao 71ffd4e989 [Doc][Upgrade] Fix tiny error in upgrade docs (#10847)
* [Doc][Upgrade] Fix tiny error in upgrade docs (#10846)

* [Doc][Upgrade] Add useSSL=false and fix typo in upgrade docs (#10846)
2022-07-18 17:01:51 +08:00
rockfang d8ee6c915c [Fix-10829][UI] display real workflow relation in `WorkFlow Relation` page (#10836) 2022-07-18 17:01:03 +08:00
songjianet 3f8f878a93 [Docs] Updated license. (#10838) 2022-07-18 17:00:34 +08:00
songjianet 1a70a4cc82 [Build][UI] Updated dependencies. (#10813)
* [Build][UI] Updated dependencies.

* [Build][UI] Updated dependencies.

* Fix E2E

Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
2022-07-18 17:00:25 +08:00
WangJPLeo 7056e1f9fe [Improvement] Resource authority module database table unique index increased. (#10807)
* Resource authority module database table unique index increased.

* add unique in sql file

* rerun

* ut fix

* e2e rerun

* dao un fix
2022-07-18 16:59:19 +08:00
旺阳 d4540c489b [doc] Correct custom jdbc driver for K8s Doc (#10768) 2022-07-18 16:53:18 +08:00
sneh-wha 0cb7cb561f [doc] Modify features, hw, intro and homepage docs. (#10713) 2022-07-18 16:52:45 +08:00
Amy0104 b15ffdda29 [Fix][UI] Fix the environment name display back error. (#10797) 2022-07-18 16:52:39 +08:00
sneh-wha 8159ea5845 [doc] Modified dq, monitor, security, resources (#10715) 2022-07-18 16:52:30 +08:00
songjianet 4d7f59b797 [doc] Replace the dag screenshot of the README. (#10798) 2022-07-18 16:52:03 +08:00
Eric Gao 23cd3e85e2 [Improvement] [Alert Server] Add default datasource url in alert server application.yaml for consistency (#10790)
* [Improvement] [Alert Server] Add default datasource url in alert server application.yaml for consistency (#10788)

* [Improvement] [Alert Server] Add newline at end of file (#10788)
2022-07-18 16:51:52 +08:00
Eric Gao 2ae63c4eb5 [Bug][Script] Remove deprecated arg in remove-zk-node.sh (#10789) 2022-07-18 16:51:42 +08:00
旭旭同學 6d104f42d1 Fix language not matched (#10775) 2022-07-18 16:51:38 +08:00
xiangzihao 997244d1c4 [doc] Unify data source switching of the docs during installation (#10688) 2022-07-18 16:42:51 +08:00
sneh-wha 786d9418ec [doc] Change tasks docs (#10751) 2022-07-18 16:42:22 +08:00
sneh-wha 6493703f50 [doc] Modified project doc. (#10711) 2022-07-18 16:42:17 +08:00
songjianet 50403fa43d [Docs] Replace the dag screenshot of the README. (#10741) 2022-07-18 16:41:46 +08:00
sneh-wha 97a78467f7 Merging general settings to faq (#10716)
* Merging general settings to faq

* also change the zh position

Co-authored-by: Jiajie Zhong <zhongjiajie955@gmail.com>
2022-07-18 16:41:38 +08:00
sneh-wha ac275e8aa4 [doc] Modify quick start. (#10712) 2022-07-18 16:41:28 +08:00
sneh-wha 74b977f36d [doc] Modified alert doc files (#10714) 2022-07-18 16:41:19 +08:00
Devosend 4209c018ff fix bug where project overview page display no data (#10720) 2022-07-18 16:41:07 +08:00
zhuxt2015 bb19830cb3 fix (#10678) 2022-07-18 16:41:01 +08:00
sneh-wha 38bce4f2d3 [doc] Change tasks doc (#10639) 2022-07-18 16:40:42 +08:00
sneh-wha 5991db1b44 [doc] Change datasource doc (#10660) 2022-07-18 16:40:29 +08:00
Stalary 9112266ed2 [doc] Add doc for pre-sql and post-sql (#10685) 2022-07-18 16:40:24 +08:00
caishunfeng 3abca5fea0 [Improvement] heartbeat info improvement (#10699)
* heartbeat info improvement

* import order
2022-07-18 16:39:53 +08:00
Devosend 20970ad4ae [Fix][UI] Fix bug where the home page displays no data. (#10697) 2022-07-18 16:36:18 +08:00
caishunfeng 6c01a09b12 [doc] Update metadata and design doc (#10600) 2022-07-18 16:34:43 +08:00
Lyle Shaw c3425715a0 [Fix-10652] fix docker-compose.yml (#10653)
* [Fix-10652] fix docker-compose.yml

* [Fix-10652] fix docker-stack.yml

* [Fix-10652] fix python api port in k8s config

* Update deploy/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml

Co-authored-by: Jiajie Zhong <zhongjiajie955@gmail.com>

* [Fix-10652] fix { { to {{

* [Fix-10652] del space between {{ and -

Co-authored-by: Jiajie Zhong <zhongjiajie955@gmail.com>
2022-07-18 16:34:05 +08:00
songjianet 4e282782f0 [doc] Replace the dag screenshot of the README. (#10662) 2022-07-18 16:33:30 +08:00
sneh-wha 7ae28de1f1 [doc] Modified parameter doc files. (#10659) 2022-07-18 16:33:23 +08:00
zhuxt2015 cb14726bdd [Bug] [Task] SQL task no exception stack trace in task log (#10656) 2022-07-18 16:32:59 +08:00
juzimao 10c295eae5 [Fix-10641] [Common] Fix the hdfs NPE (#10642)
Fix the hdfs NPE (#10642)
2022-07-18 16:32:54 +08:00
zhuxt2015 aec0ea27f2 [Bug] [Api] The copied workflow create time and update time is still copied from the original workflow 2022-07-18 16:32:32 +08:00
Wenjun Ruan 1e0939d4a2 Add JDK11 on unit-test (#10364) 2022-07-18 16:32:19 +08:00
秋天 5f143f6c3a [fix-10632][ui] fix the workflow name with underline cannot be displayed correctly error. (#10636)
- add workflow name span padding-bottom css style to fix this error

This closes #10632

Co-authored-by: jiangkang <jiangkang@cmss.chinamobile.com>
2022-07-15 17:37:22 +08:00
devosend 7ddaa2f47d [maven-release-plugin] prepare for next development iteration 2022-06-28 16:41:31 +08:00
devosend 0a1b9bdd52 [maven-release-plugin] prepare release 3.0.0-beta-2 2022-06-28 16:41:30 +08:00
xiangzihao 1e89cbbcec fix standalone start error (#10577)
(cherry picked from commit 7a292cfccf)
2022-06-28 15:44:21 +08:00
旺阳 67bc8a160c [Fix-10400]Fix K8s deployment bitnami version error (#10567)
* Fix k8s bitnami bug

* add comments

(cherry picked from commit 0b377f72b1)
2022-06-28 15:13:24 +08:00
devosend d68dcda2bb [chore] pre-release change pom.xml 2022-06-28 08:24:21 +08:00
devosend 331f68e5b8 [chore] pre-release change 2022-06-27 15:24:08 +08:00
Jiajie Zhong 443f0d74b8 [doc] Correct installPath when using related path (#10597)
correct the doc and add hint to setting

ref: #10511
(cherry picked from commit cd51a22940)
2022-06-27 11:22:06 +08:00
HomminLee 8aa572606b [Fix][dolphinscheduler-spi] json parse support LocalDateTime (#10440)
* JSONUtils support LocalDateTime

* remove extraneous unit tests

* remove unused classes import.

Co-authored-by: HomminLee <lihongmin@ysstech.com>
(cherry picked from commit dafed572d1)
2022-06-27 11:21:45 +08:00
Jiajie Zhong c27fa1ab0d [feat] ui build no inherit from maven proxy (#10590)
Users may set in for maven setting.xml. but
frontend-maven-plugin will inherit proxy setting
from it. And pnpm not support both `--proxy` and
`--https-proxy` and will fail ui build. This patch
make pnpm run without inherits maven proxy.

ref: https://github.com/eirslett/frontend-maven-plugin#proxy-settings
and 9f39dbad09/frontend-maven-plugin/src/main/java/com/github/eirslett/maven/plugins/frontend/mojo/PnpmMojo.java (L28)

(cherry picked from commit 15a86071d1)
2022-06-24 15:26:50 +08:00
旺阳 3ba911d5d7 [fix] Change K8s postgresql password key name (#10545)
(cherry picked from commit 388b214aca)
2022-06-24 15:24:36 +08:00
Desperado2 ca566900b8 [FIX] Could not find or load main class org.apache.zookeeper.ZooKeeperMain (#10535)
* Update remove-zk-node.sh

* Update remove-zk-node.sh

* Update remove-zk-node.sh

* Update remove-zk-node.sh

(cherry picked from commit 4a3dfae006)
2022-06-24 15:22:56 +08:00
Wenjun Ruan 742944c60d
[Fix] [Worker] Fix worker will hang if fails to start (#10501)
* [Fix] [Worker] Fix worker will hang if fails to start (#10342)

* Fix worker will hang if fails to start

* Add .run to ignore

Signed-off-by: ruanwenjun <wenjun@apache.org>

* Add import Epoll

* Add cpu_quota in h2 to fix UT

* Remove cpu_quota,memory_max in TaskDefiniitionMapper
2022-06-22 10:13:55 +08:00
Kerwin 2c4473ee43
cherry pick #10523 (#10524) 2022-06-22 09:09:20 +08:00
guodong 8edaa6a7de [Fix-10305][common] AWS config Constant definitions are repeated (#10311)
(cherry picked from commit 70dbcb2155)
2022-06-20 11:39:59 +08:00
Devosend ac5179be73 fix rename form not init bug in file manange (#10471)
(cherry picked from commit d1cae6025b)
2022-06-18 21:52:25 +08:00
陈家名 6edb3412a9 [fix][python] Correct variable type of SQL type (#10464)
(cherry picked from commit f512e3c31f)
2022-06-18 21:51:25 +08:00
Amy0104 788e334329 [Fix][UI] Add loading before file modification data is returned. (#10450)
(cherry picked from commit d516369e80)
2022-06-18 21:50:01 +08:00
阿福Chris 4d608a7d8f [DolphinScheduler] Fix wrong class name in doc (#10438)
(cherry picked from commit 8205444e0a)
2022-06-18 21:49:17 +08:00
旺阳 55e39eedfa [Fix-10425]Recovery LDAP Config (#10429)
* recovery ladp code

* add ldap config in doc

(cherry picked from commit 0efcd5c631)
2022-06-18 21:47:28 +08:00
陈家名 476f2395dc [fix][Python] Support same task name in project defferent process definition (#10428)
close: #10431
(cherry picked from commit b86dc53ad1)
2022-06-18 21:47:11 +08:00
旺阳 ba2f2ba64d [fix-10386]LDAP user create with status enable (#10426)
* LDAP user create with status enable

* currect unit test

(cherry picked from commit 50846760e5)
2022-06-18 21:46:42 +08:00
Mr.An deb1c594e5 Update chart.yaml dependencies version (#10420)
(cherry picked from commit a7e20798cb)
2022-06-18 21:46:07 +08:00
xiangzihao df0735273b [Fix-10412] [Standalone] Failed to start standalone server according to the official document (#10414)
* fix bug_10412

* fix bug_10412

(cherry picked from commit f4dad689d4)
2022-06-18 21:45:33 +08:00
liubo1990 248a85daab [Doc] Add how to set the alarm mailbox in faq (#10401)
(cherry picked from commit b8d5e78994)
2022-06-18 21:43:45 +08:00
Eric Gao ed02db213e [Bug][Tools] Add datasource url for mysql profile in tools application.yaml (#10399)
(cherry picked from commit 42d4aba347)
2022-06-18 21:42:44 +08:00
Hwting f7b18fd59d [fix][deploy]fix run on kubernetes bug (#10379)
* [fix][kubernetes]fix run on kubernetes bug

Fix the problem that the "REGISTRY_ZOOKEEPER_CONNECT_STRING" variable zookeeper port number is "nil"

* [fix][kubernetes]fix run on kubernetes bug

Fix the problem that the "REGISTRY_ZOOKEEPER_CONNECT_STRING" variable zookeeper port number is "nil"

(cherry picked from commit 5803d5c07c)
2022-06-18 21:41:03 +08:00
songjianet 478463fe6a [Docs] Upgrade license. (#10365)
(cherry picked from commit 36bba3fcdf)
2022-06-18 21:38:26 +08:00
PJ Fanning 7a240fb807 Upgrade log4j in E2E (#10359)
(cherry picked from commit f90f0f8490)
2022-06-18 21:37:07 +08:00
PJ Fanning 67f6c003f7 issue-10356: upgrade logback to fix cve (#10357)
(cherry picked from commit d044e0479d)
2022-06-18 21:35:00 +08:00
PJ Fanning ab7a843201 issues-10354: upgrade commons-io to fix CVE (#10355)
(cherry picked from commit b6350280e6)
2022-06-18 21:34:03 +08:00
Wenjun Ruan 3259efc673 Add dolphinscheduler-task-all in api module (#10350)
(cherry picked from commit b02243c2f5)
2022-06-17 14:43:37 +08:00
songjianet a59e6f30a8 [Build][UI] Upgrade dependencies. (#10346)
* [Build][UI] Upgrade dependencies.

* [Build][UI] Upgrade dependencies.

* [Build][UI] Upgrade dependencies.

(cherry picked from commit 6134e0a628)
2022-06-17 14:35:29 +08:00
xiangzihao 4dc0fbd84e fix bug_10343 (#10344)
(cherry picked from commit d1c47c99ad)
2022-06-17 14:35:02 +08:00
guodong 3181e1a7ee [Fix-10318][ui] Fix EMR Task UI custom parameters Is not correct (#10334)
* Modify useCustomParams isSimple: true

(cherry picked from commit 96496f7255)
2022-06-17 11:28:55 +08:00
songjianet cbefb59bf8 [Fix][UI] Fixed the issue that the status statistics on the project overview page were inconsistent. (#10328)
(cherry picked from commit e8ad62bcd0)
2022-06-17 11:28:09 +08:00
aiwenmo d95aa71383 [Fix-10317] [ui] Fix the tips of startTimeout in the jupyter form (#10319)
Co-authored-by: wenmo <32723967+wenmo@users.noreply.github.com>
(cherry picked from commit 3f2a21293d)
2022-06-16 21:59:22 +08:00
songjianet 30589121c4 [Style][UI] Format code. (#10314)
(cherry picked from commit 8584aad490)
2022-06-16 21:58:51 +08:00
QuakeWang 79b7e83051 [doc] Add how to use resource in shell task (#10308)
(cherry picked from commit 6828c9e015)
2022-06-16 21:49:54 +08:00
songjianet 4593351cf3 [Fix][UI] Display the result page when the DB page has no data. (#10298)
(cherry picked from commit 2e6d3f5190)
2022-06-16 19:49:56 +08:00
songjianet 32c8b7c9f2 [Style][UI] Split multilingual modules. (#10256)
(cherry picked from commit 4c1ef0a89a)
2022-06-16 19:47:35 +08:00
xiangzihao 271ef65c38 [doc] Fix api standard error (#10292)
* fix api standard error
* add patch method

(cherry picked from commit 12a09f6d5d)
2022-06-16 19:34:32 +08:00
Wenjun Ruan 4007382193 Fix database initialize late in standalone. (#10296)
(cherry picked from commit 3a9e67325e)
2022-06-16 18:18:53 +08:00
Amy0104 3687eb7a9a [Fix][UI] Add mapping_columns filed for the data_quality ruleInputParamter. (#10286)
(cherry picked from commit e7fbfa3a26)
2022-06-16 18:15:43 +08:00
juzimao 093cd4627a [Fix] Fix the line.separator problem for alert-plugin' test case #10277 (#10278)
* [Fix] Fix the line.separator problem for alert-plugin' test case

* [Fix] Fix the line.separator problem for alert-plugin' test case

(cherry picked from commit 62bd9d2c4c)
2022-06-16 18:15:00 +08:00
songjianet 1e9f62453e [Fix][UI] Fix status statistics card height is inconsistent. (#10268)
(cherry picked from commit 1ac534be67)
2022-06-16 18:10:12 +08:00
Yiming Guo 1afa870abd [docs] Added local file configuration guide for resource center (#10264)
* Added Local File Resource Configuration Guide to the document.
* Removed contents with windows features in the documents and improved expression.
* Specify `the user who deploy dolphinscheduler have read and write permissions` in en and zh docs.

Co-authored-by: xiangzihao <460888207@qq.com>
(cherry picked from commit 2294160cdb)
2022-06-16 18:09:44 +08:00
chuxing 7ac7f41562 [doc] Add switch task demo (#10247)
Co-authored-by: QuakeWang <45645138+QuakeWang@users.noreply.github.com>
(cherry picked from commit 7e39e0d48d)
2022-06-16 17:21:06 +08:00
Mr.An f35e0f1d5e [doc] Update the development environment to build the software version (#10246)
(cherry picked from commit 8d26d4fe72)
2022-06-16 17:05:43 +08:00
QuakeWang 1a79c2a200 [doc] Upgrade screenshot to latest version in dev document (#10242)
* fix issue-9898
* delete no use pictures

(cherry picked from commit 58b1e1da1e)
2022-06-16 17:04:18 +08:00
旺阳 3de7b65f9a [doc] Delete SPRING_DATASOURCE_DRIVER_CLASS_NAME in doc (#10228)
(cherry picked from commit 87d9ec1dee)
2022-06-16 17:02:16 +08:00
QuakeWang 8ac6fa6dbc [doc] Refactor context parameter docment (#10227)
(cherry picked from commit cd36401a6a)
2022-06-16 17:01:28 +08:00
Jiajie Zhong 57ade38939 [maven-release-plugin] prepare release 3.0.0-beta-1 2022-05-26 20:26:32 +08:00
Jiajie Zhong 47e1611538 [chore] pre-release change 2022-05-26 15:20:06 +08:00
Jiajie Zhong 6539573a53 [doc] Correct all setup documents (#10074)
* Correct the login page URL
* change version and database configuration
* change setup and upgrade

(cherry picked from commit e3579dd13d)
2022-05-26 14:56:06 +08:00
caishunfeng 54c5e8040a [Bug] init docker compose DATABASE env (#10244)
skip source env if in docker

(cherry picked from commit 4351148f36)
2022-05-26 14:56:03 +08:00
Jiajie Zhong 8ad17efeb5 [fix] Deploy scp-hosts use fullpath avoid dangling (#10249)
This path fix error modify worker application.yaml when
running `scp-hosts.sh` script in different directory. Currently
setting only work when running `scp-hosts.sh` in path
`<DOLPHINSCHEDULER_HOME>/bin` using command `./scp-hosts.sh`.
And will fail when we run script in directory
`<DOLPHINSCHEDULER_HOME>` using command `./bin/scp-hosts.sh`

ref: #10209 and #10208
(cherry picked from commit 58afe5d8b5)
2022-05-26 14:55:58 +08:00
Jiajie Zhong 040f3a838c [doc] Add setValue syntax in local param (#10245)
ref: #9576
same as: #9671

(cherry picked from commit 6d9bc0743b)
2022-05-25 23:43:48 +08:00
Jiajie Zhong 51c6630296 [fix][deploy] File overwrite when specific value set to installPath (#10241)
When our `installPath` in file `install_env.sh` set to `/`
or empty or related path to `/` some system specific directory
, like `/bin` and `libs`, will be overwritten, and it is not expected

(cherry picked from commit 117082154d)
2022-05-25 23:43:44 +08:00
Devosend f5277570f0 [Fix][UI] Set task group name empty of default value (#10243)
(cherry picked from commit b337eef2e6)
2022-05-25 23:43:36 +08:00
Mr.An 69db18ebd7 [Fix#9923] The alarm instance management interface is always in the loading state (#9924)
* fix alert plugin loading bug

* update use-form.ts

* remove unused package

* Update use-form.ts

* Update use-form.ts

(cherry picked from commit c5c68a8893)
2022-05-25 23:43:19 +08:00
Jiajie Zhong e663043c91 [fix] Task group queue query all list error (#10237)
Add support query all task queue by not given specific groupId

close: #10102
(cherry picked from commit d8db2b57d2)
2022-05-25 23:42:35 +08:00
旺阳 e08b08efdd [improve] Change Mysql Driver (#10220)
(cherry picked from commit aba5f8a40e)
2022-05-25 23:42:28 +08:00
xiangzihao 43e1e5567c add_alert_server_cluster_test (#10125)
(cherry picked from commit 8fab224e0d)
2022-05-25 23:42:02 +08:00
xiangzihao b2058f9532 [Feature-10034][CI] Add postgresql cluster test in CI (#10035)
* add postgresql cluster test

* add postgresql cluster test

* add postgresql cluster test

* add postgresql cluster test

(cherry picked from commit 2423fa50f7)
2022-05-25 23:41:13 +08:00
旺阳 1352d3d9ef [Fix-10083][Doc]Change Docker cmd && Change WebexTeams Chinese Translation (#10084)
* Change Docker cmd && Change WebexTeams Chinese Translation

* run ci

Co-authored-by: qingwli <qingwli@cisco.com>
(cherry picked from commit cab46e6be5)
2022-05-25 14:04:43 +08:00
songjianet eedf2ba001 [Fix][UI] Fix issue with treemap depth in workflow relationships. (#10229)
* [Fix][UI] Fix issue with treemap depth in workflow relationships.

* [Fix][UI] Fix issue with treemap depth in workflow relationships.

(cherry picked from commit abecec3c28)
2022-05-24 23:11:31 +08:00
Mr.An 9eaac1e1b4 [fix-10207] When the registered alarm plugin is empty, the error message is not clear (#10224)
* Improve the problem that the error message is not clear when the registered alarm plugin is empty

* update error info

* update error info

* update error info

* Update Status.java

fix typo

Co-authored-by: xiangzihao <460888207@qq.com>
(cherry picked from commit 14e80ab5fd)
2022-05-24 23:10:57 +08:00
QuakeWang b320743980 [doc] Refactor local parameter docment (#10119)
(cherry picked from commit 5998c73aac)
2022-05-24 23:05:38 +08:00
旺阳 00e1162286 [doc] Update kubernetes' FAQ (#10221)
(cherry picked from commit c12848a4ff)
2022-05-24 23:05:33 +08:00
songjianet f28890e139 [Fix][UI] Fix the problem of multi-language support of workflow instance host in Chinese state. (#10223)
(cherry picked from commit 6cebdfdf50)
2022-05-24 23:01:57 +08:00
旺阳 5d8679fba9 [Fix-10103][k8s]Fix k8s Change DataSource Error (#10128)
(cherry picked from commit de5507fb19)
2022-05-24 23:01:42 +08:00
xiangzihao 944be34177 [Feature-9474] [CI] Add cluster test script verify on shell script (#9997)
* cluster test

* fix init db failed

* fix init db failed

* fix init db failed

* fix init db failed

* fix init db failed

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add sudo

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* add github actions

* remove cluster-test workflows

* add github actions

* add github actions

* refactor test to docker mode

* refactor test to docker mode

* refactor test to docker mode

* refactor test to docker mode

* remove create schema logic

* remove create schema logic

* remove create schema logic

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* fix runnint cluster test error

* add github actions

* add github actions

* add github actions

* add cluster test timeout

* add cluster start test loop check

* add cluster start test loop check

* optimize cluster start test loop check

(cherry picked from commit baf654cb47)
2022-05-24 23:01:23 +08:00
Jiajie Zhong f7f3305569 [doc] Update task DataX document (#10218)
(cherry picked from commit f4b7754952)
2022-05-24 22:58:04 +08:00
rockfang 844ce4cdd7 [Fix][UI] add assignment of totalPage (#10165)
(cherry picked from commit 7fc3664ec3)
2022-05-24 22:58:00 +08:00
Jiajie Zhong 80ebe4a334 [python] Fix process definition attr release state not work (#10151)
This patch fix the error release state not work when it set to
offline and submit it to Java gateway, it error because we do
not pass the attribute to Java gateway function
`createOrUpdateProcessDefinition`

close: #9779
(cherry picked from commit 56e0ea802d)
2022-05-24 22:57:28 +08:00
Mr.An 424ef27257 fix#10214 Delete online workflows in batches, prompt information is accurate (#10215)
(cherry picked from commit edcb7aad23)
2022-05-24 22:57:22 +08:00
Eric Gao 03e5ac6964 [Bug][Deploy]Fix worker-server path in script scp-hosts.sh (#10208) (#10209)
(cherry picked from commit 4dbe27bb8f)
2022-05-24 22:47:34 +08:00
Mr.An 9a966e4cb2 [Fix-10199] [Workflow/Workflow Definition] After deleting messages in batches, the error message is repeated (#10201)
* remove duplicate prompts

* update import package

(cherry picked from commit 0e8ed6ebb4)
2022-05-24 22:43:45 +08:00
Mr.An 1f8ee855f0 [doc] Update delete workflow description (#10203)
(cherry picked from commit 31cb485312)
2022-05-24 22:42:13 +08:00
songjianet 232a7bdb60 [Fix][UI] Fix data-quality component multi-language support. (#10202)
* [Fix][UI] Fix data-quality component multi-language support.

* [Fix][UI] Fix data-quality component multi-language support.

(cherry picked from commit c8a4c694ea)
2022-05-24 22:42:06 +08:00
xiangzihao b598b27c08 [Doc] Add complie supporting system (#10188)
(cherry picked from commit 41a3183810)
2022-05-24 22:41:11 +08:00
youzipi 69a76e8658 [refactor][perf] cache compiled regex pattern (#10099)
(cherry picked from commit 5161df04d7)
2022-05-23 15:07:57 +08:00
Eric Gao 68e6e45bb8 [doc] Update project directory structure in docs (#10107)
(cherry picked from commit 7a8f3f1810)
2022-05-23 14:59:57 +08:00
QuakeWang e737d8ee30 [doc] Refactor global parameter docment (#10045)
(cherry picked from commit 0abfb5e744)
2022-05-23 14:59:54 +08:00
longtb bb30b88306 [Fix-10076] queryUserByToken use server timezone (#10177)
* [Fix-10076] queryUserByToken use server timezone

* [Fix-10076] queryUserByToken use server timezone

(cherry picked from commit bd34e66b8a)
2022-05-23 14:59:50 +08:00
Devosend 8a52958f36 fix spcial week init bug (#10183)
(cherry picked from commit d7d6699e22)
2022-05-23 14:59:22 +08:00
songjianet 180ee3ba95 [Fix][UI] Add seatunnel icon (#10178)
(cherry picked from commit 0ef02e8093)
2022-05-23 14:58:50 +08:00
HeChuan e1ff8b87c6 [Fix-10057][api] api parameter name misspelling (#10063)
correct parameter name from processDefiniteCode to processDefineCode

(cherry picked from commit 2251876021)
2022-05-23 14:56:35 +08:00
songjianet bbf621cb05 [Fix][UI] Fix the problem that the failure strategy field in the time management form is multilingual. (#10169)
(cherry picked from commit dc61370f30)
2022-05-23 14:54:54 +08:00
labbomb 713a7802a4 [Fix]Change the HTTP or HTTPS regular expression (#10166)
(cherry picked from commit 13a83e50f2)
2022-05-23 14:54:37 +08:00
Mr.An 8ba5fa1afd [doc] Update website docs link (#10161)
(cherry picked from commit e2fac21399)
2022-05-23 14:54:20 +08:00
Mr.An 05f209d5c0 [doc] Update editorial workflow content and images (#10130)
(cherry picked from commit 7d5af7e7ec)
2022-05-23 14:54:15 +08:00
songjianet eed50c3670 [Fix][UI] Limit task group resource capacity to only positive integers. (#10158)
(cherry picked from commit c07339b07d)
2022-05-23 14:53:47 +08:00
Amy0104 a521d49e94 [Fix][UI] Add the task status of pending. (#10129)
(cherry picked from commit 3dd007ca59)
2022-05-23 14:53:30 +08:00
Jiajie Zhong bb47ced474 [python] Change distribute name avoid confusion with main pkg (#10134)
rename them and add `python` suffix in the end
close: #9121

(cherry picked from commit bf4b8ff0d9)
2022-05-23 14:51:34 +08:00
Jiajie Zhong 21625f57a7 [doc] Remove flink call docs (#10122)
Flink call docs is only teld users
how to use flink task in dolphinscheduler
and it should be including in task/flink

(cherry picked from commit 94c515555e)
2022-05-23 14:51:25 +08:00
Jiajie Zhong eaa75d6516 [doc] change document structure (#10124)
This patch change the structure and make it more sense

* Remove dev doc in tab Docs, and for now you could only see it in
  history-version page
* Move PyDolphinScheduler from tab DOCS to sidebar and combine with open
  API
* Move installation after Functions
* Move data quality after HOW-TOS

(cherry picked from commit 2eff5ee10c)
2022-05-23 14:50:54 +08:00
Mr.An ebe76fb986 [doc] Show all the functions of the home page through screenshots (#10118)
(cherry picked from commit 73f13a9c9c)
2022-05-23 14:48:22 +08:00
QuakeWang 418d422bb9 [Bug][doc] Fix the open-api docs request error (#10100)
(cherry picked from commit 243ee8ba70)
2022-05-23 14:47:44 +08:00
旺阳 4c62ee76e4 Fix alert server curator health check not work (#10111)
(cherry picked from commit 844ae42ee4)
2022-05-23 14:46:55 +08:00
songjianet 2c290b2f2b [Build][UI] Solve vite config throws terser warning. (#10105)
(cherry picked from commit bc71c3b0a0)
2022-05-23 14:46:32 +08:00
BaoLiang b016037a6f [BUG][TaskGroup] Task group does not take effect (#10093)
* fix 10092: Task group does not take effect

* fix 10092: Task group does not take effect

* fix 10092: Task group does not take effect

(cherry picked from commit ee2b855ced)
2022-05-23 14:46:14 +08:00
Jiajie Zhong cbfeb7f777 [fix] Enhance name pre checker in resource center (#10094)
* [fix] Enhance name pre checker in resource center

Add file name and directory checker to avoid directory traversal

* add some missing change and change docs

* change var name in directoryTraversal

* Fix ci

(cherry picked from commit 63f835715f)
2022-05-23 14:45:59 +08:00
rockfang 2797fcfc68 [Fix][UI] fulfill missing fields in DataQuality (#10098)
(cherry picked from commit 7a4a21d0b1)
2022-05-23 14:45:55 +08:00
QuakeWang 4f74db829e fix issue-10061 (#10062)
(cherry picked from commit 3bca240446)
2022-05-23 14:45:03 +08:00
Devosend 04c68e31e8 [Feat][UI] Add resource username for function and resource manage (#10086)
(cherry picked from commit 91f1d45948)
2022-05-23 14:43:57 +08:00
xiangzihao 98576cb509 [Fix-10049] Conditions Task branch flow failed (#10077)
(cherry picked from commit 225cb332d1)
2022-05-23 14:43:52 +08:00
hstdream 63ab98e67f [Fix-10082]Resource userName is null and udf function manager add a username (#10064)
* Resource userName is null

* [Fix-10082]Resource userName is null and udf function manager add a username

* [Fix-10082]Resource userName is null and udf function manager add a username

* [Fix-10082]Resource userName is null and udf function manager add a username

Co-authored-by: houshitao <shitaohou@163.com>
(cherry picked from commit 701b535ae6)
2022-05-23 14:43:31 +08:00
旺阳 f46a4d7dd8 [Fix][Docker] Support Multi-Architecture Docker Images (#10052)
Co-authored-by: kezhenxu94 <kezhenxu94@apache.org>
(cherry picked from commit 537c206c2d)
2022-05-23 14:43:26 +08:00
hstdream cb91fc72ee Create process definition with task group and task group priority cannot be save into db (#10078)
Co-authored-by: houshitao <shitaohou@163.com>
(cherry picked from commit cd70ad584a)
2022-05-23 14:43:19 +08:00
hstdream 4f11be7126 [Fix-10080]When the created tenant name is too long, an error message will be prompted (#10081)
* [Fix-10080]When the created tenant name is too long, an error message will be prompted

* [Fix-10080]When the created tenant name is too long, an error message will be prompted

* [Fix-10080]When the created tenant name is too long, an error message will be prompted

Co-authored-by: houshitao <shitaohou@163.com>
(cherry picked from commit 67cf7b2800)
2022-05-23 14:42:46 +08:00
caishunfeng aa51c66d91 [Bug][Master] fix master task failover (#10065)
* fix master task failover

* ui

(cherry picked from commit 0cc0ee77fa)
2022-05-23 14:42:41 +08:00
Devosend c2abc650a2 [Fix][UI] Fix bug where username is empty in file manage (#10070)
(cherry picked from commit c16424027e)
2022-05-23 14:42:13 +08:00
songjianet 6bc9141c91 [Fix][UI] Fix in the Chinese state, there is a problem with the multi-language support of the form. (#10066)
(cherry picked from commit 359300380b)
2022-05-23 14:41:53 +08:00
labbomb eca859546e [Fix][UI]Modify error message (#10054)
(cherry picked from commit a088ca1048)
2022-05-23 14:37:59 +08:00
陈家名 1b4036e2ce [python] Fix pre_submit_check error when local params in tasks (#10032)
(cherry picked from commit a2cd2a99e6)
2022-05-16 20:17:44 +08:00
caishunfeng 0f841d6ff9 [Bug] fix run on docker and k8s (#10026)
* fix docker-compose init schema

* recovery depend on zk

* update doc and dockerfile

* fix run on k8s

* udpate doc

* add DOCKER flag & update doc

* remove repeat DOCKER env

(cherry picked from commit b1885c7a26)
2022-05-16 20:17:37 +08:00
Dannila d74aa47196 [Fix-10039] Flink run command when perfecting Python jobs (#10042)
* [fix] flink task

* [fix] flink task

(cherry picked from commit d643e1c1cf)
2022-05-16 20:17:26 +08:00
chuxing ea284526f9 [doc] Correct docs of development-environment-setup (#9995)
(cherry picked from commit f666c64946)
2022-05-16 20:16:44 +08:00
zixi0825 25538aaf67 [dataquality] Fix task commnd null bug (#9974)
(cherry picked from commit 359cbe2a1e)
2022-05-16 20:16:36 +08:00
chuxing 44c6a053e7 [fix-9991][worker]fix statement is closed before resultSet.getMetaData() (#10014)
(cherry picked from commit df04c4aef0)
2022-05-16 20:15:46 +08:00
旺阳 5e1229f007 [doc] Correct kubernetes (#9985)
Co-authored-by: qingwli <qingwli@cisco.com>
(cherry picked from commit ee2c516813)
2022-05-16 20:15:05 +08:00
rockfang 931770be70 [Fix][UI] Fix errorOutputPath column in dataquality page (#10015)
(cherry picked from commit d17379da1f)
2022-05-16 20:11:52 +08:00
QuakeWang 665e62af44 [doc] Add example and notice about task type Dependent (#10001)
Co-authored-by: Jiajie Zhong <zhongjiajie955@gmail.com>
(cherry picked from commit 0fe75482a2)
2022-05-16 20:11:40 +08:00
Amy0104 2eb8c626e3 [Fix][UI] Support only one file upload on the file manage page. (#10007)
(cherry picked from commit 18bfe6399d)
2022-05-16 20:11:35 +08:00
WangJPLeo 7b0e6fe5ec [Fix-9975] The selected task instance was recreated when the Master service fail… (#9976)
* The selected task instance was recreated when the Master service failed over.

* Returns the expression result directly.

* Use Recovery to determine whether to use the old task instance.

(cherry picked from commit dbdbfeaeee)
2022-05-16 20:11:23 +08:00
Amy0104 ca0f41c10f [Fix][UI] Fix the task name validator error. (#10008)
(cherry picked from commit 00f102959b)
2022-05-16 20:10:55 +08:00
Kerwin 0da0613a1b [doc] Add the description about execute type in SQL task (#9987)
(cherry picked from commit bce5a28440)
2022-05-16 20:10:24 +08:00
rockfang 010d59f1d6 [Fix-10002] Fix some bugs in datasource list (#10005)
* fix: fix ellipsis bug in table column

* fix ellipsis bug in table column

* fix: json-highlight component support nested jsonstring

* fix: make datasource description show

(cherry picked from commit 53cd7009de)
2022-05-16 20:10:18 +08:00
Tq 104f67d306 [Bug] [MASTER-9811]fix cmd param to overwrite global param when executing complement (#9952)
* fix cmd param to overwrite global param when executing complement

* fix cmd param to overwrite global param when executing complement

(cherry picked from commit d4aeee16e5)
2022-05-16 20:09:10 +08:00
Jiajie Zhong b6b1fffbd6 [docker] Change docker hub HUB 2022-05-13 15:36:29 +08:00
Jiajie Zhong a9fa6b33a4
[chore] Change release version to 3.0.0-beta-1 (#9957) 2022-05-12 21:49:21 +08:00
QuakeWang c8f62adfc0 [Doc] Add example and notice about task type Conditions (#9945)
(cherry picked from commit 12a4b01268)
2022-05-11 12:02:24 +08:00
QuakeWang 346767c97d [doc] Update the document picture to new UI (#9953)
(cherry picked from commit f790bc25fd)
2022-05-11 12:02:24 +08:00
songjianet 88375e68e7 [doc] Fix docs deadlink in readme (#9972)
* [Docs] Fix docs url.

* Update README.md

* Update README.md

* Update README_zh_CN.md

Co-authored-by: Jiajie Zhong <zhongjiajie955@gmail.com>
(cherry picked from commit e51d0fb594)
2022-05-11 12:02:23 +08:00
songjianet 2954f11ad8 [Docs] Update README. (#9970)
(cherry picked from commit 4c50bf00c0)
2022-05-11 12:02:23 +08:00
Amy0104 fa6651453c [Fix][UI][V1.0.0-Beta] Fix the problem of packing failure. (#9962)
(cherry picked from commit 1971d8b3b5)
2022-05-11 12:02:23 +08:00
songjianet e2b6d02a69 [Build][UI] Upgrade dependencies. (#9956)
(cherry picked from commit f5c6216fd0)
2022-05-11 12:02:22 +08:00
Jiajie Zhong 9ce89f112e [chore] Combine version 206 and 210 sql upgrade to 300 (#9959)
(cherry picked from commit 316b611826)
2022-05-11 12:02:22 +08:00
songjianet a65cec7438
[Cherry-Pick][Docs] Upgrade license. (#9968) 2022-05-10 16:16:38 +08:00
Amy0104 7cd2f1df15
[Fix][UI][V1.0.0-Beta] Fix the problem of packing failure. (#9966) 2022-05-10 14:10:46 +08:00
1063 changed files with 32526 additions and 17133 deletions

View File

@ -3,14 +3,11 @@
{ {
"pattern": "^http://localhost" "pattern": "^http://localhost"
}, },
{
"pattern": "^https://hive.apache.org"
},
{
"pattern": "^http://192"
},
{ {
"pattern": "^https://img.shields.io/badge" "pattern": "^https://img.shields.io/badge"
},
{
"pattern": "/community/community.html$"
} }
], ],
"replacementPatterns": [ "replacementPatterns": [
@ -21,10 +18,6 @@
{ {
"pattern": "^/zh-cn/download/download.html$", "pattern": "^/zh-cn/download/download.html$",
"replacement": "https://dolphinscheduler.apache.org/zh-cn/download/download.html" "replacement": "https://dolphinscheduler.apache.org/zh-cn/download/download.html"
},
{
"pattern": "^/img",
"replacement": "{{BASEURL}}/docs/img"
} }
], ],
"timeout": "10s", "timeout": "10s",

View File

@ -0,0 +1,68 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Improvement request
description: Suggest an improvement for this project
title: "[Improvement][Module Name] Improvement title"
labels: [ "improvement", "Waiting for reply" ]
body:
- type: markdown
attributes:
value: |
For better global communication, Please write in English.
If you feel the description in English is not clear, then you can append description in Chinese, thanks!
- type: checkboxes
attributes:
label: Search before asking
description: >
Please make sure to search in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) first
to see whether the same feature was requested already.
options:
- label: >
I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no
similar feature requirement.
required: true
- type: textarea
attributes:
label: Description
description: A short description why your want to do this improvement
- type: checkboxes
attributes:
label: Are you willing to submit a PR?
description: >
This is absolutely not required, but we are happy to guide you in the contribution process
especially if you already have a good understanding of how to implement the improvement.
DolphinScheduler is a totally community-driven project and we love to bring new contributors in.
options:
- label: Yes I am willing to submit a PR!
- type: checkboxes
attributes:
label: Code of Conduct
description: |
The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it.
options:
- label: |
I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
required: true
- type: markdown
attributes:
value: "Thanks for completing our form!"

View File

@ -56,18 +56,26 @@ jobs:
needs: paths-filter needs: paths-filter
if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }} if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11' ]
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Sanity Check - name: Sanity Check
uses: ./.github/actions/sanity-check uses: ./.github/actions/sanity-check
- uses: actions/cache@v2 - uses: actions/cache@v2
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-maven key: ${{ runner.os }}-maven
- name: Build and Package - name: Build and Package on ${{ matrix.java }}
run: | run: |
./mvnw -B clean install \ ./mvnw -B clean install \
-Prelease,docker \ -Prelease,docker \
@ -78,11 +86,43 @@ jobs:
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
- name: Check dependency license - name: Check dependency license
run: tools/dependencies/check-LICENSE.sh run: tools/dependencies/check-LICENSE.sh
- uses: actions/upload-artifact@v2
if: ${{ matrix.java == '8' }}
name: Upload Binary Package
with:
name: binary-package-${{ matrix.java }}
path: ./dolphinscheduler-dist/target/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz
retention-days: 1
cluster-test:
name: ${{ matrix.case.name }}
needs: build
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
case:
- name: cluster-test-mysql
script: .github/workflows/cluster-test/mysql/start-job.sh
- name: cluster-test-postgresql
script: .github/workflows/cluster-test/postgresql/start-job.sh
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/download-artifact@v2
name: Download Binary Package
with:
# Only run cluster test on jdk8
name: binary-package-8
path: ./
- name: Running cluster test
run: |
/bin/bash ${{ matrix.case.script }}
result: result:
name: Build name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 30 timeout-minutes: 30
needs: [ build, paths-filter ] needs: [ build, paths-filter, cluster-test ]
if: always() if: always()
steps: steps:
- name: Status - name: Status
@ -91,7 +131,7 @@ jobs:
echo "Skip Build!" echo "Skip Build!"
exit 0 exit 0
fi fi
if [[ ${{ needs.build.result }} != 'success' ]]; then if [[ ${{ needs.build.result }} != 'success' || ${{ needs.cluster-test.result }} != 'success' ]]; then
echo "Build Failed!" echo "Build Failed!"
exit -1 exit -1
fi fi

View File

@ -0,0 +1,47 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM openjdk:8-jre-slim-buster
RUN apt update ; \
apt install -y curl wget default-mysql-client sudo openssh-server netcat-traditional ;
#COPY ./dolphinscheduler-dist/target/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root
COPY ./apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root
RUN tar -zxvf /root/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz -C ~
ENV DOLPHINSCHEDULER_HOME /root/apache-dolphinscheduler-*-SNAPSHOT-bin
#Setting install.sh
COPY .github/workflows/cluster-test/mysql/install_env.sh $DOLPHINSCHEDULER_HOME/bin/env/install_env.sh
#Setting dolphinscheduler_env.sh
COPY .github/workflows/cluster-test/mysql/dolphinscheduler_env.sh $DOLPHINSCHEDULER_HOME/bin/env/dolphinscheduler_env.sh
#Download mysql jar
ENV MYSQL_URL "https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar"
ENV MYSQL_DRIVER "mysql-connector-java-8.0.16.jar"
RUN wget -O $DOLPHINSCHEDULER_HOME/alert-server/libs/$MYSQL_DRIVER $MYSQL_URL ; \
cp $DOLPHINSCHEDULER_HOME/alert-server/libs/$MYSQL_DRIVER $DOLPHINSCHEDULER_HOME/api-server/libs/$MYSQL_DRIVER ; \
cp $DOLPHINSCHEDULER_HOME/alert-server/libs/$MYSQL_DRIVER $DOLPHINSCHEDULER_HOME/master-server/libs/$MYSQL_DRIVER ; \
cp $DOLPHINSCHEDULER_HOME/alert-server/libs/$MYSQL_DRIVER $DOLPHINSCHEDULER_HOME/worker-server/libs/$MYSQL_DRIVER ; \
cp $DOLPHINSCHEDULER_HOME/alert-server/libs/$MYSQL_DRIVER $DOLPHINSCHEDULER_HOME/tools/libs/$MYSQL_DRIVER
#Deploy
COPY .github/workflows/cluster-test/mysql/deploy.sh /root/deploy.sh
CMD [ "/bin/bash", "/root/deploy.sh" ]

View File

@ -0,0 +1,44 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -euox pipefail
USER=root
DOLPHINSCHEDULER_HOME=/root/apache-dolphinscheduler-*-SNAPSHOT-bin
#Create database
mysql -hmysql -P3306 -uroot -p123456 -e "CREATE DATABASE IF NOT EXISTS dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;"
#Sudo
sed -i '$a'$USER' ALL=(ALL) NOPASSWD: NOPASSWD: ALL' /etc/sudoers
sed -i 's/Defaults requirett/#Defaults requirett/g' /etc/sudoers
#SSH
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
service ssh start
#Init schema
/bin/bash $DOLPHINSCHEDULER_HOME/tools/bin/upgrade-schema.sh
#Start Cluster
/bin/bash $DOLPHINSCHEDULER_HOME/bin/start-all.sh
#Keep running
tail -f /dev/null

View File

@ -0,0 +1,65 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: "3"
services:
mysql:
container_name: mysql
image: mysql:5.7.36
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123456
ports:
- "3306:3306"
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD
interval: 5s
timeout: 60s
retries: 120
zoo1:
image: zookeeper:3.8.0
restart: always
hostname: zoo1
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
zoo2:
image: zookeeper:3.8.0
restart: always
hostname: zoo2
ports:
- "2182:2181"
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
zoo3:
image: zookeeper:3.8.0
restart: always
hostname: zoo3
ports:
- "2183:2181"
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181

View File

@ -0,0 +1,29 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: "3"
services:
ds:
container_name: ds
image: jdk8:ds_mysql_cluster
restart: always
ports:
- "12345:12345"
- "5679:5679"
- "1235:1235"
- "50053:50053"

View File

@ -0,0 +1,47 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# JAVA_HOME, will use it to start DolphinScheduler server
export JAVA_HOME=${JAVA_HOME:-/usr/local/openjdk-8}
# Database related configuration, set database type, username and password
export DATABASE=${DATABASE:-mysql}
export SPRING_PROFILES_ACTIVE=${DATABASE}
export SPRING_DATASOURCE_URL="jdbc:mysql://mysql:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8&useSSL=false"
export SPRING_DATASOURCE_USERNAME=root
export SPRING_DATASOURCE_PASSWORD=123456
# DolphinScheduler server related configuration
export SPRING_CACHE_TYPE=${SPRING_CACHE_TYPE:-none}
export SPRING_JACKSON_TIME_ZONE=${SPRING_JACKSON_TIME_ZONE:-UTC}
export MASTER_FETCH_COMMAND_NUM=${MASTER_FETCH_COMMAND_NUM:-10}
# Registry center configuration, determines the type and link of the registry center
export REGISTRY_TYPE=${REGISTRY_TYPE:-zookeeper}
export REGISTRY_ZOOKEEPER_CONNECT_STRING=${REGISTRY_ZOOKEEPER_CONNECT_STRING:-zoo1:2181,zoo2:2182,zoo3:2183}
# Tasks related configurations, need to change the configuration if you use the related tasks.
export HADOOP_HOME=${HADOOP_HOME:-/opt/soft/hadoop}
export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/opt/soft/hadoop/etc/hadoop}
export SPARK_HOME1=${SPARK_HOME1:-/opt/soft/spark1}
export SPARK_HOME2=${SPARK_HOME2:-/opt/soft/spark2}
export PYTHON_HOME=${PYTHON_HOME:-/opt/soft/python}
export HIVE_HOME=${HIVE_HOME:-/opt/soft/hive}
export FLINK_HOME=${FLINK_HOME:-/opt/soft/flink}
export DATAX_HOME=${DATAX_HOME:-/opt/soft/datax}
export PATH=$HADOOP_HOME/bin:$SPARK_HOME1/bin:$SPARK_HOME2/bin:$PYTHON_HOME/bin:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_HOME/bin:$PATH

View File

@ -0,0 +1,61 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ---------------------------------------------------------
# INSTALL MACHINE
# ---------------------------------------------------------
# A comma separated list of machine hostname or IP would be installed DolphinScheduler,
# including master, worker, api, alert. If you want to deploy in pseudo-distributed
# mode, just write a pseudo-distributed hostname
# Example for hostnames: ips="ds1,ds2,ds3,ds4,ds5", Example for IPs: ips="192.168.8.1,192.168.8.2,192.168.8.3,192.168.8.4,192.168.8.5"
ips=${ips:-"localhost"}
# Port of SSH protocol, default value is 22. For now we only support same port in all `ips` machine
# modify it if you use different ssh port
sshPort=${sshPort:-"22"}
# A comma separated list of machine hostname or IP would be installed Master server, it
# must be a subset of configuration `ips`.
# Example for hostnames: masters="ds1,ds2", Example for IPs: masters="192.168.8.1,192.168.8.2"
masters=${masters:-"localhost"}
# A comma separated list of machine <hostname>:<workerGroup> or <IP>:<workerGroup>.All hostname or IP must be a
# subset of configuration `ips`, And workerGroup have default value as `default`, but we recommend you declare behind the hosts
# Example for hostnames: workers="ds1:default,ds2:default,ds3:default", Example for IPs: workers="192.168.8.1:default,192.168.8.2:default,192.168.8.3:default"
workers=${workers:-"localhost:default"}
# A comma separated list of machine hostname or IP would be installed Alert server, it
# must be a subset of configuration `ips`.
# Example for hostname: alertServer="ds3", Example for IP: alertServer="192.168.8.3"
alertServer=${alertServer:-"localhost"}
# A comma separated list of machine hostname or IP would be installed API server, it
# must be a subset of configuration `ips`.
# Example for hostname: apiServers="ds1", Example for IP: apiServers="192.168.8.1"
apiServers=${apiServers:-"localhost"}
# The directory to install DolphinScheduler for all machine we config above. It will automatically be created by `install.sh` script if not exists.
# Do not set this configuration same as the current path (pwd)
installPath=${installPath:-"/root/apache-dolphinscheduler-*-SNAPSHOT-bin"}
# The user to deploy DolphinScheduler for all machine we config above. For now user must create by yourself before running `install.sh`
# script. The user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled than the root directory needs
# to be created by this user
deployUser=${deployUser:-"dolphinscheduler"}
# The root of zookeeper, for now DolphinScheduler default registry server is zookeeper.
zkRoot=${zkRoot:-"/dolphinscheduler"}

View File

@ -0,0 +1,91 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -x
API_HEALTHCHECK_COMMAND="curl -I -m 10 -o /dev/null -s -w %{http_code} http://0.0.0.0:12345/dolphinscheduler/actuator/health"
MASTER_HEALTHCHECK_COMMAND="curl -I -m 10 -o /dev/null -s -w %{http_code} http://0.0.0.0:5679/actuator/health"
WORKER_HEALTHCHECK_COMMAND="curl -I -m 10 -o /dev/null -s -w %{http_code} http://0.0.0.0:1235/actuator/health"
ALERT_HEALTHCHECK_COMMAND="curl -I -m 10 -o /dev/null -s -w %{http_code} http://0.0.0.0:50053/actuator/health"
#Cluster start health check
TIMEOUT=120
START_HEALTHCHECK_EXITCODE=0
for ((i=1; i<=TIMEOUT; i++))
do
MASTER_HTTP_STATUS=$(eval "$MASTER_HEALTHCHECK_COMMAND")
WORKER_HTTP_STATUS=$(eval "$WORKER_HEALTHCHECK_COMMAND")
API_HTTP_STATUS=$(eval "$API_HEALTHCHECK_COMMAND")
ALERT_HTTP_STATUS=$(eval "$ALERT_HEALTHCHECK_COMMAND")
if [[ $MASTER_HTTP_STATUS -eq 200 && $WORKER_HTTP_STATUS -eq 200 && $API_HTTP_STATUS -eq 200 && $ALERT_HTTP_STATUS -eq 200 ]];then
START_HEALTHCHECK_EXITCODE=0
else
START_HEALTHCHECK_EXITCODE=2
fi
if [[ $START_HEALTHCHECK_EXITCODE -eq 0 ]];then
echo "cluster start health check success"
break
fi
if [[ $i -eq $TIMEOUT ]];then
docker exec -u root ds bash -c "cat /root/apache-dolphinscheduler-*-SNAPSHOT-bin/master-server/logs/dolphinscheduler-master.log"
echo "cluster start health check failed"
exit $START_HEALTHCHECK_EXITCODE
fi
sleep 1
done
#Stop Cluster
docker exec -u root ds bash -c "/root/apache-dolphinscheduler-*-SNAPSHOT-bin/bin/stop-all.sh"
#Cluster stop health check
sleep 5
MASTER_HTTP_STATUS=$(eval "$MASTER_HEALTHCHECK_COMMAND")
if [[ $MASTER_HTTP_STATUS -ne 200 ]];then
echo "master stop health check success"
else
echo "master stop health check failed"
exit 3
fi
WORKER_HTTP_STATUS=$(eval "$WORKER_HEALTHCHECK_COMMAND")
if [[ $WORKER_HTTP_STATUS -ne 200 ]];then
echo "worker stop health check success"
else
echo "worker stop health check failed"
exit 3
fi
API_HTTP_STATUS=$(eval "$API_HEALTHCHECK_COMMAND")
if [[ $API_HTTP_STATUS -ne 200 ]];then
echo "api stop health check success"
else
echo "api stop health check failed"
exit 3
fi
ALERT_HTTP_STATUS=$(eval "$ALERT_HEALTHCHECK_COMMAND")
if [[ $ALERT_HTTP_STATUS -ne 200 ]];then
echo "alert stop health check success"
else
echo "alert stop health check failed"
exit 3
fi

View File

@ -16,13 +16,17 @@
# limitations under the License. # limitations under the License.
# #
BIN_DIR=$(dirname $0) #Start base service containers
DOLPHINSCHEDULER_HOME=${DOLPHINSCHEDULER_HOME:-$(cd $BIN_DIR/../..; pwd)} docker-compose -f .github/workflows/cluster-test/mysql/docker-compose-base.yaml up -d
source "$DOLPHINSCHEDULER_HOME/bin/env/dolphinscheduler_env.sh" #Build ds mysql cluster image
docker build -t jdk8:ds_mysql_cluster -f .github/workflows/cluster-test/mysql/Dockerfile .
JAVA_OPTS=${JAVA_OPTS:-"-server -Duser.timezone=${SPRING_JACKSON_TIME_ZONE} -Xms1g -Xmx1g -Xmn512m -XX:+PrintGCDetails -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof"} #Start ds mysql cluster container
docker-compose -f .github/workflows/cluster-test/mysql/docker-compose-cluster.yaml up -d
java $JAVA_OPTS \ #Running tests
-cp "$DOLPHINSCHEDULER_HOME/tools/conf":"$DOLPHINSCHEDULER_HOME/tools/libs/*":"$DOLPHINSCHEDULER_HOME/tools/sql" \ /bin/bash .github/workflows/cluster-test/mysql/running_test.sh
org.apache.dolphinscheduler.tools.datasource.CreateDolphinScheduler
#Cleanup
docker rm -f $(docker ps -aq)

View File

@ -0,0 +1,38 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM openjdk:8-jre-slim-buster
RUN apt update ; \
apt install -y curl wget sudo openssh-server netcat-traditional ;
#COPY ./dolphinscheduler-dist/target/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root
COPY ./apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root
RUN tar -zxvf /root/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz -C ~
ENV DOLPHINSCHEDULER_HOME /root/apache-dolphinscheduler-*-SNAPSHOT-bin
#Setting install.sh
COPY .github/workflows/cluster-test/postgresql/install_env.sh $DOLPHINSCHEDULER_HOME/bin/env/install_env.sh
#Setting dolphinscheduler_env.sh
COPY .github/workflows/cluster-test/postgresql/dolphinscheduler_env.sh $DOLPHINSCHEDULER_HOME/bin/env/dolphinscheduler_env.sh
#Deploy
COPY .github/workflows/cluster-test/postgresql/deploy.sh /root/deploy.sh
CMD [ "/bin/bash", "/root/deploy.sh" ]

View File

@ -0,0 +1,41 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -euox pipefail
USER=root
DOLPHINSCHEDULER_HOME=/root/apache-dolphinscheduler-*-SNAPSHOT-bin
#Sudo
sed -i '$a'$USER' ALL=(ALL) NOPASSWD: NOPASSWD: ALL' /etc/sudoers
sed -i 's/Defaults requirett/#Defaults requirett/g' /etc/sudoers
#SSH
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
service ssh start
#Init schema
/bin/bash $DOLPHINSCHEDULER_HOME/tools/bin/upgrade-schema.sh
#Start Cluster
/bin/bash $DOLPHINSCHEDULER_HOME/bin/start-all.sh
#Keep running
tail -f /dev/null

View File

@ -0,0 +1,65 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: "3"
services:
postgres:
container_name: postgres
image: postgres:14.1
restart: always
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: dolphinscheduler
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 60s
retries: 120
zoo1:
image: zookeeper:3.8.0
restart: always
hostname: zoo1
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
zoo2:
image: zookeeper:3.8.0
restart: always
hostname: zoo2
ports:
- "2182:2181"
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
zoo3:
image: zookeeper:3.8.0
restart: always
hostname: zoo3
ports:
- "2183:2181"
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181

View File

@ -0,0 +1,29 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
version: "3"
services:
ds:
container_name: ds
image: jdk8:ds_postgresql_cluster
restart: always
ports:
- "12345:12345"
- "5679:5679"
- "1235:1235"
- "50053:50053"

View File

@ -0,0 +1,47 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# JAVA_HOME, will use it to start DolphinScheduler server
export JAVA_HOME=${JAVA_HOME:-/usr/local/openjdk-8}
# Database related configuration, set database type, username and password
export DATABASE=${DATABASE:-postgresql}
export SPRING_PROFILES_ACTIVE=${DATABASE}
export SPRING_DATASOURCE_URL="jdbc:postgresql://postgres:5432/dolphinscheduler"
export SPRING_DATASOURCE_USERNAME=postgres
export SPRING_DATASOURCE_PASSWORD=postgres
# DolphinScheduler server related configuration
export SPRING_CACHE_TYPE=${SPRING_CACHE_TYPE:-none}
export SPRING_JACKSON_TIME_ZONE=${SPRING_JACKSON_TIME_ZONE:-UTC}
export MASTER_FETCH_COMMAND_NUM=${MASTER_FETCH_COMMAND_NUM:-10}
# Registry center configuration, determines the type and link of the registry center
export REGISTRY_TYPE=${REGISTRY_TYPE:-zookeeper}
export REGISTRY_ZOOKEEPER_CONNECT_STRING=${REGISTRY_ZOOKEEPER_CONNECT_STRING:-zoo1:2181,zoo2:2182,zoo3:2183}
# Tasks related configurations, need to change the configuration if you use the related tasks.
export HADOOP_HOME=${HADOOP_HOME:-/opt/soft/hadoop}
export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/opt/soft/hadoop/etc/hadoop}
export SPARK_HOME1=${SPARK_HOME1:-/opt/soft/spark1}
export SPARK_HOME2=${SPARK_HOME2:-/opt/soft/spark2}
export PYTHON_HOME=${PYTHON_HOME:-/opt/soft/python}
export HIVE_HOME=${HIVE_HOME:-/opt/soft/hive}
export FLINK_HOME=${FLINK_HOME:-/opt/soft/flink}
export DATAX_HOME=${DATAX_HOME:-/opt/soft/datax}
export PATH=$HADOOP_HOME/bin:$SPARK_HOME1/bin:$SPARK_HOME2/bin:$PYTHON_HOME/bin:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_HOME/bin:$PATH

View File

@ -0,0 +1,61 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ---------------------------------------------------------
# INSTALL MACHINE
# ---------------------------------------------------------
# A comma separated list of machine hostname or IP would be installed DolphinScheduler,
# including master, worker, api, alert. If you want to deploy in pseudo-distributed
# mode, just write a pseudo-distributed hostname
# Example for hostnames: ips="ds1,ds2,ds3,ds4,ds5", Example for IPs: ips="192.168.8.1,192.168.8.2,192.168.8.3,192.168.8.4,192.168.8.5"
ips=${ips:-"localhost"}
# Port of SSH protocol, default value is 22. For now we only support same port in all `ips` machine
# modify it if you use different ssh port
sshPort=${sshPort:-"22"}
# A comma separated list of machine hostname or IP would be installed Master server, it
# must be a subset of configuration `ips`.
# Example for hostnames: masters="ds1,ds2", Example for IPs: masters="192.168.8.1,192.168.8.2"
masters=${masters:-"localhost"}
# A comma separated list of machine <hostname>:<workerGroup> or <IP>:<workerGroup>.All hostname or IP must be a
# subset of configuration `ips`, And workerGroup have default value as `default`, but we recommend you declare behind the hosts
# Example for hostnames: workers="ds1:default,ds2:default,ds3:default", Example for IPs: workers="192.168.8.1:default,192.168.8.2:default,192.168.8.3:default"
workers=${workers:-"localhost:default"}
# A comma separated list of machine hostname or IP would be installed Alert server, it
# must be a subset of configuration `ips`.
# Example for hostname: alertServer="ds3", Example for IP: alertServer="192.168.8.3"
alertServer=${alertServer:-"localhost"}
# A comma separated list of machine hostname or IP would be installed API server, it
# must be a subset of configuration `ips`.
# Example for hostname: apiServers="ds1", Example for IP: apiServers="192.168.8.1"
apiServers=${apiServers:-"localhost"}
# The directory to install DolphinScheduler for all machine we config above. It will automatically be created by `install.sh` script if not exists.
# Do not set this configuration same as the current path (pwd)
installPath=${installPath:-"/root/apache-dolphinscheduler-*-SNAPSHOT-bin"}
# The user to deploy DolphinScheduler for all machine we config above. For now user must create by yourself before running `install.sh`
# script. The user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled than the root directory needs
# to be created by this user
deployUser=${deployUser:-"dolphinscheduler"}
# The root of zookeeper, for now DolphinScheduler default registry server is zookeeper.
zkRoot=${zkRoot:-"/dolphinscheduler"}

View File

@ -0,0 +1,91 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set -x
API_HEALTHCHECK_COMMAND="curl -I -m 10 -o /dev/null -s -w %{http_code} http://0.0.0.0:12345/dolphinscheduler/actuator/health"
MASTER_HEALTHCHECK_COMMAND="curl -I -m 10 -o /dev/null -s -w %{http_code} http://0.0.0.0:5679/actuator/health"
WORKER_HEALTHCHECK_COMMAND="curl -I -m 10 -o /dev/null -s -w %{http_code} http://0.0.0.0:1235/actuator/health"
ALERT_HEALTHCHECK_COMMAND="curl -I -m 10 -o /dev/null -s -w %{http_code} http://0.0.0.0:50053/actuator/health"
#Cluster start health check
TIMEOUT=120
START_HEALTHCHECK_EXITCODE=0
for ((i=1; i<=TIMEOUT; i++))
do
MASTER_HTTP_STATUS=$(eval "$MASTER_HEALTHCHECK_COMMAND")
WORKER_HTTP_STATUS=$(eval "$WORKER_HEALTHCHECK_COMMAND")
API_HTTP_STATUS=$(eval "$API_HEALTHCHECK_COMMAND")
ALERT_HTTP_STATUS=$(eval "$ALERT_HEALTHCHECK_COMMAND")
if [[ $MASTER_HTTP_STATUS -eq 200 && $WORKER_HTTP_STATUS -eq 200 && $API_HTTP_STATUS -eq 200 && $ALERT_HTTP_STATUS -eq 200 ]];then
START_HEALTHCHECK_EXITCODE=0
else
START_HEALTHCHECK_EXITCODE=2
fi
if [[ $START_HEALTHCHECK_EXITCODE -eq 0 ]];then
echo "cluster start health check success"
break
fi
if [[ $i -eq $TIMEOUT ]];then
docker exec -u root ds bash -c "cat /root/apache-dolphinscheduler-*-SNAPSHOT-bin/master-server/logs/dolphinscheduler-master.log"
echo "cluster start health check failed"
exit $START_HEALTHCHECK_EXITCODE
fi
sleep 1
done
#Stop Cluster
docker exec -u root ds bash -c "/root/apache-dolphinscheduler-*-SNAPSHOT-bin/bin/stop-all.sh"
#Cluster stop health check
sleep 5
MASTER_HTTP_STATUS=$(eval "$MASTER_HEALTHCHECK_COMMAND")
if [[ $MASTER_HTTP_STATUS -ne 200 ]];then
echo "master stop health check success"
else
echo "master stop health check failed"
exit 3
fi
WORKER_HTTP_STATUS=$(eval "$WORKER_HEALTHCHECK_COMMAND")
if [[ $WORKER_HTTP_STATUS -ne 200 ]];then
echo "worker stop health check success"
else
echo "worker stop health check failed"
exit 3
fi
API_HTTP_STATUS=$(eval "$API_HEALTHCHECK_COMMAND")
if [[ $API_HTTP_STATUS -ne 200 ]];then
echo "api stop health check success"
else
echo "api stop health check failed"
exit 3
fi
ALERT_HTTP_STATUS=$(eval "$ALERT_HEALTHCHECK_COMMAND")
if [[ $ALERT_HTTP_STATUS -ne 200 ]];then
echo "alert stop health check success"
else
echo "alert stop health check failed"
exit 3
fi

View File

@ -0,0 +1,32 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#Start base service containers
docker-compose -f .github/workflows/cluster-test/postgresql/docker-compose-base.yaml up -d
#Build ds postgresql cluster image
docker build -t jdk8:ds_postgresql_cluster -f .github/workflows/cluster-test/postgresql/Dockerfile .
#Start ds postgresql cluster container
docker-compose -f .github/workflows/cluster-test/postgresql/docker-compose-cluster.yaml up -d
#Running tests
/bin/bash .github/workflows/cluster-test/postgresql/running_test.sh
#Cleanup
docker rm -f $(docker ps -aq)

View File

@ -48,9 +48,9 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2
- name: Build and push docker images - name: Build and push docker images
run: | run: |
./mvnw -B clean deploy \ ./mvnw -B clean deploy \

View File

@ -22,8 +22,6 @@ on:
paths: paths:
- 'dolphinscheduler-python/**' - 'dolphinscheduler-python/**'
pull_request: pull_request:
paths:
- 'dolphinscheduler-python/**'
concurrency: concurrency:
group: py-${{ github.event.pull_request.number || github.ref }} group: py-${{ github.event.pull_request.number || github.ref }}
@ -38,9 +36,27 @@ env:
DEPENDENCES: pip setuptools wheel tox DEPENDENCES: pip setuptools wheel tox
jobs: jobs:
paths-filter:
name: Python-Path-Filter
runs-on: ubuntu-latest
outputs:
not-docs: ${{ steps.filter.outputs.not-docs }}
py-change: ${{ steps.filter.outputs.py-change }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
id: filter
with:
filters: |
not-docs:
- '!(docs/**)'
py-change:
- 'dolphinscheduler-python/pydolphinscheduler/**'
lint: lint:
name: Lint name: Lint
if: ${{ (needs.paths-filter.outputs.py-change == 'true') || (github.event_name == 'push') }}
timeout-minutes: 15 timeout-minutes: 15
needs: paths-filter
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -112,14 +128,12 @@ jobs:
- name: Run Tests Build Docs - name: Run Tests Build Docs
run: | run: |
python -m tox -vv -e local-ci python -m tox -vv -e local-ci
build-image: integrate-test:
name: Build Image name: Integrate Test
if: ${{ (needs.paths-filter.outputs.not-docs == 'true') || (github.event_name == 'push') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Switch to project root directory to run mvnw command needs: paths-filter
defaults: timeout-minutes: 30
run:
working-directory: ./
timeout-minutes: 20
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
@ -132,7 +146,9 @@ jobs:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven- restore-keys: ${{ runner.os }}-maven-
# Switch to project root directory to run mvnw command
- name: Build Image - name: Build Image
working-directory: ./
run: | run: |
./mvnw -B clean install \ ./mvnw -B clean install \
-Dmaven.test.skip \ -Dmaven.test.skip \
@ -140,32 +156,6 @@ jobs:
-Dmaven.checkstyle.skip \ -Dmaven.checkstyle.skip \
-Pdocker,release -Ddocker.tag=ci \ -Pdocker,release -Ddocker.tag=ci \
-pl dolphinscheduler-standalone-server -am -pl dolphinscheduler-standalone-server -am
- name: Export Docker Images
run: |
docker save apache/dolphinscheduler-standalone-server:ci -o /tmp/standalone-image.tar \
&& du -sh /tmp/standalone-image.tar
- uses: actions/upload-artifact@v2
name: Upload Docker Images
with:
name: standalone-image
path: /tmp/standalone-image.tar
retention-days: 1
integrate-test:
name: Integrate Test
timeout-minutes: 20
needs:
- build-image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
name: Download Docker Images
with:
name: standalone-image
path: /tmp
- name: Load Docker Images
run: |
docker load -i /tmp/standalone-image.tar
- name: Set up Python 3.7 - name: Set up Python 3.7
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
@ -173,6 +163,29 @@ jobs:
- name: Install Dependences - name: Install Dependences
run: | run: |
python -m pip install --upgrade ${{ env.DEPENDENCES }} python -m pip install --upgrade ${{ env.DEPENDENCES }}
- name: Run Tests Build Docs - name: Run Integrate Tests
run: | run: |
python -m tox -vv -e integrate-test python -m tox -vv -e integrate-test
result:
name: Python
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [ paths-filter, local-ci, integrate-test ]
if: always()
steps:
- name: Status
# We need change CWD to current directory to avoid global default working directory not exists
working-directory: ./
run: |
if [[ ${{ needs.paths-filter.outputs.not-docs }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then
echo "Only document change, skip both python unit and integrate test!"
exit 0
fi
if [[ ${{ needs.paths-filter.outputs.py-change }} == 'false' && ${{ needs.integrate-test.result }} == 'success' && ${{ github.event_name }} == 'pull_request' ]]; then
echo "No python code change, and integrate test pass!"
exit 0
fi
if [[ ${{ needs.integrate-test.result }} != 'success' || ${{ needs.local-ci.result }} != 'success' ]]; then
echo "py-ci Failed!"
exit -1
fi

View File

@ -53,6 +53,9 @@ jobs:
needs: paths-filter needs: paths-filter
if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }} if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '11']
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -60,10 +63,10 @@ jobs:
submodules: true submodules: true
- name: Sanity Check - name: Sanity Check
uses: ./.github/actions/sanity-check uses: ./.github/actions/sanity-check
- name: Set up JDK 1.8 - name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2 uses: actions/setup-java@v2
with: with:
java-version: 8 java-version: ${{ matrix.java }}
distribution: 'adopt' distribution: 'adopt'
- uses: actions/cache@v2 - uses: actions/cache@v2
with: with:

1
.gitignore vendored
View File

@ -6,6 +6,7 @@
.DS_Store .DS_Store
.target .target
.idea/ .idea/
.run/
target/ target/
dist/ dist/
all-dependencies.txt all-dependencies.txt

View File

@ -54,14 +54,11 @@ Overload processing: By using the task queue mechanism, the number of schedulabl
## User Interface Screenshots ## User Interface Screenshots
![home page](https://user-images.githubusercontent.com/15833811/75218288-bf286400-57d4-11ea-8263-d639c6511d5f.jpg) ![dag](./images/en_US/dag.png)
![dag](https://user-images.githubusercontent.com/15833811/75236750-3374fe80-57f9-11ea-857d-62a66a5a559d.png) ![data-source](./images/en_US/data-source.png)
![process definition list page](https://user-images.githubusercontent.com/15833811/75216886-6f479e00-57d0-11ea-92dd-66e7640a186f.png) ![home](./images/en_US/home.png)
![view task log online](https://user-images.githubusercontent.com/15833811/75216924-9900c500-57d0-11ea-91dc-3522a76bdbbe.png) ![master](./images/en_US/master.png)
![resource management](https://user-images.githubusercontent.com/15833811/75216984-be8dce80-57d0-11ea-840d-58546edc8788.png) ![workflow-tree](./images/en_US/workflow-tree.png)
![monitor](https://user-images.githubusercontent.com/59273635/75625839-c698a480-5bfc-11ea-8bbe-895b561b337f.png)
![security](https://user-images.githubusercontent.com/15833811/75236441-bfd2f180-57f8-11ea-88bd-f24311e01b7e.png)
![treeview](https://user-images.githubusercontent.com/15833811/75217191-3fe56100-57d1-11ea-8856-f19180d9a879.png)
## QuickStart in Docker ## QuickStart in Docker
@ -100,13 +97,9 @@ You are very welcome to communicate with the developers and users of Dolphin Sch
1. Join the Slack channel [Slack](https://asf-dolphinscheduler.slack.com/). 1. Join the Slack channel [Slack](https://asf-dolphinscheduler.slack.com/).
2. Follow the [Twitter account of DolphinScheduler](https://twitter.com/dolphinschedule) and get the latest news on time. 2. Follow the [Twitter account of DolphinScheduler](https://twitter.com/dolphinschedule) and get the latest news on time.
### Contributor over time
[![Contributor over time](https://contributor-graph-api.apiseven.com/contributors-svg?chart=contributorOverTime&repo=apache/dolphinscheduler)](https://www.apiseven.com/en/contributor-graph?chart=contributorOverTime&repo=apache/dolphinscheduler)
## How to Contribute ## How to Contribute
The community welcomes everyone to contribute, please refer to this page to find out more: [How to contribute](https://dolphinscheduler.apache.org/en-us/community/development/contribute.html). The community welcomes everyone to contribute, please refer to this page to find out more: [How to contribute](docs/docs/en/contribute/join/contribute.md).
# Landscapes # Landscapes

View File

@ -36,19 +36,11 @@ Dolphin Scheduler Official Website
## 系统部分截图 ## 系统部分截图
![home page](https://user-images.githubusercontent.com/15833811/75208819-abbad000-57b7-11ea-8d3c-67e7c270671f.jpg) ![dag](./images/zh_CN/dag.png)
![data-source](./images/zh_CN/data-source.png)
![dag](https://user-images.githubusercontent.com/15833811/75209584-93e44b80-57b9-11ea-952e-537fb24ec72d.jpg) ![home](./images/zh_CN/home.png)
![master](./images/zh_CN/master.png)
![log](https://user-images.githubusercontent.com/15833811/75209645-c55d1700-57b9-11ea-94d4-e3fa91ab5218.jpg) ![workflow-tree](./images/zh_CN/workflow-tree.png)
![gantt](https://user-images.githubusercontent.com/15833811/75209640-c0986300-57b9-11ea-878e-a2098533ad44.jpg)
![resources](https://user-images.githubusercontent.com/15833811/75209403-11f42280-57b9-11ea-9b59-d4be77063553.jpg)
![monitor](https://user-images.githubusercontent.com/15833811/75209631-b5ddce00-57b9-11ea-8d22-cdf15cf0ee25.jpg)
![security](https://user-images.githubusercontent.com/15833811/75209633-baa28200-57b9-11ea-9def-94bef2e212a7.jpg)
## 近期研发计划 ## 近期研发计划
@ -57,7 +49,7 @@ DolphinScheduler的工作计划<a href="https://github.com/apache/dolphinsche
## 参与贡献 ## 参与贡献
非常欢迎大家来参与贡献,贡献流程请参考: 非常欢迎大家来参与贡献,贡献流程请参考:
[[参与贡献](https://dolphinscheduler.apache.org/zh-cn/community/development/contribute.html)] [[参与贡献](docs/docs/zh/contribute/join/contribute.md)]
## 快速试用 Docker ## 快速试用 Docker

View File

@ -15,9 +15,10 @@
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
# #
HUB=ghcr.io/apache/dolphinscheduler HUB=apache
TAG=latest TAG=3.0.0
TZ=Asia/Shanghai TZ=Asia/Shanghai
DATABASE=postgresql
SPRING_DATASOURCE_URL=jdbc:postgresql://dolphinscheduler-postgresql:5432/dolphinscheduler SPRING_DATASOURCE_URL=jdbc:postgresql://dolphinscheduler-postgresql:5432/dolphinscheduler
REGISTRY_ZOOKEEPER_CONNECT_STRING=dolphinscheduler-zookeeper:2181 REGISTRY_ZOOKEEPER_CONNECT_STRING=dolphinscheduler-zookeeper:2181

View File

@ -19,6 +19,9 @@ version: "3.8"
services: services:
dolphinscheduler-postgresql: dolphinscheduler-postgresql:
image: bitnami/postgresql:11.11.0 image: bitnami/postgresql:11.11.0
ports:
- "5432:5432"
profiles: ["all", "schema"]
environment: environment:
POSTGRESQL_USERNAME: root POSTGRESQL_USERNAME: root
POSTGRESQL_PASSWORD: root POSTGRESQL_PASSWORD: root
@ -35,6 +38,7 @@ services:
dolphinscheduler-zookeeper: dolphinscheduler-zookeeper:
image: bitnami/zookeeper:3.6.2 image: bitnami/zookeeper:3.6.2
profiles: ["all"]
environment: environment:
ALLOW_ANONYMOUS_LOGIN: "yes" ALLOW_ANONYMOUS_LOGIN: "yes"
ZOO_4LW_COMMANDS_WHITELIST: srvr,ruok,wchs,cons ZOO_4LW_COMMANDS_WHITELIST: srvr,ruok,wchs,cons
@ -51,7 +55,8 @@ services:
dolphinscheduler-schema-initializer: dolphinscheduler-schema-initializer:
image: ${HUB}/dolphinscheduler-tools:${TAG} image: ${HUB}/dolphinscheduler-tools:${TAG}
env_file: .env env_file: .env
command: [ bin/create-schema.sh ] profiles: ["schema"]
command: [ tools/bin/upgrade-schema.sh ]
depends_on: depends_on:
dolphinscheduler-postgresql: dolphinscheduler-postgresql:
condition: service_healthy condition: service_healthy
@ -66,15 +71,15 @@ services:
image: ${HUB}/dolphinscheduler-api:${TAG} image: ${HUB}/dolphinscheduler-api:${TAG}
ports: ports:
- "12345:12345" - "12345:12345"
- "25333:25333"
profiles: ["all"]
env_file: .env env_file: .env
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/dolphinscheduler/actuator/health" ]
interval: 30s interval: 30s
timeout: 5s timeout: 5s
retries: 3 retries: 3
depends_on: depends_on:
dolphinscheduler-schema-initializer:
condition: service_completed_successfully
dolphinscheduler-zookeeper: dolphinscheduler-zookeeper:
condition: service_healthy condition: service_healthy
volumes: volumes:
@ -86,15 +91,13 @@ services:
dolphinscheduler-alert: dolphinscheduler-alert:
image: ${HUB}/dolphinscheduler-alert-server:${TAG} image: ${HUB}/dolphinscheduler-alert-server:${TAG}
profiles: ["all"]
env_file: .env env_file: .env
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:50053/actuator/health" ] test: [ "CMD", "curl", "http://localhost:50053/actuator/health" ]
interval: 30s interval: 30s
timeout: 5s timeout: 5s
retries: 3 retries: 3
depends_on:
dolphinscheduler-schema-initializer:
condition: service_completed_successfully
volumes: volumes:
- dolphinscheduler-logs:/opt/dolphinscheduler/logs - dolphinscheduler-logs:/opt/dolphinscheduler/logs
networks: networks:
@ -102,6 +105,7 @@ services:
dolphinscheduler-master: dolphinscheduler-master:
image: ${HUB}/dolphinscheduler-master:${TAG} image: ${HUB}/dolphinscheduler-master:${TAG}
profiles: ["all"]
env_file: .env env_file: .env
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:5679/actuator/health" ] test: [ "CMD", "curl", "http://localhost:5679/actuator/health" ]
@ -109,8 +113,6 @@ services:
timeout: 5s timeout: 5s
retries: 3 retries: 3
depends_on: depends_on:
dolphinscheduler-schema-initializer:
condition: service_completed_successfully
dolphinscheduler-zookeeper: dolphinscheduler-zookeeper:
condition: service_healthy condition: service_healthy
volumes: volumes:
@ -121,6 +123,7 @@ services:
dolphinscheduler-worker: dolphinscheduler-worker:
image: ${HUB}/dolphinscheduler-worker:${TAG} image: ${HUB}/dolphinscheduler-worker:${TAG}
profiles: ["all"]
env_file: .env env_file: .env
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:1235/actuator/health" ] test: [ "CMD", "curl", "http://localhost:1235/actuator/health" ]
@ -128,8 +131,6 @@ services:
timeout: 5s timeout: 5s
retries: 3 retries: 3
depends_on: depends_on:
dolphinscheduler-schema-initializer:
condition: service_completed_successfully
dolphinscheduler-zookeeper: dolphinscheduler-zookeeper:
condition: service_healthy condition: service_healthy
volumes: volumes:

View File

@ -50,6 +50,7 @@ services:
image: apache/dolphinscheduler-api image: apache/dolphinscheduler-api
ports: ports:
- 12345:12345 - 12345:12345
- 25333:25333
env_file: .env env_file: .env
healthcheck: healthcheck:
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ]

View File

@ -39,14 +39,20 @@ version: 2.0.0
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. # incremented each time you make changes to the application.
appVersion: dev-SNAPSHOT appVersion: 3.0.0
dependencies: dependencies:
- name: postgresql - name: postgresql
version: 10.3.18 version: 10.3.18
repository: https://charts.bitnami.com/bitnami # Due to a change in the Bitnami repo, https://charts.bitnami.com/bitnami was truncated only
# containing entries for the latest 6 months (from January 2022 on).
# This URL: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
# contains the full 'index.yaml'.
# See detail here: https://github.com/bitnami/charts/issues/10833
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
condition: postgresql.enabled condition: postgresql.enabled
- name: zookeeper - name: zookeeper
version: 6.5.3 version: 6.5.3
repository: https://charts.bitnami.com/bitnami # Same as above.
repository: https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
condition: zookeeper.enabled condition: zookeeper.enabled

View File

@ -112,7 +112,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
Create a default fully qualified zookkeeper quorum. Create a default fully qualified zookkeeper quorum.
*/}} */}}
{{- define "dolphinscheduler.zookeeper.quorum" -}} {{- define "dolphinscheduler.zookeeper.quorum" -}}
{{- $port := default "2181" (.Values.zookeeper.service.port | toString) -}} {{- $port := default "2181" .Values.zookeeper.service.port | toString -}}
{{- printf "%s:%s" (include "dolphinscheduler.zookeeper.fullname" .) $port -}} {{- printf "%s:%s" (include "dolphinscheduler.zookeeper.fullname" .) $port -}}
{{- end -}} {{- end -}}

View File

@ -67,6 +67,8 @@ spec:
env: env:
- name: TZ - name: TZ
value: {{ .Values.timezone }} value: {{ .Values.timezone }}
- name: SPRING_JACKSON_TIME_ZONE
value: {{ .Values.timezone }}
{{- include "dolphinscheduler.database.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.database.env_vars" . | nindent 12 }}
{{ range $key, $value := .Values.alert.env }} {{ range $key, $value := .Values.alert.env }}
- name: {{ $key }} - name: {{ $key }}

View File

@ -62,9 +62,13 @@ spec:
ports: ports:
- containerPort: 12345 - containerPort: 12345
name: "api-port" name: "api-port"
- containerPort: 25333
name: "python-api-port"
env: env:
- name: TZ - name: TZ
value: {{ .Values.timezone }} value: {{ .Values.timezone }}
- name: SPRING_JACKSON_TIME_ZONE
value: {{ .Values.timezone }}
{{- include "dolphinscheduler.database.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.database.env_vars" . | nindent 12 }}
{{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }}
{{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }}
@ -82,7 +86,7 @@ spec:
{{- if .Values.api.livenessProbe.enabled }} {{- if .Values.api.livenessProbe.enabled }}
livenessProbe: livenessProbe:
exec: exec:
command: ["curl", "-s", "http://localhost:12345/actuator/health/liveness"] command: ["curl", "-s", "http://localhost:12345/dolphinscheduler/actuator/health/liveness"]
initialDelaySeconds: {{ .Values.api.livenessProbe.initialDelaySeconds }} initialDelaySeconds: {{ .Values.api.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.api.livenessProbe.periodSeconds }} periodSeconds: {{ .Values.api.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.api.livenessProbe.timeoutSeconds }} timeoutSeconds: {{ .Values.api.livenessProbe.timeoutSeconds }}
@ -92,7 +96,7 @@ spec:
{{- if .Values.api.readinessProbe.enabled }} {{- if .Values.api.readinessProbe.enabled }}
readinessProbe: readinessProbe:
exec: exec:
command: ["curl", "-s", "http://localhost:12345/actuator/health/readiness"] command: ["curl", "-s", "http://localhost:12345/dolphinscheduler/actuator/health/readiness"]
initialDelaySeconds: {{ .Values.api.readinessProbe.initialDelaySeconds }} initialDelaySeconds: {{ .Values.api.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.api.readinessProbe.periodSeconds }} periodSeconds: {{ .Values.api.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.api.readinessProbe.timeoutSeconds }} timeoutSeconds: {{ .Values.api.readinessProbe.timeoutSeconds }}

View File

@ -38,10 +38,12 @@ spec:
image: {{ include "dolphinscheduler.image.fullname.tools" . }} image: {{ include "dolphinscheduler.image.fullname.tools" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
args: args:
- bin/create-schema.sh - tools/bin/upgrade-schema.sh
env: env:
- name: TZ - name: TZ
value: {{ .Values.timezone }} value: {{ .Values.timezone }}
- name: SPRING_JACKSON_TIME_ZONE
value: {{ .Values.timezone }}
{{- include "dolphinscheduler.database.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.database.env_vars" . | nindent 12 }}
{{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }}
{{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }}

View File

@ -62,6 +62,8 @@ spec:
env: env:
- name: TZ - name: TZ
value: {{ .Values.timezone }} value: {{ .Values.timezone }}
- name: SPRING_JACKSON_TIME_ZONE
value: {{ .Values.timezone }}
{{- include "dolphinscheduler.database.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.database.env_vars" . | nindent 12 }}
{{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }}
{{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }}

View File

@ -62,6 +62,8 @@ spec:
env: env:
- name: TZ - name: TZ
value: {{ .Values.timezone }} value: {{ .Values.timezone }}
- name: SPRING_JACKSON_TIME_ZONE
value: {{ .Values.timezone }}
- name: ALERT_LISTEN_HOST - name: ALERT_LISTEN_HOST
value: {{ include "dolphinscheduler.fullname" . }}-alert value: {{ include "dolphinscheduler.fullname" . }}-alert
{{- include "dolphinscheduler.database.env_vars" . | nindent 12 }} {{- include "dolphinscheduler.database.env_vars" . | nindent 12 }}

View File

@ -40,6 +40,13 @@ spec:
{{- end }} {{- end }}
protocol: TCP protocol: TCP
name: api-port name: api-port
- port: 25333
targetPort: python-api-port
{{- if and (eq .Values.api.service.type "NodePort") .Values.api.service.nodePort }}
nodePort: {{ .Values.api.service.nodePort }}
{{- end }}
protocol: TCP
name: python-api-port
{{- if .Values.api.service.externalIPs }} {{- if .Values.api.service.externalIPs }}
externalIPs: externalIPs:
{{- toYaml .Values.api.service.externalIPs | nindent 4 }} {{- toYaml .Values.api.service.externalIPs | nindent 4 }}

View File

@ -23,7 +23,7 @@ timezone: "Asia/Shanghai"
image: image:
registry: "dolphinscheduler.docker.scarf.sh/apache" registry: "dolphinscheduler.docker.scarf.sh/apache"
tag: "dev-SNAPSHOT" tag: "3.0.0"
pullPolicy: "IfNotPresent" pullPolicy: "IfNotPresent"
pullSecret: "" pullSecret: ""
@ -52,6 +52,8 @@ externalDatabase:
## If not exists external registry, the zookeeper registry will be used by default. ## If not exists external registry, the zookeeper registry will be used by default.
zookeeper: zookeeper:
enabled: true enabled: true
service:
port: 2181
fourlwCommandsWhitelist: "srvr,ruok,wchs,cons" fourlwCommandsWhitelist: "srvr,ruok,wchs,cons"
persistence: persistence:
enabled: false enabled: false
@ -178,12 +180,14 @@ master:
MASTER_EXEC_TASK_NUM: "20" MASTER_EXEC_TASK_NUM: "20"
MASTER_DISPATCH_TASK_NUM: "3" MASTER_DISPATCH_TASK_NUM: "3"
MASTER_HOST_SELECTOR: "LowerWeight" MASTER_HOST_SELECTOR: "LowerWeight"
MASTER_HEARTBEAT_INTERVAL: "10" MASTER_HEARTBEAT_INTERVAL: "10s"
MASTER_HEARTBEAT_ERROR_THRESHOLD: "5"
MASTER_TASK_COMMIT_RETRYTIMES: "5" MASTER_TASK_COMMIT_RETRYTIMES: "5"
MASTER_TASK_COMMIT_INTERVAL: "1000" MASTER_TASK_COMMIT_INTERVAL: "1s"
MASTER_STATE_WHEEL_INTERVAL: "5s"
MASTER_MAX_CPU_LOAD_AVG: "-1" MASTER_MAX_CPU_LOAD_AVG: "-1"
MASTER_RESERVED_MEMORY: "0.3" MASTER_RESERVED_MEMORY: "0.3"
MASTER_FAILOVER_INTERVAL: 10 MASTER_FAILOVER_INTERVAL: "10m"
MASTER_KILL_YARN_JOB_WHEN_HANDLE_FAILOVER: "true" MASTER_KILL_YARN_JOB_WHEN_HANDLE_FAILOVER: "true"
worker: worker:
@ -257,7 +261,8 @@ worker:
WORKER_MAX_CPU_LOAD_AVG: "-1" WORKER_MAX_CPU_LOAD_AVG: "-1"
WORKER_RESERVED_MEMORY: "0.3" WORKER_RESERVED_MEMORY: "0.3"
WORKER_EXEC_THREADS: "100" WORKER_EXEC_THREADS: "100"
WORKER_HEARTBEAT_INTERVAL: "10" WORKER_HEARTBEAT_INTERVAL: "10s"
WORKER_HEART_ERROR_THRESHOLD: "5"
WORKER_HOST_WEIGHT: "100" WORKER_HOST_WEIGHT: "100"
WORKER_GROUPS: "default" WORKER_GROUPS: "default"

File diff suppressed because it is too large Load Diff

View File

@ -57,17 +57,7 @@ export default {
key: 'docsHistory', key: 'docsHistory',
text: 'Older Versions', text: 'Older Versions',
link: '/en-us/docs/release/history-versions.html', link: '/en-us/docs/release/history-versions.html',
}, }
{
key: 'pythonAPI',
text: 'PyDolphinScheduler',
link: '/python/index.html',
},
{
key: 'docsdev',
text: 'dev',
link: '/en-us/docs/dev/user_doc/about/introduction.html',
},
], ],
}, },
{ {
@ -79,15 +69,10 @@ export default {
text: 'BLOG', text: 'BLOG',
link: '/en-us/blog/index.html', link: '/en-us/blog/index.html',
}, },
{
key: 'development',
text: 'DEVELOPMENT',
link: '/en-us/development/development-environment-setup.html',
},
{ {
key: 'community', key: 'community',
text: 'COMMUNITY', text: 'COMMUNITY',
link: '/en-us/community/team.html', link: '/en-us/community/community.html',
}, },
{ {
key: 'ASF', key: 'ASF',
@ -139,48 +124,6 @@ export default {
link: '/en-us/user/index.html', link: '/en-us/user/index.html',
}, },
], ],
documentation: {
title: 'Documentation',
list: [
{
text: 'Overview',
link: '/en-us/development/architecture-design.html',
},
{
text: 'Quick start',
link: '/en-us/docs/latest/user_doc/guide/quick-start.html',
},
{
text: 'Developer guide',
link: '/en-us/development/development-environment-setup.html',
},
],
},
asf: {
title: 'ASF',
list: [
{
text: 'Foundation',
link: 'http://www.apache.org',
},
{
text: 'License',
link: 'http://www.apache.org/licenses/',
},
{
text: 'Events',
link: 'http://www.apache.org/events/current-event',
},
{
text: 'Sponsorship',
link: 'http://www.apache.org/foundation/sponsorship.html',
},
{
text: 'Thanks',
link: 'http://www.apache.org/foundation/thanks.html',
},
],
},
contact: { contact: {
title: 'About us', title: 'About us',
content: 'Do you need feedback? Please contact us through the following ways.', content: 'Do you need feedback? Please contact us through the following ways.',
@ -243,17 +186,7 @@ export default {
key: 'docsHistory', key: 'docsHistory',
text: '历史版本', text: '历史版本',
link: '/zh-cn/docs/release/history-versions.html', link: '/zh-cn/docs/release/history-versions.html',
}, }
{
key: 'pythonAPI',
text: 'PyDolphinScheduler',
link: '/python/index.html',
},
{
key: 'docsdev',
text: 'dev',
link: '/zh-cn/docs/dev/user_doc/about/introduction.html',
},
], ],
}, },
{ {
@ -266,15 +199,10 @@ export default {
text: '博客', text: '博客',
link: '/zh-cn/blog/index.html', link: '/zh-cn/blog/index.html',
}, },
{
key: 'development',
text: '开发者',
link: '/zh-cn/development/development-environment-setup.html',
},
{ {
key: 'community', key: 'community',
text: '社区', text: '社区',
link: '/zh-cn/community/team.html', link: '/zh-cn/community/community.html',
}, },
{ {
key: 'ASF', key: 'ASF',
@ -327,48 +255,6 @@ export default {
link: '/zh-cn/user/index.html', link: '/zh-cn/user/index.html',
}, },
], ],
documentation: {
title: '文档',
list: [
{
text: '概览',
link: '/zh-cn/development/architecture-design.html',
},
{
text: '快速开始',
link: '/zh-cn/docs/latest/user_doc/guide/quick-start.html',
},
{
text: '开发者指南',
link: '/zh-cn/development/development-environment-setup.html',
},
],
},
asf: {
title: 'ASF',
list: [
{
text: '基金会',
link: 'http://www.apache.org',
},
{
text: '证书',
link: 'http://www.apache.org/licenses/',
},
{
text: '事件',
link: 'http://www.apache.org/events/current-event',
},
{
text: '赞助',
link: 'http://www.apache.org/foundation/sponsorship.html',
},
{
text: '致谢',
link: 'http://www.apache.org/foundation/thanks.html',
},
],
},
contact: { contact: {
title: '联系我们', title: '联系我们',
content: '有问题需要反馈请通过以下方式联系我们', content: '有问题需要反馈请通过以下方式联系我们',

85
docs/docs/en/DSIP.md Normal file
View File

@ -0,0 +1,85 @@
# DSIP
DolphinScheduler Improvement Proposal (DSIP) 是对 Apache DolphinScheduler 代码库进行的重大改进。它不是为了小修小补存在的,
DSIP 的目的是通知社区完成或即将完成的重大变更。
## 怎样的修改应该被认定为 DSIP
- 任何重大的新功能、重大改进、引入或删除组件
- 任何公共接口的任何重大变化,例如 API接口、web ui 巨大变化
当一个 PR 或者 Issue 是否应该被认定为 DSIP 存疑时,如果有 committer 认为他应该纳入 DAIP 的范畴,那它就应该是 DSIP。
我们使用 GitHub Issue 和 Apache 邮件列表来记录和保存 DSIP想要了解更多相关信息您可以跳转到 当前的 DSIPs 以及 past DSIPs
作为 DSIP它应该包含如下部分
- 在 [dev@dolphinscheduler.apache.org][mail-to-dev] 中有一个以 `[DISCUSS][DSIP` 为开头的邮件。
- 有一个打了 "DSIP" 标签的 GitHub Issue并在描述中包含邮链接。
### 当前的 DSIPs
当前的 DSIP 包括所有仍在进行中的 DSIP您可以在 [当前的 DSIPs][current-DSIPs] 中找到他们
### 完结的 DSIPs
完结的 DSIP包括所有已完成或因某种原因终止的 DSIP您可以在 [完结的 DSIPs][past-DSIPs] 中找到他们
## DSIP 的步骤
### 创建 GitHub Issue
所有 DSIP 都应该起源于 GitHub Issue
- 如果您确定你的问题是 DSIP你可以在 [GitHub Issue][github-issue-choose] 中点击并选择 "DSIP"
- 如果您不确定您的问题是否是 DSIP您可以在 [GitHub Issue][github-issue-choose] 单击并选择 "Feature request"。当DolphinScheduler
维护团队在查看 Issue 时认为他是 DSIP 时,会为 Issue 增加标签 "DSIP"。
You should and special prefix `[DSIP-XXX]`, `XXX` stand for the id DSIP. It's auto increment, and you could find the next
integer in [All DSIPs][all-DSIPs] issues.
在您的问题被标记成 DSIP 后,您应该特殊前缀 `[DSIP-XXX]`,其中`XXX` 代表 id DSIP。它是自动递增的你可以在 [All DSIPs][all-DSIPs]
找到下一个 DSIP 的整数编号。
### 发送讨论邮件
在您的问题被标记为 "DSIP" 后,您应该发送电子邮件至 [dev@dolphinscheduler.apache.org][mail-to-dev] 描述提案的目的,以及设计草案。
下面是邮件的模板
- 标题: `[DISCUSS][DSIP-XXX] <CHANGE-TO-YOUR-LOVELY-PROPOSAL-TITLE>`, 将 `XXX` 修改为 to special integer you just change in
GitHub Issue, and also change proposal title.
- 内容:
```text
Hi community,
<CHANGE-TO-YOUR-PROPOSAL-DETAIL>
I already add a GitHub Issue for my proposal, which you could see in <CHANGE-TO-YOUR-GITHUB-ISSUE-LINK>.
Looking forward any feedback for this thread.
```
在社区讨论并且所有人都认为它值得作为 DSIP 之后,您可以去到下节正式开始工作。但是如果社区认为它不应该是 DSIP维护者需要终止邮件讨论并
删除 GitHub Issue 中的 "DSIP" 标签。如果当这个修改不应该合并到 DolphinScheduler 中时,维护者除了除了移除标签外,还要关闭 GitHub Issue。
### 开始开发或者为他创建子任务
当您的提案通过邮件讨论时,您可以开始工作。你可以提交一个相关的 pull requests 如果更改应该在一次提交中进行。如果提案太大,已经超过了单次
提交的范畴,你可以在 GitHub Issue 中创建子任务,如 [DSIP-1][DSIP-1],并分成多个 pull requests 提交任务。
### 关闭 DSIP
当 DSIP 完成并合并所有相关 PR 后,您应该回复您在第二步创建的邮件讨论,通知社区 DSIP 的结果。在这之后,这个 DSIP GitHub Issue 将会被
关闭,并从 [当前的 DSIPs][current-DSIPs] 转移到 [完结的 DSIPs][past-DSIPs],但您仍然可以在 [All DSIPs][all-DSIPs] 中找到它
## DSIP的例子
* [[DSIP-1][Feature][Parent] Add Python API for DolphinScheduler][DSIP-1]: 有多个子任务和项目。
[all-DSIPs]: https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue+label%3A%22DSIP%22+
[current-DSIPs]: https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue+is%3Aopen+label%3A%22DSIP%22
[past-DSIPs]: https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue+is%3Aclosed+label%3A%22DSIP%22+
[github-issue-choose]: https://github.com/apache/dolphinscheduler/issues/new/choose
[mail-to-dev]: mailto:dev@dolphinscheduler.apache.org
[DSIP-1]: https://github.com/apache/dolphinscheduler/issues/6407

View File

@ -0,0 +1,19 @@
# Features
## Simple to Use
- **Visual DAG**: User-friendly drag-and-drop workflow definition and facility for run-time control.
- **Modular Operation**: Modularity facilitates easy customization and maintenance.
## Rich Scenarios
- **Multiple Task Type Support**: Supports more than 10 task types, like Shell, MR, Spark, SQL, etc., with cross-language support making it easy to extend
- **Workflow Ops**: Workflow can be timed, paused, resumed and stopped, enabling easy maintenance and control of global and local parameters.
## High Reliability
- **Reliability**: Decentralized designs ensure stability. Self-supporting HA task queue to avoid overload fault tolerant capability. DolphinScheduler facilitates a highly robust environment.
## High Scalability
- **Scalability**: Supports multitenancy and online resource management. Stable operation of 100,000 data tasks per day is supported.

View File

@ -9,12 +9,7 @@ scheduling system
form of a directed acyclic graph, and topological traversal is performed from nodes with zero degrees of entry until form of a directed acyclic graph, and topological traversal is performed from nodes with zero degrees of entry until
there are no subsequent nodes. Examples are as follows: there are no subsequent nodes. Examples are as follows:
<p align="center"> ![about-glossary](../../../img/new_ui/dev/about/glossary.png)
<img src="/img/dag_examples_cn.jpg" alt="dag example" width="60%" />
<p align="center">
<em>dag example</em>
</p>
</p>
**Process definition**: Visualization formed by dragging task nodes and establishing task node associations**DAG** **Process definition**: Visualization formed by dragging task nodes and establishing task node associations**DAG**

View File

@ -1,22 +1,24 @@
# Hardware Environment # Hardware Environment
DolphinScheduler, as an open-source distributed workflow task scheduling system, can deploy and run smoothly in Intel architecture server environments and mainstream virtualization environments and supports mainstream Linux operating system environments. This section briefs about the hardware requirements for DolphinScheduler. DolphinScheduler works as an open-source distributed workflow task scheduling system. It can deploy and run smoothly in Intel architecture server environments and mainstream virtualization environments. It also supports mainstream Linux operating system environments and ARM architecture.
## Linux Operating System Version Requirements ## Linux Operating System Version Requirements
| OS | Version | The Linux operating systems specified below can run on physical servers and mainstream virtualization environments such as VMware, KVM, and XEN.
| Operating System | Version |
| :----------------------- | :----------: | | :----------------------- | :----------: |
| Red Hat Enterprise Linux | 7.0 and above | | Red Hat Enterprise Linux | 7.0 and above |
| CentOS | 7.0 and above | | CentOS | 7.0 and above |
| Oracle Enterprise Linux | 7.0 and above | | Oracle Enterprise Linux | 7.0 and above |
| Ubuntu LTS | 16.04 and above | | Ubuntu LTS | 16.04 and above |
> **Attention:** > **Note:**
>The above Linux operating systems can run on physical servers and mainstream virtualization environments such as VMware, KVM, and XEN. >The above Linux operating systems can run on physical servers and mainstream virtualization environments such as VMware, KVM, and XEN.
## Recommended Server Configuration ## Server Configuration
DolphinScheduler supports 64-bit hardware platforms with Intel x86-64 architecture. The following shows the recommended server requirements in a production environment: DolphinScheduler supports 64-bit hardware platforms with Intel x86-64 architecture. The following table shows the recommended server requirements in a production environment:
### Production Environment ### Production Environment
@ -24,11 +26,10 @@ DolphinScheduler supports 64-bit hardware platforms with Intel x86-64 architectu
| --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- |
| 4 core+ | 8 GB+ | SAS | GbE | 1+ | | 4 core+ | 8 GB+ | SAS | GbE | 1+ |
> **Attention:** > **Note:**
> - The above recommended configuration is the minimum configuration for deploying DolphinScheduler. Higher configuration is strongly recommended for production environments. > - The above recommended configuration is the minimum configuration for deploying DolphinScheduler. Higher configuration is strongly recommended for production environments.
> - The recommended hard disk size is more than 50GB and separate the system disk and data disk. > - The recommended hard disk size is more than 50GB and separate the system disk and data disk.
## Network Requirements ## Network Requirements
DolphinScheduler provides the following network port configurations for normal operation: DolphinScheduler provides the following network port configurations for normal operation:
@ -39,10 +40,10 @@ DolphinScheduler provides the following network port configurations for normal o
| WorkerServer | 1234 | not the communication port, require the native ports do not conflict | | WorkerServer | 1234 | not the communication port, require the native ports do not conflict |
| ApiApplicationServer | 12345 | backend communication port | | ApiApplicationServer | 12345 | backend communication port |
> **Attention:** > **Note:**
> - MasterServer and WorkerServer do not need to enable communication between the networks. As long as the local ports do not conflict. > - MasterServer and WorkerServer do not need to enable communication between the networks. As long as the local ports do not conflict.
> - Administrators can adjust relevant ports on the network side and host-side according to the deployment plan of DolphinScheduler components in the actual environment. > - Administrators can adjust relevant ports on the network side and host-side according to the deployment plan of DolphinScheduler components in the actual environment.
## Browser Requirements ## Browser Requirements
DolphinScheduler recommends Chrome and the latest browsers which use Chrome Kernel to access the front-end UI page. The minimum supported version of Google Chrome is version 85, but version 90 or above is recommended.

View File

@ -1,19 +1,7 @@
# About DolphinScheduler # About DolphinScheduler
Apache DolphinScheduler is a distributed, easy to extend visual DAG workflow task scheduling open-source system. Solves the intricate dependencies of data R&D ETL and the inability to monitor the health status of tasks. DolphinScheduler assembles tasks in the DAG streaming way, which can monitor the execution status of tasks in time, and supports operations like retry, recovery failure from specified nodes, pause, resume and kill tasks, etc. Apache DolphinScheduler provides a distributed and easy to expand visual workflow task scheduling open-source platform. It is suitable for enterprise-level scenarios. It provides a solution to visualize operation tasks, workflows, and the entire data processing procedures.
## Simple to Use Apache DolphinScheduler aims to solve complex big data task dependencies and to trigger relationships in data OPS orchestration for various big data applications. Solves the intricate dependencies of data R&D ETL and the inability to monitor the health status of tasks. DolphinScheduler assembles tasks in the Directed Acyclic Graph (DAG) streaming mode, which can monitor the execution status of tasks in time, and supports operations like retry, recovery failure from specified nodes, pause, resume, and kill tasks, etc.
- DolphinScheduler has DAG monitoring user interfaces, users can customize DAG by dragging and dropping. All process definitions are visualized, supports rich third-party systems APIs and one-click deployment. ![Apache DolphinScheduler](../../../img/introduction_ui.png)
## High Reliability
- Decentralized multi-masters and multi-workers, support HA, select queues to avoid overload.
## Rich Scenarios
- Support features like multi-tenants, suspend and resume operations to cope with big data scenarios. Support many task types like Spark, Flink, Hive, MR, shell, python, sub_process.
## High Scalability
- Supports customized task types, distributed scheduling, and the overall scheduling capability increases linearly with the scale of the cluster.

View File

@ -4,80 +4,105 @@
## Preface ## Preface
This document explains the DolphinScheduler application configurations according to DolphinScheduler-1.3.x versions. This document explains the DolphinScheduler application configurations.
## Directory Structure ## Directory Structure
Currently, all the configuration files are under [conf ] directory. The directory structure of DolphinScheduler is as follows:
Check the following simplified DolphinScheduler installation directories to have a direct view about the position of [conf] directory and configuration files it has.
This document only describes DolphinScheduler configurations and other topics are not going into.
[Note: the DolphinScheduler (hereinafter called the DS) .]
``` ```
├─bin DS application commands directory ├── LICENSE
│ ├─dolphinscheduler-daemon.sh startup or shutdown DS application
│ ├─start-all.sh startup all DS services with configurations ├── NOTICE
│ ├─stop-all.sh shutdown all DS services with configurations
├─conf configurations directory ├── licenses directory of licenses
│ ├─application-api.properties API-service config properties
│ ├─datasource.properties datasource config properties ├── bin directory of DolphinScheduler application commands, configrations scripts
│ ├─zookeeper.properties ZooKeeper config properties │   ├── dolphinscheduler-daemon.sh script to start or shut down DolphinScheduler application
│ ├─master.properties master-service config properties │   ├── env directory of scripts to load environment variables
│ ├─worker.properties worker-service config properties │   │   ├── dolphinscheduler_env.sh script to export environment variables [eg: JAVA_HOME,HADOOP_HOME, HIVE_HOME ...] when you start or stop service using script `dolphinscheduler-daemon.sh`
│ ├─quartz.properties quartz config properties │   │   └── install_env.sh script to export environment variables for DolphinScheduler installation when you use scripts `install.sh` `start-all.sh` `stop-all.sh` `status-all.sh`
│ ├─common.properties common-service [storage] config properties │   ├── install.sh script to auto-setup services when you deploy DolphinScheduler in `psuedo-cluster` mode or `cluster` mode
│ ├─alert.properties alert-service config properties │   ├── remove-zk-node.sh script to cleanup ZooKeeper caches
│ ├─config environment variables config directory │   ├── scp-hosts.sh script to copy installation files to target hosts
│ ├─install_config.conf DS environment variables configuration script [install or start DS] │   ├── start-all.sh script to start all services when you deploy DolphinScheduler in `psuedo-cluster` mode or `cluster` mode
│ ├─env load environment variables configs script directory │   ├── status-all.sh script to check the status of all services when you deploy DolphinScheduler in `psuedo-cluster` mode or `cluster` mode
│ ├─dolphinscheduler_env.sh load environment variables configs [eg: JAVA_HOME,HADOOP_HOME, HIVE_HOME ...] │   └── stop-all.sh script to shut down all services when you deploy DolphinScheduler in `psuedo-cluster` mode or `cluster` mode
│ ├─org mybatis mapper files directory
│ ├─i18n i18n configs directory ├── alert-server directory of DolphinScheduler alert-server commands, configrations scripts and libs
│ ├─logback-api.xml API-service log config │   ├── bin
│ ├─logback-master.xml master-service log config │   │   └── start.sh script to start DolphinScheduler alert-server
│ ├─logback-worker.xml worker-service log config │   ├── conf
│ ├─logback-alert.xml alert-service log config │   │   ├── application.yaml configurations of alert-server
├─sql .sql files to create or upgrade DS metadata │   │   ├── common.properties configurations of common-service like storage, credentials, etc.
│ ├─create create SQL scripts directory │   │   ├── dolphinscheduler_env.sh script to load environment variables for alert-server
│ ├─upgrade upgrade SQL scripts directory │   │   └── logback-spring.xml configurations of alert-service log
│ ├─dolphinscheduler_postgre.sql PostgreSQL database init script │   └── libs directory of alert-server libs
│ ├─dolphinscheduler_mysql.sql MySQL database init script
│ ├─soft_version current DS version-id file ├── api-server directory of DolphinScheduler api-server commands, configrations scripts and libs
├─script DS services deployment, database create or upgrade scripts directory │   ├── bin
│ ├─create-dolphinscheduler.sh DS database init script │   │   └── start.sh script to start DolphinScheduler api-server
│ ├─upgrade-dolphinscheduler.sh DS database upgrade script │   ├── conf
│ ├─monitor-server.sh DS monitor-server start script │   │   ├── application.yaml configurations of api-server
│ ├─scp-hosts.sh transfer installation files script │   │   ├── common.properties configurations of common-service like storage, credentials, etc.
│ ├─remove-zk-node.sh cleanup ZooKeeper caches script │   │   ├── dolphinscheduler_env.sh script to load environment variables for api-server
├─ui front-end web resources directory │   │   └── logback-spring.xml configurations of api-service log
├─lib DS .jar dependencies directory │   ├── libs directory of api-server libs
├─install.sh auto-setup DS services script │   └── ui directory of api-server related front-end web resources
├── master-server directory of DolphinScheduler master-server commands, configrations scripts and libs
│   ├── bin
│   │   └── start.sh script to start DolphinScheduler master-server
│   ├── conf
│   │   ├── application.yaml configurations of master-server
│   │   ├── common.properties configurations of common-service like storage, credentials, etc.
│   │   ├── dolphinscheduler_env.sh script to load environment variables for master-server
│   │   └── logback-spring.xml configurations of master-service log
│   └── libs directory of master-server libs
├── standalone-server directory of DolphinScheduler standalone-server commands, configrations scripts and libs
│   ├── bin
│   │   └── start.sh script to start DolphinScheduler standalone-server
│   ├── conf
│   │   ├── application.yaml configurations of standalone-server
│   │   ├── common.properties configurations of common-service like storage, credentials, etc.
│   │   ├── dolphinscheduler_env.sh script to load environment variables for standalone-server
│   │   ├── logback-spring.xml configurations of standalone-service log
│   │   └── sql .sql files to create or upgrade DolphinScheduler metadata
│   ├── libs directory of standalone-server libs
│   └── ui directory of standalone-server related front-end web resources
│  
├── tools directory of DolphinScheduler metadata tools commands, configrations scripts and libs
│   ├── bin
│   │   └── upgrade-schema.sh script to initialize or upgrade DolphinScheduler metadata
│   ├── conf
│   │   ├── application.yaml configurations of tools
│   │   └── common.properties configurations of common-service like storage, credentials, etc.
│   ├── libs directory of tool libs
│   └── sql .sql files to create or upgrade DolphinScheduler metadata
│  
├── worker-server directory of DolphinScheduler worker-server commands, configrations scripts and libs
│ ├── bin
│ │   └── start.sh script to start DolphinScheduler worker-server
│ ├── conf
│ │   ├── application.yaml configurations of worker-server
│ │   ├── common.properties configurations of common-service like storage, credentials, etc.
│ │   ├── dolphinscheduler_env.sh script to load environment variables for worker-server
│ │   └── logback-spring.xml configurations of worker-service log
│ └── libs directory of worker-server libs
└── ui directory of front-end web resources
``` ```
## Configurations in Details ## Configurations in Details
serial number| service classification| config file|
|--|--|--|
1|startup or shutdown DS application|dolphinscheduler-daemon.sh
2|datasource config properties|datasource.properties
3|ZooKeeper config properties|zookeeper.properties
4|common-service[storage] config properties|common.properties
5|API-service config properties|application-api.properties
6|master-service config properties|master.properties
7|worker-service config properties|worker.properties
8|alert-service config properties|alert.properties
9|quartz config properties|quartz.properties
10|DS environment variables configuration script[install/start DS]|install_config.conf
11|load environment variables configs <br /> [eg: JAVA_HOME,HADOOP_HOME, HIVE_HOME ...]|dolphinscheduler_env.sh
12|services log config files|API-service log config : logback-api.xml <br /> master-service log config : logback-master.xml <br /> worker-service log config : logback-worker.xml <br /> alert-service log config : logback-alert.xml
### dolphinscheduler-daemon.sh [startup or shutdown DS application] ### dolphinscheduler-daemon.sh [startup or shutdown DolphinScheduler application]
dolphinscheduler-daemon.sh is responsible for DS startup and shutdown. dolphinscheduler-daemon.sh is responsible for DolphinScheduler startup and shutdown.
Essentially, start-all.sh or stop-all.sh startup and shutdown the cluster via dolphinscheduler-daemon.sh. Essentially, start-all.sh or stop-all.sh startup and shutdown the cluster via dolphinscheduler-daemon.sh.
Currently, DS just makes a basic config, remember to config further JVM options based on your practical situation of resources. Currently, DolphinScheduler just makes a basic config, remember to config further JVM options based on your practical situation of resources.
Default simplified parameters are: Default simplified parameters are:
```bash ```bash
@ -94,306 +119,211 @@ export DOLPHINSCHEDULER_OPTS="
" "
``` ```
> "-XX:DisableExplicitGC" is not recommended due to may lead to memory link (DS dependent on Netty to communicate). > "-XX:DisableExplicitGC" is not recommended due to may lead to memory link (DolphinScheduler dependent on Netty to communicate).
### datasource.properties [datasource config properties] ### Database connection related configuration
DS uses Druid to manage database connections and default simplified configs are: DolphinScheduler uses Spring Hikari to manage database connections, configuration file location:
|Parameters | Default value| Description|
|--|--|--|
spring.datasource.driver-class-name||datasource driver
spring.datasource.url||datasource connection url
spring.datasource.username||datasource username
spring.datasource.password||datasource password
spring.datasource.initialSize|5| initial connection pool size number
spring.datasource.minIdle|5| minimum connection pool size number
spring.datasource.maxActive|5| maximum connection pool size number
spring.datasource.maxWait|60000| max wait milliseconds
spring.datasource.timeBetweenEvictionRunsMillis|60000| idle connection check interval
spring.datasource.timeBetweenConnectErrorMillis|60000| retry interval
spring.datasource.minEvictableIdleTimeMillis|300000| connections over minEvictableIdleTimeMillis will be collect when idle check
spring.datasource.validationQuery|SELECT 1| validate connection by running the SQL
spring.datasource.validationQueryTimeout|3| validate connection timeout[seconds]
spring.datasource.testWhileIdle|true| set whether the pool validates the allocated connection when a new connection request comes
spring.datasource.testOnBorrow|true| validity check when the program requests a new connection
spring.datasource.testOnReturn|false| validity check when the program recalls a connection
spring.datasource.defaultAutoCommit|true| whether auto commit
spring.datasource.keepAlive|true| runs validationQuery SQL to avoid the connection closed by pool when the connection idles over minEvictableIdleTimeMillis
spring.datasource.poolPreparedStatements|true| open PSCache
spring.datasource.maxPoolPreparedStatementPerConnectionSize|20| specify the size of PSCache on each connection
|Service| Configuration file |
|--|--|
|Master Server | `master-server/conf/application.yaml`|
|Api Server| `api-server/conf/application.yaml`|
|Worker Server| `worker-server/conf/application.yaml`|
|Alert Server| `alert-server/conf/application.yaml`|
### zookeeper.properties [zookeeper config properties] The default configuration is as follows:
|Parameters | Default value| Description| |Parameters | Default value| Description|
|--|--|--| |--|--|--|
zookeeper.quorum|localhost:2181| ZooKeeper cluster connection info |spring.datasource.driver-class-name| org.postgresql.Driver |datasource driver|
zookeeper.dolphinscheduler.root|/dolphinscheduler| DS is stored under ZooKeeper root directory |spring.datasource.url| jdbc:postgresql://127.0.0.1:5432/dolphinscheduler |datasource connection url|
zookeeper.session.timeout|60000| session timeout |spring.datasource.username|root|datasource username|
zookeeper.connection.timeout|30000| connection timeout |spring.datasource.password|root|datasource password|
zookeeper.retry.base.sleep|100| time to wait between subsequent retries |spring.datasource.hikari.connection-test-query|select 1|validate connection by running the SQL|
zookeeper.retry.max.sleep|30000| maximum time to wait between subsequent retries |spring.datasource.hikari.minimum-idle| 5| minimum connection pool size number|
zookeeper.retry.maxtime|10| maximum retry times |spring.datasource.hikari.auto-commit|true|whether auto commit|
|spring.datasource.hikari.pool-name|DolphinScheduler|name of the connection pool|
|spring.datasource.hikari.maximum-pool-size|50| maximum connection pool size number|
|spring.datasource.hikari.connection-timeout|30000|connection timeout|
|spring.datasource.hikari.idle-timeout|600000|Maximum idle connection survival time|
|spring.datasource.hikari.leak-detection-threshold|0|Connection leak detection threshold|
|spring.datasource.hikari.initialization-fail-timeout|1|Connection pool initialization failed timeout|
Note that DolphinScheduler also supports database configuration through `bin/env/dolphinscheduler_env.sh`.
### Zookeeper related configuration
DolphinScheduler uses Zookeeper for cluster management, fault tolerance, event monitoring and other functions. Configuration file location:
|Service| Configuration file |
|--|--|
|Master Server | `master-server/conf/application.yaml`|
|Api Server| `api-server/conf/application.yaml`|
|Worker Server| `worker-server/conf/application.yaml`|
The default configuration is as follows:
|Parameters | Default value| Description|
|--|--|--|
|registry.zookeeper.namespace|dolphinscheduler|namespace of zookeeper|
|registry.zookeeper.connect-string|localhost:2181| the connection string of zookeeper|
|registry.zookeeper.retry-policy.base-sleep-time|60ms|time to wait between subsequent retries|
|registry.zookeeper.retry-policy.max-sleep|300ms|maximum time to wait between subsequent retries|
|registry.zookeeper.retry-policy.max-retries|5|maximum retry times|
|registry.zookeeper.session-timeout|30s|session timeout|
|registry.zookeeper.connection-timeout|30s|connection timeout|
|registry.zookeeper.block-until-connected|600ms|waiting time to block until the connection succeeds|
|registry.zookeeper.digest|~|digest of zookeeper|
Note that DolphinScheduler also supports zookeeper related configuration through `bin/env/dolphinscheduler_env.sh`.
### common.properties [hadoop、s3、yarn config properties] ### common.properties [hadoop、s3、yarn config properties]
Currently, common.properties mainly configures Hadoop,s3a related configurations. Currently, common.properties mainly configures Hadoop,s3a related configurations. Configuration file location:
|Parameters | Default value| Description|
|Service| Configuration file |
|--|--|
|Master Server | `master-server/conf/common.properties`|
|Api Server| `api-server/conf/common.properties`|
|Worker Server| `worker-server/conf/common.properties`|
|Alert Server| `alert-server/conf/common.properties`|
The default configuration is as follows:
| Parameters | Default value | Description |
|--|--|--| |--|--|--|
data.basedir.path|/tmp/dolphinscheduler| local directory used to store temp files |data.basedir.path | /tmp/dolphinscheduler | local directory used to store temp files|
resource.storage.type|NONE| type of resource files: HDFS, S3, NONE |resource.storage.type | NONE | type of resource files: HDFS, S3, NONE|
resource.upload.path|/dolphinscheduler| storage path of resource files |resource.upload.path | /dolphinscheduler | storage path of resource files|
hadoop.security.authentication.startup.state|false| whether hadoop grant kerberos permission |aws.access.key.id | minioadmin | access key id of S3|
java.security.krb5.conf.path|/opt/krb5.conf|kerberos config directory |aws.secret.access.key | minioadmin | secret access key of S3|
login.user.keytab.username|hdfs-mycluster@ESZ.COM|kerberos username |aws.region | us-east-1 | region of S3|
login.user.keytab.path|/opt/hdfs.headless.keytab|kerberos user keytab |aws.s3.endpoint | http://minio:9000 | endpoint of S3|
kerberos.expire.time|2|kerberos expire time,integer,the unit is hour |hdfs.root.user | hdfs | configure users with corresponding permissions if storage type is HDFS|
resource.view.suffixs| txt,log,sh,conf,cfg,py,java,sql,hql,xml,properties| file types supported by resource center |fs.defaultFS | hdfs://mycluster:8020 | If resource.storage.type=S3, then the request url would be similar to 's3a://dolphinscheduler'. Otherwise if resource.storage.type=HDFS and hadoop supports HA, copy core-site.xml and hdfs-site.xml into 'conf' directory|
hdfs.root.user|hdfs| configure users with corresponding permissions if storage type is HDFS |hadoop.security.authentication.startup.state | false | whether hadoop grant kerberos permission|
fs.defaultFS|hdfs://mycluster:8020|If resource.storage.type=S3, then the request url would be similar to 's3a://dolphinscheduler'. Otherwise if resource.storage.type=HDFS and hadoop supports HA, copy core-site.xml and hdfs-site.xml into 'conf' directory |java.security.krb5.conf.path | /opt/krb5.conf | kerberos config directory|
fs.s3a.endpoint||s3 endpoint url |login.user.keytab.username | hdfs-mycluster@ESZ.COM | kerberos username|
fs.s3a.access.key||s3 access key |login.user.keytab.path | /opt/hdfs.headless.keytab | kerberos user keytab|
fs.s3a.secret.key||s3 secret key |kerberos.expire.time | 2 | kerberos expire time,integer,the unit is hour|
yarn.resourcemanager.ha.rm.ids||specify the yarn resourcemanager url. if resourcemanager supports HA, input HA IP addresses (separated by comma), or input null for standalone |yarn.resourcemanager.ha.rm.ids | 192.168.xx.xx,192.168.xx.xx | specify the yarn resourcemanager url. if resourcemanager supports HA, input HA IP addresses (separated by comma), or input null for standalone|
yarn.application.status.address|http://ds1:8088/ws/v1/cluster/apps/%s|keep default if ResourceManager supports HA or not use ResourceManager, or replace ds1 with corresponding hostname if ResourceManager in standalone mode |yarn.application.status.address | http://ds1:8088/ws/v1/cluster/apps/%s | keep default if ResourceManager supports HA or not use ResourceManager, or replace ds1 with corresponding hostname if ResourceManager in standalone mode|
dolphinscheduler.env.path|env/dolphinscheduler_env.sh|load environment variables configs [eg: JAVA_HOME,HADOOP_HOME, HIVE_HOME ...] |development.state | false | specify whether in development state|
development.state|false| specify whether in development state |resource.manager.httpaddress.port | 8088 | the port of resource manager|
|yarn.job.history.status.address | http://ds1:19888/ws/v1/history/mapreduce/jobs/%s | job history status url of yarn|
|datasource.encryption.enable | false | whether to enable datasource encryption|
|datasource.encryption.salt | !@#$%^&* | the salt of the datasource encryption|
|data-quality.jar.name | dolphinscheduler-data-quality-dev-SNAPSHOT.jar | the jar of data quality|
|support.hive.oneSession | false | specify whether hive SQL is executed in the same session|
|sudo.enable | true | whether to enable sudo|
|alert.rpc.port | 50052 | the RPC port of Alert Server|
|zeppelin.rest.url | http://localhost:8080 | the RESTful API url of zeppelin|
### application-api.properties [API-service log config] ### Api-server related configuration
Location: `api-server/conf/application.yaml`
|Parameters | Default value| Description| |Parameters | Default value| Description|
|--|--|--| |--|--|--|
server.port|12345|api service communication port |server.port|12345|api service communication port|
server.servlet.session.timeout|7200|session timeout |server.servlet.session.timeout|120m|session timeout|
server.servlet.context-path|/dolphinscheduler | request path |server.servlet.context-path|/dolphinscheduler/ |request path|
spring.servlet.multipart.max-file-size|1024MB| maximum file size |spring.servlet.multipart.max-file-size|1024MB|maximum file size|
spring.servlet.multipart.max-request-size|1024MB| maximum request size |spring.servlet.multipart.max-request-size|1024MB|maximum request size|
server.jetty.max-http-post-size|5000000| jetty maximum post size |server.jetty.max-http-post-size|5000000|jetty maximum post size|
spring.messages.encoding|UTF-8| message encoding |spring.banner.charset|UTF-8|message encoding|
spring.jackson.time-zone|GMT+8| time zone |spring.jackson.time-zone|UTC|time zone|
spring.messages.basename|i18n/messages| i18n config |spring.jackson.date-format|"yyyy-MM-dd HH:mm:ss"|time format|
security.authentication.type|PASSWORD| authentication type |spring.messages.basename|i18n/messages|i18n config|
|security.authentication.type|PASSWORD|authentication type|
|security.authentication.ldap.user.admin|read-only-admin|admin user account when you log-in with LDAP|
|security.authentication.ldap.urls|ldap://ldap.forumsys.com:389/|LDAP urls|
|security.authentication.ldap.base.dn|dc=example,dc=com|LDAP base dn|
|security.authentication.ldap.username|cn=read-only-admin,dc=example,dc=com|LDAP username|
|security.authentication.ldap.password|password|LDAP password|
|security.authentication.ldap.user.identity.attribute|uid|LDAP user identity attribute|
|security.authentication.ldap.user.email.attribute|mail|LDAP user email attribute|
|traffic.control.global.switch|false|traffic control global switch|
|traffic.control.max-global-qps-rate|300|global max request number per second|
|traffic.control.tenant-switch|false|traffic control tenant switch|
|traffic.control.default-tenant-qps-rate|10|default tenant max request number per second|
|traffic.control.customize-tenant-qps-rate||customize tenant max request number per second|
### Master Server related configuration
### master.properties [master-service log config] Location: `master-server/conf/application.yaml`
|Parameters | Default value| Description| |Parameters | Default value| Description|
|--|--|--| |--|--|--|
master.listen.port|5678|master listen port |master.listen-port|5678|master listen port|
master.exec.threads|100|master-service execute thread number, used to limit the number of process instances in parallel |master.fetch-command-num|10|the number of commands fetched by master|
master.exec.task.num|20|defines the number of parallel tasks for each process instance of the master-service |master.pre-exec-threads|10|master prepare execute thread number to limit handle commands in parallel|
master.dispatch.task.num|3|defines the number of dispatch tasks for each batch of the master-service |master.exec-threads|100|master execute thread number to limit process instances in parallel|
master.host.selector|LowerWeight|master host selector, to select a suitable worker to run the task, optional value: random, round-robin, lower weight |master.dispatch-task-number|3|master dispatch task number per batch|
master.heartbeat.interval|10|master heartbeat interval, the unit is second |master.host-selector|lower_weight|master host selector to select a suitable worker, default value: LowerWeight. Optional values include random, round_robin, lower_weight|
master.task.commit.retryTimes|5|master commit task retry times |master.heartbeat-interval|10|master heartbeat interval, the unit is second|
master.task.commit.interval|1000|master commit task interval, the unit is millisecond |master.task-commit-retry-times|5|master commit task retry times|
master.max.cpuload.avg|-1|master max CPU load avg, only higher than the system CPU load average, master server can schedule. default value -1: the number of CPU cores * 2 |master.task-commit-interval|1000|master commit task interval, the unit is millisecond|
master.reserved.memory|0.3|master reserved memory, only lower than system available memory, master server can schedule. default value 0.3, the unit is G |master.state-wheel-interval|5|time to check status|
|master.max-cpu-load-avg|-1|master max CPU load avg, only higher than the system CPU load average, master server can schedule. default value -1: the number of CPU cores * 2|
|master.reserved-memory|0.3|master reserved memory, only lower than system available memory, master server can schedule. default value 0.3, the unit is G|
|master.failover-interval|10|failover interval, the unit is minute|
|master.kill-yarn-job-when-task-failover|true|whether to kill yarn job when failover taskInstance|
### worker.properties [worker-service log config] ### Worker Server related configuration
Location: `worker-server/conf/application.yaml`
|Parameters | Default value| Description| |Parameters | Default value| Description|
|--|--|--| |--|--|--|
worker.listen.port|1234|worker-service listen port |worker.listen-port|1234|worker-service listen port|
worker.exec.threads|100|worker-service execute thread number, used to limit the number of task instances in parallel |worker.exec-threads|100|worker-service execute thread number, used to limit the number of task instances in parallel|
worker.heartbeat.interval|10|worker-service heartbeat interval, the unit is second |worker.heartbeat-interval|10|worker-service heartbeat interval, the unit is second|
worker.max.cpuload.avg|-1|worker max CPU load avg, only higher than the system CPU load average, worker server can be dispatched tasks. default value -1: the number of CPU cores * 2 |worker.host-weight|100|worker host weight to dispatch tasks|
worker.reserved.memory|0.3|worker reserved memory, only lower than system available memory, worker server can be dispatched tasks. default value 0.3, the unit is G |worker.tenant-auto-create|true|tenant corresponds to the user of the system, which is used by the worker to submit the job. If system does not have this user, it will be automatically created after the parameter worker.tenant.auto.create is true.|
worker.groups|default|worker groups separated by comma, e.g., 'worker.groups=default,test' <br> worker will join corresponding group according to this config when startup |worker.max-cpu-load-avg|-1|worker max CPU load avg, only higher than the system CPU load average, worker server can be dispatched tasks. default value -1: the number of CPU cores * 2|
|worker.reserved-memory|0.3|worker reserved memory, only lower than system available memory, worker server can be dispatched tasks. default value 0.3, the unit is G|
|worker.groups|default|worker groups separated by comma, e.g., 'worker.groups=default,test' <br> worker will join corresponding group according to this config when startup|
|worker.alert-listen-host|localhost|the alert listen host of worker|
|worker.alert-listen-port|50052|the alert listen port of worker|
### Alert Server related configuration
### alert.properties [alert-service log config] Location: `alert-server/conf/application.yaml`
|Parameters | Default value| Description| |Parameters | Default value| Description|
|--|--|--| |--|--|--|
alert.type|EMAIL|alter type| |server.port|50053|the port of Alert Server|
mail.protocol|SMTP|mail server protocol |alert.port|50052|the port of alert|
mail.server.host|xxx.xxx.com|mail server host
mail.server.port|25|mail server port
mail.sender|xxx@xxx.com|mail sender email
mail.user|xxx@xxx.com|mail sender email name
mail.passwd|111111|mail sender email password
mail.smtp.starttls.enable|true|specify mail whether open tls
mail.smtp.ssl.enable|false|specify mail whether open ssl
mail.smtp.ssl.trust|xxx.xxx.com|specify mail ssl trust list
xls.file.path|/tmp/xls|mail attachment temp storage directory
||following configure WeCom[optional]|
enterprise.wechat.enable|false|specify whether enable WeCom
enterprise.wechat.corp.id|xxxxxxx|WeCom corp id
enterprise.wechat.secret|xxxxxxx|WeCom secret
enterprise.wechat.agent.id|xxxxxxx|WeCom agent id
enterprise.wechat.users|xxxxxxx|WeCom users
enterprise.wechat.token.url|https://qyapi.weixin.qq.com/cgi-bin/gettoken? <br /> corpid=$corpId&corpsecret=$secret|WeCom token url
enterprise.wechat.push.url|https://qyapi.weixin.qq.com/cgi-bin/message/send? <br /> access_token=$token|WeCom push url
enterprise.wechat.user.send.msg||send message format
enterprise.wechat.team.send.msg||group message format
plugin.dir|/Users/xx/your/path/to/plugin/dir|plugin directory
### quartz.properties [quartz config properties] ### Quartz related configuration
This part describes quartz configs and configure them based on your practical situation and resources. This part describes quartz configs and configure them based on your practical situation and resources.
|Parameters | Default value| Description|
|--|--|--|
org.quartz.jobStore.driverDelegateClass | org.quartz.impl.jdbcjobstore.StdJDBCDelegate |
org.quartz.jobStore.driverDelegateClass | org.quartz.impl.jdbcjobstore.PostgreSQLDelegate |
org.quartz.scheduler.instanceName | DolphinScheduler |
org.quartz.scheduler.instanceId | AUTO |
org.quartz.scheduler.makeSchedulerThreadDaemon | true |
org.quartz.jobStore.useProperties | false |
org.quartz.threadPool.class | org.quartz.simpl.SimpleThreadPool |
org.quartz.threadPool.makeThreadsDaemons | true |
org.quartz.threadPool.threadCount | 25 |
org.quartz.threadPool.threadPriority | 5 |
org.quartz.jobStore.class | org.quartz.impl.jdbcjobstore.JobStoreTX |
org.quartz.jobStore.tablePrefix | QRTZ_ |
org.quartz.jobStore.isClustered | true |
org.quartz.jobStore.misfireThreshold | 60000 |
org.quartz.jobStore.clusterCheckinInterval | 5000 |
org.quartz.jobStore.acquireTriggersWithinLock|true |
org.quartz.jobStore.dataSource | myDs |
org.quartz.dataSource.myDs.connectionProvider.class | org.apache.dolphinscheduler.service.quartz.DruidConnectionProvider |
|Service| Configuration file |
|--|--|
|Master Server | `master-server/conf/application.yaml`|
|Api Server| `api-server/conf/application.yaml`|
### install_config.conf [DS environment variables configuration script[install or start DS]] The default configuration is as follows:
install_config.conf is a bit complicated and is mainly used in the following two places. |Parameters | Default value|
* DS Cluster Auto Installation. |--|--|
|spring.quartz.properties.org.quartz.threadPool.threadPriority | 5|
|spring.quartz.properties.org.quartz.jobStore.isClustered | true|
|spring.quartz.properties.org.quartz.jobStore.class | org.quartz.impl.jdbcjobstore.JobStoreTX|
|spring.quartz.properties.org.quartz.scheduler.instanceId | AUTO|
|spring.quartz.properties.org.quartz.jobStore.tablePrefix | QRTZ_|
|spring.quartz.properties.org.quartz.jobStore.acquireTriggersWithinLock|true|
|spring.quartz.properties.org.quartz.scheduler.instanceName | DolphinScheduler|
|spring.quartz.properties.org.quartz.threadPool.class | org.quartz.simpl.SimpleThreadPool|
|spring.quartz.properties.org.quartz.jobStore.useProperties | false|
|spring.quartz.properties.org.quartz.threadPool.makeThreadsDaemons | true|
|spring.quartz.properties.org.quartz.threadPool.threadCount | 25|
|spring.quartz.properties.org.quartz.jobStore.misfireThreshold | 60000|
|spring.quartz.properties.org.quartz.scheduler.makeSchedulerThreadDaemon | true|
|spring.quartz.properties.org.quartz.jobStore.driverDelegateClass | org.quartz.impl.jdbcjobstore.PostgreSQLDelegate|
|spring.quartz.properties.org.quartz.jobStore.clusterCheckinInterval | 5000|
> System will load configs in the install_config.conf and auto-configure files below, based on the file content when executing 'install.sh'.
> Files such as dolphinscheduler-daemon.sh, datasource.properties, zookeeper.properties, common.properties, application-api.properties, master.properties, worker.properties, alert.properties, quartz.properties, etc.
* Startup and Shutdown DS Cluster.
> The system will load masters, workers, alert-server, API-servers and other parameters inside the file to startup or shutdown DS cluster.
#### File Content
```bash
# Note: please escape the character if the file contains special characters such as `.*[]^${}\+?|()@#&`.
# eg: `[` escape to `\[`
# Database type (DS currently only supports PostgreSQL and MySQL)
dbtype="mysql"
# Database url and port
dbhost="192.168.xx.xx:3306"
# Database name
dbname="dolphinscheduler"
# Database username
username="xx"
# Database password
password="xx"
# ZooKeeper url
zkQuorum="192.168.xx.xx:2181,192.168.xx.xx:2181,192.168.xx.xx:2181"
# DS installation path, such as '/data1_1T/dolphinscheduler'
installPath="/data1_1T/dolphinscheduler"
# Deployment user
# Note: Deployment user needs 'sudo' privilege and has rights to operate HDFS.
# Root directory must be created by the same user if using HDFS, otherwise permission related issues will be raised.
deployUser="dolphinscheduler"
# Followings are alert-service configs
# Mail server host
mailServerHost="smtp.exmail.qq.com"
# Mail server port
mailServerPort="25"
# Mail sender
mailSender="xxxxxxxxxx"
# Mail user
mailUser="xxxxxxxxxx"
# Mail password
mailPassword="xxxxxxxxxx"
# Whether mail supports TLS
starttlsEnable="true"
# Whether mail supports SSL. Note: starttlsEnable and sslEnable cannot both set true.
sslEnable="false"
# Mail server host, same as mailServerHost
sslTrust="smtp.exmail.qq.com"
# Specify which resource upload function to use for resources storage, such as sql files. And supported options are HDFS, S3 and NONE. HDFS for upload to HDFS and NONE for not using this function.
resourceStorageType="NONE"
# if S3, write S3 address. HA, for example: s3a://dolphinscheduler
# Note: s3 make sure to create the root directory /dolphinscheduler
defaultFS="hdfs://mycluster:8020"
# If parameter 'resourceStorageType' is S3, following configs are needed:
s3Endpoint="http://192.168.xx.xx:9010"
s3AccessKey="xxxxxxxxxx"
s3SecretKey="xxxxxxxxxx"
# If ResourceManager supports HA, then input master and standby node IP or hostname, eg: '192.168.xx.xx,192.168.xx.xx'. Or else ResourceManager run in standalone mode, please set yarnHaIps="" and "" for not using yarn.
yarnHaIps="192.168.xx.xx,192.168.xx.xx"
# If ResourceManager runs in standalone, then set ResourceManager node ip or hostname, or else remain default.
singleYarnIp="yarnIp1"
# Storage path when using HDFS/S3
resourceUploadPath="/dolphinscheduler"
# HDFS/S3 root user
hdfsRootUser="hdfs"
# Followings are Kerberos configs
# Specify Kerberos enable or not
kerberosStartUp="false"
# Kdc krb5 config file path
krb5ConfPath="$installPath/conf/krb5.conf"
# Keytab username
keytabUserName="hdfs-mycluster@ESZ.COM"
# Username keytab path
keytabPath="$installPath/conf/hdfs.headless.keytab"
# API-service port
apiServerPort="12345"
# All hosts deploy DS
ips="ds1,ds2,ds3,ds4,ds5"
# Ssh port, default 22
sshPort="22"
# Master service hosts
masters="ds1,ds2"
# All hosts deploy worker service
# Note: Each worker needs to set a worker group name and default name is "default"
workers="ds1:default,ds2:default,ds3:default,ds4:default,ds5:default"
# Host deploy alert-service
alertServer="ds3"
# Host deploy API-service
apiServers="ds1"
```
### dolphinscheduler_env.sh [load environment variables configs] ### dolphinscheduler_env.sh [load environment variables configs]
@ -407,7 +337,6 @@ export JAVA_HOME=${JAVA_HOME:-/opt/soft/java}
# Database related configuration, set database type, username and password # Database related configuration, set database type, username and password
export DATABASE=${DATABASE:-postgresql} export DATABASE=${DATABASE:-postgresql}
export SPRING_PROFILES_ACTIVE=${DATABASE} export SPRING_PROFILES_ACTIVE=${DATABASE}
export SPRING_DATASOURCE_DRIVER_CLASS_NAME
export SPRING_DATASOURCE_URL export SPRING_DATASOURCE_URL
export SPRING_DATASOURCE_USERNAME export SPRING_DATASOURCE_USERNAME
export SPRING_DATASOURCE_PASSWORD export SPRING_DATASOURCE_PASSWORD
@ -434,11 +363,11 @@ export DATAX_HOME=${DATAX_HOME:-/opt/soft/datax}
export PATH=$HADOOP_HOME/bin:$SPARK_HOME1/bin:$SPARK_HOME2/bin:$PYTHON_HOME/bin:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_HOME/bin:$PATH export PATH=$HADOOP_HOME/bin:$SPARK_HOME1/bin:$SPARK_HOME2/bin:$PYTHON_HOME/bin:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_HOME/bin:$PATH
``` ```
### Services logback configs ### Log related configuration
Services name| logback config name | |Service| Configuration file |
--|--| |--|--|
API-service logback config |logback-api.xml| |Master Server | `master-server/conf/logback-spring.xml`|
master-service logback config|logback-master.xml | |Api Server| `api-server/conf/logback-spring.xml`|
worker-service logback config|logback-worker.xml | |Worker Server| `worker-server/conf/logback-spring.xml`|
alert-service logback config|logback-alert.xml | |Alert Server| `alert-server/conf/logback-spring.xml`|

View File

@ -5,7 +5,7 @@
### System Architecture Diagram ### System Architecture Diagram
<p align="center"> <p align="center">
<img src="/img/architecture-1.3.0.jpg" alt="System architecture diagram" width="70%" /> <img src="../../../img/architecture-1.3.0.jpg" alt="System architecture diagram" width="70%" />
<p align="center"> <p align="center">
<em>System architecture diagram</em> <em>System architecture diagram</em>
</p> </p>
@ -14,7 +14,7 @@
### Start Process Activity Diagram ### Start Process Activity Diagram
<p align="center"> <p align="center">
<img src="/img/process-start-flow-1.3.0.png" alt="Start process activity diagram" width="70%" /> <img src="../../../img/process-start-flow-1.3.0.png" alt="Start process activity diagram" width="70%" />
<p align="center"> <p align="center">
<em>Start process activity diagram</em> <em>Start process activity diagram</em>
</p> </p>
@ -30,24 +30,34 @@
#### The Service Mainly Includes: #### The Service Mainly Includes:
- **Distributed Quartz** distributed scheduling component, which is mainly responsible for the start and stop operations of schedule tasks. When Quartz starts the task, there will be a thread pool inside the Master responsible for the follow-up operation of the processing task. - **DistributedQuartz** distributed scheduling component, which is mainly responsible for the start and stop operations of scheduled tasks. When quartz start the task, there will be a thread pool inside the Master responsible for the follow-up operation of the processing task;
- **MasterSchedulerThread** is a scanning thread that regularly scans the **command** table in the database and runs different business operations according to different **command types**. - **MasterSchedulerService** is a scanning thread that regularly scans the `t_ds_command` table in the database, runs different business operations according to different **command types**;
- **MasterExecThread** is mainly responsible for DAG task segmentation, task submission monitoring, and logical processing to different command types. - **WorkflowExecuteRunnable** is mainly responsible for DAG task segmentation, task submission monitoring, and logical processing of different event types;
- **MasterTaskExecThread** is mainly responsible for the persistence to tasks. - **TaskExecuteRunnable** is mainly responsible for the processing and persistence of tasks, and generates task events and submits them to the event queue of the process instance;
- **EventExecuteService** is mainly responsible for the polling of the event queue of the process instances;
- **StateWheelExecuteThread** is mainly responsible for process instance and task timeout, task retry, task-dependent polling, and generates the corresponding process instance or task event and submits it to the event queue of the process instance;
- **FailoverExecuteThread** is mainly responsible for the logic of Master fault tolerance and Worker fault tolerance;
* **WorkerServer** * **WorkerServer**
WorkerServer also adopts a distributed and decentralized design concept. WorkerServer is mainly responsible for task execution and providing log services. WorkerServer also adopts a distributed and decentralized design concept. WorkerServer is mainly responsible for task execution and providing log services.
When the WorkerServer service starts, register a temporary node with ZooKeeper and maintain a heartbeat. When the WorkerServer service starts, register a temporary node with ZooKeeper and maintain a heartbeat.
Server provides monitoring services based on netty. WorkerServer provides monitoring services based on netty.
#### The Service Mainly Includes: #### The Service Mainly Includes:
- **Fetch TaskThread** is mainly responsible for continuously getting tasks from the **Task Queue**, and calling **TaskScheduleThread** corresponding executor according to different task types. - **WorkerManagerThread** is mainly responsible for the submission of the task queue, continuously receives tasks from the task queue, and submits them to the thread pool for processing;
- **TaskExecuteThread** is mainly responsible for the process of task execution, and the actual processing of tasks according to different task types;
- **RetryReportTaskStatusThread** is mainly responsible for regularly polling to report the task status to the Master until the Master replies to the status ack to avoid the loss of the task status;
* **ZooKeeper** * **ZooKeeper**
@ -55,18 +65,13 @@
We have also implemented queues based on Redis, but we hope DolphinScheduler depends on as few components as possible, so we finally removed the Redis implementation. We have also implemented queues based on Redis, but we hope DolphinScheduler depends on as few components as possible, so we finally removed the Redis implementation.
* **Task Queue** * **AlertServer**
Provide task queue operation, the current queue is also implement base on ZooKeeper. Due to little information stored in the queue, there is no need to worry about excessive data in the queue. In fact, we have tested the millions of data storage in queues, which has no impact on system stability and performance. Provides alarm services, and implements rich alarm methods through alarm plugins.
* **Alert**
Provide alarm related interface, the interface mainly includes **alarm** two types of alarm data storage, query and notification functions. Among them, there are **email notification** and **SNMP (not yet implemented)**.
* **API** * **API**
The API interface layer is mainly responsible for processing requests from the front-end UI layer. The service uniformly provides RESTful APIs to provide request services to external. The API interface layer is mainly responsible for processing requests from the front-end UI layer. The service uniformly provides RESTful APIs to provide request services to external.
Interfaces include workflow creation, definition, query, modification, release, logoff, manual start, stop, pause, resume, start execution from specific node, etc.
* **UI** * **UI**
@ -102,41 +107,6 @@ Problems in centralized thought design:
- In fact, truly decentralized distributed systems are rare. Instead, dynamic centralized distributed systems are constantly pouring out. Under this architecture, the managers in the cluster are dynamically selected, rather than preset, and when the cluster fails, the nodes of the cluster will automatically hold "meetings" to elect new "managers" To preside over the work. The most typical case is Etcd implemented by ZooKeeper and Go language. - In fact, truly decentralized distributed systems are rare. Instead, dynamic centralized distributed systems are constantly pouring out. Under this architecture, the managers in the cluster are dynamically selected, rather than preset, and when the cluster fails, the nodes of the cluster will automatically hold "meetings" to elect new "managers" To preside over the work. The most typical case is Etcd implemented by ZooKeeper and Go language.
- The decentralization of DolphinScheduler is that the Master and Worker register in ZooKeeper, for implement the centerless feature to Master cluster and Worker cluster. Use the ZooKeeper distributed lock to elect one of the Master or Worker as the "manager" to perform the task. - The decentralization of DolphinScheduler is that the Master and Worker register in ZooKeeper, for implement the centerless feature to Master cluster and Worker cluster. Use the ZooKeeper distributed lock to elect one of the Master or Worker as the "manager" to perform the task.
#### Distributed Lock Practice
DolphinScheduler uses ZooKeeper distributed lock to implement only one Master executes Scheduler at the same time, or only one Worker executes the submission of tasks.
1. The following shows the core process algorithm for acquiring distributed locks:
<p align="center">
<img src="https://analysys.github.io/easyscheduler_docs_cn/images/distributed_lock.png" alt="Obtain distributed lock process" width="50%" />
</p>
2. Flow diagram of implementation of Scheduler thread distributed lock in DolphinScheduler:
<p align="center">
<img src="/img/distributed_lock_procss.png" alt="Obtain distributed lock process" width="50%" />
</p>
#### Insufficient Thread Loop Waiting Problem
- If there is no sub-process in a DAG, when the number of data in the Command is greater than the threshold set by the thread pool, the process directly waits or fails.
- If a large DAG nests many sub-processes, there will produce a "dead" state as the following figure:
<p align="center">
<img src="https://analysys.github.io/easyscheduler_docs_cn/images/lack_thread.png" alt="Insufficient threads waiting loop problem" width="50%" />
</p>
In the above figure, MainFlowThread waits for the end of SubFlowThread1, SubFlowThread1 waits for the end of SubFlowThread2, SubFlowThread2 waits for the end of SubFlowThread3, and SubFlowThread3 waits for a new thread in the thread pool, then the entire DAG process cannot finish, and the threads cannot be released. In this situation, the state of the child-parent process loop waiting is formed. At this moment, unless a new Master is started and add threads to break such a "stalemate", the scheduling cluster will no longer use.
It seems a bit unsatisfactory to start a new Master to break the deadlock, so we proposed the following three solutions to reduce this risk:
1. Calculate the sum of all Master threads, and then calculate the number of threads required for each DAG, that is, pre-calculate before the DAG process executes. Because it is a multi-master thread pool, it is unlikely to obtain the total number of threads in real time.
2. Judge whether the single-master thread pool is full, let the thread fail directly when fulfilled.
3. Add a Command type with insufficient resources. If the thread pool is insufficient, suspend the main process. In this way, there are new threads in the thread pool, which can make the process suspended by insufficient resources wake up to execute again.
Note: The Master Scheduler thread executes by FIFO when acquiring the Command.
So we choose the third way to solve the problem of insufficient threads.
#### Fault-Tolerant Design #### Fault-Tolerant Design
Fault tolerance divides into service downtime fault tolerance and task retry, and service downtime fault tolerance divides into master fault tolerance and worker fault tolerance. Fault tolerance divides into service downtime fault tolerance and task retry, and service downtime fault tolerance divides into master fault tolerance and worker fault tolerance.
@ -155,7 +125,7 @@ Among them, the Master monitors the directories of other Masters and Workers. If
- Master fault tolerance - Master fault tolerance
<p align="center"> <p align="center">
<img src="/img/failover-master.jpg" alt="failover-master" width="50%" /> <img src="../../../img/failover-master.jpg" alt="failover-master" width="50%" />
</p> </p>
Fault tolerance range: From the perspective of host, the fault tolerance range of Master includes: own host and node host that does not exist in the registry, and the entire process of fault tolerance will be locked; Fault tolerance range: From the perspective of host, the fault tolerance range of Master includes: own host and node host that does not exist in the registry, and the entire process of fault tolerance will be locked;
@ -167,7 +137,7 @@ Fault-tolerant post-processing: After the fault tolerance of ZooKeeper Master co
- Worker fault tolerance - Worker fault tolerance
<p align="center"> <p align="center">
<img src="/img/failover-worker.jpg" alt="failover-worker" width="50%" /> <img src="../../../img/failover-worker.jpg" alt="failover-worker" width="50%" />
</p> </p>
Fault tolerance range: From the perspective of process instance, each Master is only responsible for fault tolerance of its own process instance; it will lock only when `handleDeadServer`; Fault tolerance range: From the perspective of process instance, each Master is only responsible for fault tolerance of its own process instance; it will lock only when `handleDeadServer`;
@ -188,11 +158,11 @@ Here we must first distinguish the concepts of task failure retry, process failu
Next to the main point, we divide the task nodes in the workflow into two types. Next to the main point, we divide the task nodes in the workflow into two types.
- One is a business node, which corresponds to an actual script or process command, such as shell node, MR node, Spark node, and dependent node. - One is a business task, which corresponds to an actual script or process command, such as Shell task, SQL task, and Spark task.
- Another is a logical node, which does not operate actual script or process command, but only logical processing to the entire process flow, such as sub-process sections. - Another is a logical task, which does not operate actual script or process command, but only logical processing to the entire process flow, such as sub-process task, dependent task.
Each **business node** can configure the number of failed retries. When the task node fails, it will automatically retry until it succeeds or exceeds the retry times. **Logical node** failure retry is not supported, but the tasks in the logical node support. **Business node** can configure the number of failed retries. When the task node fails, it will automatically retry until it succeeds or exceeds the retry times. **Logical node** failure retry is not supported.
If there is a task failure in the workflow that reaches the maximum retry times, the workflow will fail and stop, and the failed workflow can be manually re-run or process recovery operations. If there is a task failure in the workflow that reaches the maximum retry times, the workflow will fail and stop, and the failed workflow can be manually re-run or process recovery operations.
@ -225,55 +195,29 @@ In the early schedule design, if there is no priority design and use the fair sc
<img src="https://analysys.github.io/easyscheduler_docs_cn/images/grpc.png" alt="grpc remote access" width="50%" /> <img src="https://analysys.github.io/easyscheduler_docs_cn/images/grpc.png" alt="grpc remote access" width="50%" />
</p> </p>
- We use the customized FileAppender and Filter functions from Logback to implement each task instance generates one log file. - For details, please refer to the logback configuration of Master and Worker, as shown in the following example:
- The following is the FileAppender implementation
```java ```xml
/** <conversionRule conversionWord="messsage" converterClass="org.apache.dolphinscheduler.server.log.SensitiveDataConverter"/>
* task log appender <appender name="TASKLOGFILE" class="ch.qos.logback.classic.sift.SiftingAppender">
*/ <filter class="org.apache.dolphinscheduler.server.log.TaskLogFilter"/>
public class TaskLogAppender extends FileAppender<ILoggingEvent> { <Discriminator class="org.apache.dolphinscheduler.server.log.TaskLogDiscriminator">
<key>taskAppId</key>
... <logBase>${log.base}</logBase>
</Discriminator>
@Override <sift>
protected void append(ILoggingEvent event) { <appender name="FILE-${taskAppId}" class="ch.qos.logback.core.FileAppender">
<file>${log.base}/${taskAppId}.log</file>
if (currentlyActiveFile == null){ <encoder>
currentlyActiveFile = getFile(); <pattern>
} [%level] %date{yyyy-MM-dd HH:mm:ss.SSS Z} [%thread] %logger{96}:[%line] - %messsage%n
String activeFile = currentlyActiveFile; </pattern>
// thread name taskThreadName-processDefineId_processInstanceId_taskInstanceId <charset>UTF-8</charset>
String threadName = event.getThreadName(); </encoder>
String[] threadNameArr = threadName.split("-"); <append>true</append>
// logId = processDefineId_processInstanceId_taskInstanceId </appender>
String logId = threadNameArr[1]; </sift>
... </appender>
super.subAppend(event);
}
}
```
Generate logs in the form of /process definition id /process instance id /task instance id.log
- Filter to match the thread name starting with TaskLogInfo:
- The following shows the TaskLogFilter implementation:
```java
/**
* task log filter
*/
public class TaskLogFilter extends Filter<ILoggingEvent> {
@Override
public FilterReply decide(ILoggingEvent event) {
if (event.getThreadName().startsWith("TaskLogInfo-")){
return FilterReply.ACCEPT;
}
return FilterReply.DENY;
}
}
``` ```
## Sum Up ## Sum Up

View File

@ -1,33 +1,7 @@
# MetaData # MetaData
## DolphinScheduler DB Table Overview ## Table Schema
see sql files in `dolphinscheduler/dolphinscheduler-dao/src/main/resources/sql`
| Table Name | Comment |
| :---: | :---: |
| t_ds_access_token | token for access DolphinScheduler backend |
| t_ds_alert | alert detail |
| t_ds_alertgroup | alert group |
| t_ds_command | command detail |
| t_ds_datasource | data source |
| t_ds_error_command | error command detail |
| t_ds_process_definition | process definition |
| t_ds_process_instance | process instance |
| t_ds_project | project |
| t_ds_queue | queue |
| t_ds_relation_datasource_user | datasource related to user |
| t_ds_relation_process_instance | sub process |
| t_ds_relation_project_user | project related to user |
| t_ds_relation_resources_user | resource related to user |
| t_ds_relation_udfs_user | UDF functions related to user |
| t_ds_relation_user_alertgroup | alert group related to user |
| t_ds_resources | resoruce center file |
| t_ds_schedules | process definition schedule |
| t_ds_session | user login session |
| t_ds_task_instance | task instance |
| t_ds_tenant | tenant |
| t_ds_udfs | UDF resource |
| t_ds_user | user detail |
| t_ds_version | DolphinScheduler version |
--- ---
@ -36,158 +10,31 @@
### User Queue DataSource ### User Queue DataSource
![image.png](/img/metadata-erd/user-queue-datasource.png) ![image.png](../../../img/metadata-erd/user-queue-datasource.png)
- One tenant can own Multiple users. - One tenant can own Multiple users.
- The queue field in the t_ds_user table stores the queue_name information in the t_ds_queue table, t_ds_tenant stores queue information using queue_id column. During the execution of the process definition, the user queue has the highest priority. If the user queue is null, use the tenant queue. - The queue field in the `t_ds_user` table stores the `queue_name` information in the `t_ds_queue` table, `t_ds_tenant` stores queue information using `queue_id` column. During the execution of the process definition, the user queue has the highest priority. If the user queue is null, use the tenant queue.
- The user_id field in the t_ds_datasource table shows the user who create the data source. The user_id in t_ds_relation_datasource_user shows the user who has permission to the data source. - The `user_id` field in the `t_ds_datasource` table shows the user who create the data source. The user_id in `t_ds_relation_datasource_user` shows the user who has permission to the data source.
### Project Resource Alert ### Project Resource Alert
![image.png](/img/metadata-erd/project-resource-alert.png) ![image.png](../../../img/metadata-erd/project-resource-alert.png)
- User can have multiple projects, user project authorization completes the relationship binding using project_id and user_id in t_ds_relation_project_user table. - User can have multiple projects, user project authorization completes the relationship binding using `project_id` and `user_id` in `t_ds_relation_project_user` table.
- The user_id in the t_ds_projcet table represents the user who create the project, and the user_id in the t_ds_relation_project_user table represents users who have permission to the project. - The `user_id` in the `t_ds_projcet` table represents the user who create the project, and the `user_id` in the `t_ds_relation_project_user` table represents users who have permission to the project.
- The user_id in the t_ds_resources table represents the user who create the resource, and the user_id in t_ds_relation_resources_user represents the user who has permissions to the resource. - The `user_id` in the `t_ds_resources` table represents the user who create the resource, and the `user_id` in `t_ds_relation_resources_user` represents the user who has permissions to the resource.
- The user_id in the t_ds_udfs table represents the user who create the UDF, and the user_id in the t_ds_relation_udfs_user table represents a user who has permission to the UDF. - The `user_id` in the `t_ds_udfs` table represents the user who create the UDF, and the `user_id` in the `t_ds_relation_udfs_user` table represents a user who has permission to the UDF.
### Command Process Task ### Project - Tenant - ProcessDefinition - Schedule
![image.png](../../../img/metadata-erd/project_tenant_process_definition_schedule.png)
![image.png](/img/metadata-erd/command.png)<br />![image.png](/img/metadata-erd/process-task.png) - A project can have multiple process definitions, and each process definition belongs to only one project.
- A tenant can be used by multiple process definitions, and each process definition must select only one tenant.
- A workflow definition can have one or more schedules.
- A project has multiple process definitions, a process definition can generate multiple process instances, and a process instance can generate multiple task instances. ### Process Definition Execution
- The t_ds_schedulers table stores the specified time schedule information for process definition. ![image.png](../../../img/metadata-erd/process_definition.png)
- The data stored in the t_ds_relation_process_instance table is used to deal with the sub-processes of a process definition, parent_process_instance_id field represents the id of the main process instance who contains child processes, process_instance_id field represents the id of the sub-process instance, parent_task_instance_id field represents the task instance id of the sub-process node.
- The process instance table and the task instance table correspond to the t_ds_process_instance table and the t_ds_task_instance table, respectively.
--- - A process definition corresponds to multiple task definitions, which are associated through `t_ds_process_task_relation` and the associated key is `code + version`. When the pre-task of the task is empty, the corresponding `pre_task_node` and `pre_task_version` are 0.
- A process definition can have multiple process instances `t_ds_process_instance`, one process instance corresponds to one or more task instances `t_ds_task_instance`.
## Core Table Schema - The data stored in the `t_ds_relation_process_instance` table is used to handle the case that the process definition contains sub-processes. `parent_process_instance_id` represents the id of the main process instance containing the sub-process, `process_instance_id` represents the id of the sub-process instance, `parent_task_instance_id` represents the task instance id of the sub-process node. The process instance table and the task instance table correspond to the `t_ds_process_instance` table and the `t_ds_task_instance` table, respectively.
### t_ds_process_definition
| Field | Type | Comment |
| --- | --- | --- |
| id | int | primary key |
| name | varchar | process definition name |
| version | int | process definition version |
| release_state | tinyint | process definition release state0:offline,1:online |
| project_id | int | project id |
| user_id | int | process definition creator id |
| process_definition_json | longtext | process definition JSON content |
| description | text | process definition description |
| global_params | text | global parameters |
| flag | tinyint | whether process available: 0 not available, 1 available |
| locations | text | Node location information |
| connects | text | Node connection information |
| receivers | text | receivers |
| receivers_cc | text | carbon copy list |
| create_time | datetime | create time |
| timeout | int | timeout |
| tenant_id | int | tenant id |
| update_time | datetime | update time |
| modify_by | varchar | define user modify the process |
| resource_ids | varchar | resource id set |
### t_ds_process_instance
| Field | Type | Comment |
| --- | --- | --- |
| id | int | primary key |
| name | varchar | process instance name |
| process_definition_id | int | process definition id |
| state | tinyint | process instance Status: 0 successful commit, 1 running, 2 prepare to pause, 3 pause, 4 prepare to stop, 5 stop, 6 fail, 7 succeed, 8 need fault tolerance, 9 kill, 10 wait for thread, 11 wait for dependency to complete |
| recovery | tinyint | process instance failover flag0: normal,1: failover instance needs restart |
| start_time | datetime | process instance start time |
| end_time | datetime | process instance end time |
| run_times | int | process instance run times |
| host | varchar | process instance host |
| command_type | tinyint | command type0 start ,1 start from the current node,2 resume a fault-tolerant process,3 resume from pause process, 4 execute from the failed node,5 complement, 6 dispatch, 7 re-run, 8 pause, 9 stop, 10 resume waiting thread |
| command_param | text | JSON command parameters |
| task_depend_type | tinyint | node dependency type: 0 current node, 1 forward, 2 backward |
| max_try_times | tinyint | max try times |
| failure_strategy | tinyint | failure strategy, 0: end the process when node failed,1: continue run the other nodes when failed |
| warning_type | tinyint | warning type 0: no warning, 1: warning if process success, 2: warning if process failed, 3: warning whatever results |
| warning_group_id | int | warning group id |
| schedule_time | datetime | schedule time |
| command_start_time | datetime | command start time |
| global_params | text | global parameters |
| process_instance_json | longtext | process instance JSON |
| flag | tinyint | whether process instance is available: 0 not available, 1 available |
| update_time | timestamp | update time |
| is_sub_process | int | whether the process is sub process: 1 sub-process, 0 not sub-process |
| executor_id | int | executor id |
| locations | text | node location information |
| connects | text | node connection information |
| history_cmd | text | history commands, record all the commands to a instance |
| dependence_schedule_times | text | depend schedule estimate time |
| process_instance_priority | int | process instance priority. 0 highest,1 high,2 medium,3 low,4 lowest |
| worker_group | varchar | worker group who assign the task |
| timeout | int | timeout |
| tenant_id | int | tenant id |
### t_ds_task_instance
| Field | Type | Comment |
| --- | --- | --- |
| id | int | primary key |
| name | varchar | task name |
| task_type | varchar | task type |
| process_definition_id | int | process definition id |
| process_instance_id | int | process instance id |
| task_json | longtext | task content JSON |
| state | tinyint | Status: 0 commit succeeded, 1 running, 2 prepare to pause, 3 pause, 4 prepare to stop, 5 stop, 6 fail, 7 succeed, 8 need fault tolerance, 9 kill, 10 wait for thread, 11 wait for dependency to complete |
| submit_time | datetime | task submit time |
| start_time | datetime | task start time |
| end_time | datetime | task end time |
| host | varchar | host of task running on |
| execute_path | varchar | task execute path in the host |
| log_path | varchar | task log path |
| alert_flag | tinyint | whether alert |
| retry_times | int | task retry times |
| pid | int | pid of task |
| app_link | varchar | Yarn app id |
| flag | tinyint | task instance is available : 0 not available, 1 available |
| retry_interval | int | retry interval when task failed |
| max_retry_times | int | max retry times |
| task_instance_priority | int | task instance priority:0 highest,1 high,2 medium,3 low,4 lowest |
| worker_group | varchar | worker group who assign the task |
#### t_ds_schedules
| Field | Type | Comment |
| --- | --- | --- |
| id | int | primary key |
| process_definition_id | int | process definition id |
| start_time | datetime | schedule start time |
| end_time | datetime | schedule end time |
| crontab | varchar | crontab expression |
| failure_strategy | tinyint | failure strategy: 0 end,1 continue |
| user_id | int | user id |
| release_state | tinyint | release status: 0 not yet released,1 released |
| warning_type | tinyint | warning type: 0: no warning, 1: warning if process success, 2: warning if process failed, 3: warning whatever results |
| warning_group_id | int | warning group id |
| process_instance_priority | int | process instance priority:0 highest,1 high,2 medium,3 low,4 lowest |
| worker_group | varchar | worker group who assign the task |
| create_time | datetime | create time |
| update_time | datetime | update time |
### t_ds_command
| Field | Type | Comment |
| --- | --- | --- |
| id | int | primary key |
| command_type | tinyint | command type: 0 start workflow, 1 start execution from current node, 2 resume fault-tolerant workflow, 3 resume pause process, 4 start execution from failed node, 5 complement, 6 schedule, 7 re-run, 8 pause, 9 stop, 10 resume waiting thread |
| process_definition_id | int | process definition id |
| command_param | text | JSON command parameters |
| task_depend_type | tinyint | node dependency type: 0 current node, 1 forward, 2 backward |
| failure_strategy | tinyint | failed policy: 0 end, 1 continue |
| warning_type | tinyint | alarm type: 0 no alarm, 1 alarm if process success, 2: alarm if process failed, 3: warning whatever results |
| warning_group_id | int | warning group id |
| schedule_time | datetime | schedule time |
| start_time | datetime | start time |
| executor_id | int | executor id |
| dependence | varchar | dependence column |
| update_time | datetime | update time |
| process_instance_priority | int | process instance priority: 0 highest,1 high,2 medium,3 low,4 lowest |
| worker_group_id | int | worker group who assign the task |

View File

@ -20,25 +20,25 @@ Use URI to locate the resource, and use GET to indicate query.
+ When the URI is a type of resource, it means to query a type of resource. For example, the following example indicates paging query `alter-groups`. + When the URI is a type of resource, it means to query a type of resource. For example, the following example indicates paging query `alter-groups`.
``` ```
Method: GET Method: GET
/api/dolphinscheduler/alert-groups /dolphinscheduler/alert-groups
``` ```
+ When the URI is a single resource, it means to query this resource. For example, the following example means to query the specified `alter-group`. + When the URI is a single resource, it means to query this resource. For example, the following example means to query the specified `alter-group`.
``` ```
Method: GET Method: GET
/api/dolphinscheduler/alter-groups/{id} /dolphinscheduler/alter-groups/{id}
``` ```
+ In addition, we can also express query sub-resources based on URI, as follows: + In addition, we can also express query sub-resources based on URI, as follows:
``` ```
Method: GET Method: GET
/api/dolphinscheduler/projects/{projectId}/tasks /dolphinscheduler/projects/{projectId}/tasks
``` ```
**The above examples all represent paging query. If we need to query all data, we need to add `/list` after the URI to distinguish. Do not mix the same API for both paged query and query.** **The above examples all represent paging query. If we need to query all data, we need to add `/list` after the URI to distinguish. Do not mix the same API for both paged query and query.**
``` ```
Method: GET Method: GET
/api/dolphinscheduler/alert-groups/list /dolphinscheduler/alert-groups/list
``` ```
### ② Create - POST ### ② Create - POST
@ -48,13 +48,13 @@ Use URI to locate the resource, use POST to indicate create, and then return the
``` ```
Method: POST Method: POST
/api/dolphinscheduler/alter-groups /dolphinscheduler/alter-groups
``` ```
+ create sub-resources is also the same as above. + create sub-resources is also the same as above.
``` ```
Method: POST Method: POST
/api/dolphinscheduler/alter-groups/{alterGroupId}/tasks /dolphinscheduler/alter-groups/{alterGroupId}/tasks
``` ```
### ③ Modify - PUT ### ③ Modify - PUT
@ -62,7 +62,7 @@ Use URI to locate the resource, use PUT to indicate modify.
+ modify an `alert-group` + modify an `alert-group`
``` ```
Method: PUT Method: PUT
/api/dolphinscheduler/alter-groups/{alterGroupId} /dolphinscheduler/alter-groups/{alterGroupId}
``` ```
### ④ Delete -DELETE ### ④ Delete -DELETE
@ -71,20 +71,28 @@ Use URI to locate the resource, use DELETE to indicate delete.
+ delete an `alert-group` + delete an `alert-group`
``` ```
Method: DELETE Method: DELETE
/api/dolphinscheduler/alter-groups/{alterGroupId} /dolphinscheduler/alter-groups/{alterGroupId}
``` ```
+ batch deletion: batch delete the id arraywe should use POST. **Do not use the DELETE method, because the body of the DELETE request has no semantic meaning, and it is possible that some gateways, proxies, and firewalls will directly strip off the request body after receiving the DELETE request.** + batch deletion: batch delete the id arraywe should use POST. **Do not use the DELETE method, because the body of the DELETE request has no semantic meaning, and it is possible that some gateways, proxies, and firewalls will directly strip off the request body after receiving the DELETE request.**
``` ```
Method: POST Method: POST
/api/dolphinscheduler/alter-groups/batch-delete /dolphinscheduler/alter-groups/batch-delete
``` ```
### ⑤ Others ### ⑤ Partial Modifications -PATCH
Use URI to locate the resource, use PATCH to partial modifications.
```
Method: PATCH
/dolphinscheduler/alter-groups/{alterGroupId}
```
### ⑥ Others
In addition to creating, deleting, modifying and quering, we also locate the corresponding resource through url, and then append operations to it after the path, such as: In addition to creating, deleting, modifying and quering, we also locate the corresponding resource through url, and then append operations to it after the path, such as:
``` ```
/api/dolphinscheduler/alert-groups/verify-name /dolphinscheduler/alert-groups/verify-name
/api/dolphinscheduler/projects/{projectCode}/process-instances/{code}/view-gantt /dolphinscheduler/projects/{projectCode}/process-instances/{code}/view-gantt
``` ```
## 3. Parameter design ## 3. Parameter design
@ -94,7 +102,7 @@ In the case of paging, if the parameter entered by the user is less than 1, the
## 4. Others design ## 4. Others design
### base URL ### base URL
The URI of the project needs to use `/api/<project_name>` as the base path, so as to identify that these APIs are under this project. The URI of the project needs to use `/<project_name>` as the base path, so as to identify that these APIs are under this project.
``` ```
/api/dolphinscheduler /dolphinscheduler
``` ```

View File

@ -0,0 +1,94 @@
# DolphinScheduler API Automation Test
## Preparatory knowledge
### The difference between API Test and Unit Test
API test, which imitates the user calling API, starts from a certain entry and performs operations step by step until a certain work is completed. Different from unit testing, the latter usually needs to test parameters, parameter types, parameter values, parameter numbers, return values, throw errors, etc. in order to ensure that a specific function can complete its work stably and reliably in any case. Unit tests assume that the entire product will work as long as all functions work properly.
In contrast, API testing focuses on whether a complete operation chain can be completed
For example, the API test of the tenant management interface focuses on whether users can log in normally; If the login fails, whether the error message can be displayed correctly. After logging in, you can perform tenant management operations through the sessionid you carry.
## API Test
### API-Pages
DolphinScheduler's API tests are deployed using docker-compose. The current tests are in standalone mode and are mainly used to check some basic functions such as "add, delete, change and check". For further cluster validation, such as collaboration between services or communication mechanisms between services, refer to `deploy/docker/docker-compose.yml` for configuration.
For API test, the [page model](https://www.selenium.dev/documentation/guidelines/page_object_models/) form is used, mainly to create a corresponding model for each page. The following is an example of a login page.
```java
package org.apache.dolphinscheduler.api.test.pages;
import org.apache.dolphinscheduler.api.test.entity.HttpResponse;
import org.apache.dolphinscheduler.api.test.utils.RequestClient;
import java.util.HashMap;
import java.util.Map;
public final class LoginPage {
public HttpResponse login(String username, String password) {
Map<String, Object> params = new HashMap<>();
params.put("userName", username);
params.put("userPassword", password);
RequestClient requestClient = new RequestClient();
return requestClient.post("/login", null, params);
}
}
```
During the test process, we only test the interfaces we need to focus on, not all interfaces in the page. Therefore, we only declare the user name, password and interface path on the login page.
In addition, during the testing process, the interface are not requested directly. The general choice is to package the corresponding methods to achieve the effect of reuse. For example, if you want to log in, you input your username and password through the `public LoginPage login()` method to manipulate the elements you pass in to achieve the effect of logging in. That is, when the user finishes logging in, he or she achieve the effect of login.
On the login page, only the input parameter specification of the interface request is defined. For the output parameter of the interface request, only the unified basic response structure is defined. The data actually returned by the interface is tested in the actual test case. Whether the input and output of main test interfaces can meet the requirements of test cases.
### API-Cases
The following is an example of a tenant management test. As explained earlier, we use docker-compose for deployment, so for each test case, we need to import the corresponding file in the form of an annotation.
The interface is requested using the RemoteWebDriver provided with Selenium. Before each test case is started there is some preparation work that needs to be done. For example: logging in the user, jumping to the corresponding page (depending on the specific test case).
```java
@BeforeAll
public static void setup() {
LoginPage loginPage = new LoginPage();
HttpResponse loginHttpResponse = loginPage.login(user, password);
sessionId = JSONUtils.convertValue(loginHttpResponse.body().data(), LoginResponseData.class).sessionId();
}
```
When the preparation is complete, it is time for the formal test case writing. We use a form of @Order() annotation for modularity, to confirm the order of the tests. After the tests have been run, assertions are used to determine if the tests were successful, and if the assertion returns true, the tenant creation was successful. The following code can be used as a reference:
```java
@Test
@Order(1)
public void testCreateTenant() {
TenantPage tenantPage = new TenantPage();
HttpResponse createTenantHttpResponse = tenantPage.createTenant(sessionId, tenant, 1, "");
Assertions.assertTrue(createTenantHttpResponse.body().success());
}
```
The rest are similar cases and can be understood by referring to the specific source code.
https://github.com/apache/dolphinscheduler/tree/dev/dolphinscheduler-api-test/dolphinscheduler-api-test-case/src/test/java/org/apache/dolphinscheduler/api.test/cases
## Supplements
When running API tests locally, First, you need to start the local service, you can refer to this page:
[development-environment-setup](./development-environment-setup.md)
When running API tests locally, the `-Dlocal=true` parameter can be configured to connect locally and facilitate changes to the UI.
The current default request timeout length is 10 seconds. This value should not be modified without special requirements.

View File

@ -1,14 +1,13 @@
# DolphinScheduler development # DolphinScheduler development
## Software Requests ## Software Requirements
Before setting up the DolphinScheduler development environment, please make sure you have installed the software as below: Before setting up the DolphinScheduler development environment, please make sure you have installed the software as below:
* [Git](https://git-scm.com/downloads): DolphinScheduler version control system * [Git](https://git-scm.com/downloads)
* [JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html): DolphinScheduler backend language * [JDK](https://www.oracle.com/technetwork/java/javase/downloads/index.html): v1.8.x (Currently does not support jdk 11)
* [Maven](http://maven.apache.org/download.cgi): Java Package Management System * [Maven](http://maven.apache.org/download.cgi): v3.5+
* [Node](https://nodejs.org/en/download): DolphinScheduler frontend * [Node](https://nodejs.org/en/download): v16.13+ (dolphinScheduler version is lower than 3.0, please install node v12.20+)
language * [Pnpm](https://pnpm.io/installation): v6.x
### Clone Git Repository ### Clone Git Repository
@ -19,11 +18,65 @@ mkdir dolphinscheduler
cd dolphinscheduler cd dolphinscheduler
git clone git@github.com:apache/dolphinscheduler.git git clone git@github.com:apache/dolphinscheduler.git
``` ```
### compile source code ### compile source code
i. If you use MySQL database, pay attention to modify pom.xml in the root project, and change the scope of the mysql-connector-java dependency to compile. Supporting system:
* MacOS
* Liunx
ii. Run `mvn clean install -Prelease -Dmaven.test.skip=true` Run `mvn clean install -Prelease -Dmaven.test.skip=true`
## Docker image build
DolphinScheduler will release new Docker images after it released, you could find them in [Docker Hub](https://hub.docker.com/search?q=DolphinScheduler).
* If you want to modify DolphinScheduler source code, and build Docker images locally, you can run when finished the modification
```shell
cd dolphinscheduler
./mvnw -B clean package \
-Dmaven.test.skip \
-Dmaven.javadoc.skip \
-Dmaven.checkstyle.skip \
-Ddocker.tag=<TAG> \
-Pdocker,release
```
When the command is finished you could find them by command `docker imaegs`.
* If you want to modify DolphinScheduler source code, build and push Docker images to your registry <HUB_URL>you can run when finished the modification
```shell
cd dolphinscheduler
./mvnw -B clean deploy \
-Dmaven.test.skip \
-Dmaven.javadoc.skip \
-Dmaven.checkstyle.skip \
-Dmaven.deploy.skip \
-Ddocker.tag=<TAG> \
-Ddocker.hub=<HUB_URL> \
-Pdocker,release
```
* If you want to modify DolphinScheduler source code, and also want to add customize dependencies of Docker image, you can modify the definition of Dockerfile after modifying the source code. You can run the following command to find all Dockerfile files.
```shell
cd dolphinscheduler
find . -iname 'Dockerfile'
```
Then run the Docker build command above
* You could create custom Docker images base on those images if you want to change image like add some dependencies or upgrade package.
```Dockerfile
FROM dolphinscheduler-standalone-server
RUN apt update ; \
apt install -y <YOUR-CUSTOM-DEPENDENCE> ; \
```
> **_Note_** Docker will build and push linux/amd64,linux/arm64 multi-architecture images by default
>
> Have to use version after Docker 19.03, because after 19.03 docker contains buildx
## Notice ## Notice
@ -36,7 +89,9 @@ There are two ways to configure the DolphinScheduler development environment, st
## DolphinScheduler Standalone Quick Start ## DolphinScheduler Standalone Quick Start
> **_Note:_** Use standalone server only for development and debugging, because it uses H2 Database as default database and Zookeeper Testing Server which may not be stable in production. > **_Note:_** Use standalone server only for development and debugging, because it uses H2 Database as default database and Zookeeper Testing Server which may not be stable in production.
>
> Standalone is only supported in DolphinScheduler 1.3.9 and later versions. > Standalone is only supported in DolphinScheduler 1.3.9 and later versions.
>
> Standalone server is able to connect to external databases like mysql and postgresql, see [Standalone Deployment](https://dolphinscheduler.apache.org/en-us/docs/dev/user_doc/guide/installation/standalone.html) for instructions. > Standalone server is able to connect to external databases like mysql and postgresql, see [Standalone Deployment](https://dolphinscheduler.apache.org/en-us/docs/dev/user_doc/guide/installation/standalone.html) for instructions.
### Git Branch Choose ### Git Branch Choose
@ -48,11 +103,12 @@ Use different Git branch to develop different codes
### Start backend server ### Start backend server
Find the class `org.apache.dolphinscheduler.server.StandaloneServer` in Intellij IDEA and clikc run main function to startup. Find the class `org.apache.dolphinscheduler.StandaloneServer` in Intellij IDEA and clikc run main function to startup.
### Start frontend server ### Start frontend server
Install frontend dependencies and run it Install frontend dependencies and run it.
> Note: You can see more detail about the frontend setting in [frontend development](./frontend-development.md).
```shell ```shell
cd dolphinscheduler-ui cd dolphinscheduler-ui
@ -94,36 +150,29 @@ Following steps will guide how to start the DolphinScheduler backend service
##### Backend Start Prepare ##### Backend Start Prepare
* Open project: Use IDE open the project, here we use Intellij IDEA as an example, after opening it will take a while for Intellij IDEA to complete the dependent download * Open project: Use IDE open the project, here we use Intellij IDEA as an example, after opening it will take a while for Intellij IDEA to complete the dependent download
* Plugin installation(**Only required for 2.0 or later**)
* Registry plug-in configuration, take Zookeeper as an example (registry.properties)
dolphinscheduler-service/src/main/resources/registry.properties
```registry.properties
registry.plugin.name=zookeeper
registry.servers=127.0.0.1:2181
```
* File change * File change
* If you use MySQL as your metadata database, you need to modify `dolphinscheduler/pom.xml` and change the `scope` of the `mysql-connector-java` dependency to `compile`. This step is not necessary to use PostgreSQL * If you use MySQL as your metadata database, you need to modify `dolphinscheduler/pom.xml` and change the `scope` of the `mysql-connector-java` dependency to `compile`. This step is not necessary to use PostgreSQL
* Modify database configuration, modify the database configuration in the `dolphinscheduler-dao/src/main/resources/application-mysql.yaml` * Modify database configuration, modify the database configuration in the `dolphinscheduler-master/src/main/resources/application.yaml`
* Modify database configuration, modify the database configuration in the `dolphinscheduler-worker/src/main/resources/application.yaml`
* Modify database configuration, modify the database configuration in the `dolphinscheduler-api/src/main/resources/application.yaml`
We here use MySQL with database, username, password named dolphinscheduler as an example We here use MySQL with database, username, password named dolphinscheduler as an example
```application-mysql.yaml ```application.yaml
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8 url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
username: ds_user username: dolphinscheduler
password: dolphinscheduler password: dolphinscheduler
``` ```
* Log level: add a line `<appender-ref ref="STDOUT"/>` to the following configuration to enable the log to be displayed on the command line * Log level: add a line `<appender-ref ref="STDOUT"/>` to the following configuration to enable the log to be displayed on the command line
`dolphinscheduler-server/src/main/resources/logback-worker.xml` `dolphinscheduler-master/src/main/resources/logback-spring.xml`
`dolphinscheduler-worker/src/main/resources/logback-spring.xml`
`dolphinscheduler-server/src/main/resources/logback-master.xml` `dolphinscheduler-api/src/main/resources/logback-spring.xml`
`dolphinscheduler-api/src/main/resources/logback-api.xml`
here we add the result after modify as below: here we add the result after modify as below:
@ -141,9 +190,9 @@ Following steps will guide how to start the DolphinScheduler backend service
There are three services that need to be started, including MasterServer, WorkerServer, ApiApplicationServer. There are three services that need to be started, including MasterServer, WorkerServer, ApiApplicationServer.
* MasterServerExecute function `main` in the class `org.apache.dolphinscheduler.server.master.MasterServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-master.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql` * MasterServerExecute function `main` in the class `org.apache.dolphinscheduler.server.master.MasterServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql`
* WorkerServerExecute function `main` in the class `org.apache.dolphinscheduler.server.worker.WorkerServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-worker.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql` * WorkerServerExecute function `main` in the class `org.apache.dolphinscheduler.server.worker.WorkerServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Ddruid.mysql.usePingMethod=false -Dspring.profiles.active=mysql`
* ApiApplicationServerExecute function `main` in the class `org.apache.dolphinscheduler.api.ApiApplicationServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-api.xml -Dspring.profiles.active=api,mysql`. After it started, you could find Open API documentation in http://localhost:12345/dolphinscheduler/doc.html * ApiApplicationServerExecute function `main` in the class `org.apache.dolphinscheduler.api.ApiApplicationServer` by Intellij IDEA, with the configuration *VM Options* `-Dlogging.config=classpath:logback-spring.xml -Dspring.profiles.active=api,mysql`. After it started, you could find Open API documentation in http://localhost:12345/dolphinscheduler/doc.html
> The `mysql` in the VM Options `-Dspring.profiles.active=mysql` means specified configuration file > The `mysql` in the VM Options `-Dspring.profiles.active=mysql` means specified configuration file

View File

@ -104,7 +104,7 @@ The goToTab method is provided in SecurityPage to test the corresponding sidebar
} }
``` ```
![SecurityPage](/img/e2e-test/SecurityPage.png) ![SecurityPage](../../../img/e2e-test/SecurityPage.png)
For navigation bar options jumping, the goToNav method is provided in `org/apache/dolphinscheduler/e2e/pages/common/NavBarPage.java`. The currently supported pages are: ProjectPage, SecurityPage and ResourcePage. For navigation bar options jumping, the goToNav method is provided in `org/apache/dolphinscheduler/e2e/pages/common/NavBarPage.java`. The currently supported pages are: ProjectPage, SecurityPage and ResourcePage.
@ -139,7 +139,7 @@ For navigation bar options jumping, the goToNav method is provided in `org/apach
Current E2E test cases supported include: File Management, Project Management, Queue Management, Tenant Management, User Management, Worker Group Management and Workflow Test. Current E2E test cases supported include: File Management, Project Management, Queue Management, Tenant Management, User Management, Worker Group Management and Workflow Test.
![E2E_Cases](/img/e2e-test/E2E_Cases.png) ![E2E_Cases](../../../img/e2e-test/E2E_Cases.png)
The following is an example of a tenant management test. As explained earlier, we use docker-compose for deployment, so for each test case, we need to import the corresponding file in the form of an annotation. The following is an example of a tenant management test. As explained earlier, we use docker-compose for deployment, so for each test case, we need to import the corresponding file in the form of an annotation.
@ -179,19 +179,19 @@ https://github.com/apache/dolphinscheduler/tree/dev/dolphinscheduler-e2e/dolphin
## III. Supplements ## III. Supplements
When running E2E tests locally, First, you need to start the local service, you can refer to this page: When running E2E tests locally, First, you need to start the local service, you can refer to this page:
[development-environment-setup](https://dolphinscheduler.apache.org/en-us/development/development-environment-setup.html) [development-environment-setup](./development-environment-setup.md)
When running E2E tests locally, the `-Dlocal=true` parameter can be configured to connect locally and facilitate changes to the UI. When running E2E tests locally, the `-Dlocal=true` parameter can be configured to connect locally and facilitate changes to the UI.
When running E2E tests with `M1` chip, you can use `-Dm1_chip=true` parameter to configure containers supported by When running E2E tests with `M1` chip, you can use `-Dm1_chip=true` parameter to configure containers supported by
`ARM64`. `ARM64`.
![Dlocal](/img/e2e-test/Dlocal.png) ![Dlocal](../../../img/e2e-test/Dlocal.png)
If a connection timeout occurs during a local run, increase the load time to a recommended 30 and above. If a connection timeout occurs during a local run, increase the load time to a recommended 30 and above.
![timeout](/img/e2e-test/timeout.png) ![timeout](../../../img/e2e-test/timeout.png)
The test run will be available as an MP4 file. The test run will be available as an MP4 file.
![MP4](/img/e2e-test/MP4.png) ![MP4](../../../img/e2e-test/MP4.png)

View File

@ -0,0 +1,42 @@
# License Notice
As we know that DolphinScheduler is an open-source undergoing project at The Apache Software Foundation (ASF), which means that you have to follow the Apache way to become the DolphinScheduler contributor. Furthermore, Apache has extremely strict rules according to the License. This passage will explain the ASF license and how to avoid License risks at the early stage when you participate in DolphinScheduler.
Note: This article only applies to the Apache projects.
### Licenses Could be Accepted to the Apache Project
You have to pay attention to the following open-source software protocols which Apache projects support when you intend to add a new feature to the DolphinScheduler (or other Apache projects), which functions refers to other open-source software references.
[ASF 3RD PARTY LICENSE POLICY](https://apache.org/legal/resolved.html)
If the 3rd party software is not present at the above policy, we are sorry that your code can not pass the audit and we suggest searching for other substitute plans.
Besides, when you demand new dependencies in the project, please email us about the reason and the outcome of the influence to dev@dolphinscheduler.apache.org to discuss. Besides, you need at least 3 positive votes from the PPMC to finish the whole step.
### How to Legally Use 3rd Party Open-source Software in the DolphinScheduler
Moreover, when we intend to refer a new software ( not limited to 3rd party jar, text, CSS, js, pics, icons, audios etc and modifications based on 3rd party files) to our project, we need to use them legally in addition to the permission of ASF. Refer to the following article:
* [COMMUNITY-LED DEVELOPMENT "THE APACHE WAY"](https://apache.org/dev/licensing-howto.html)
For example, we should contain the NOTICE file (every open-source project has NOTICE file, generally under root directory) of ZooKeeper in our project when we are using ZooKeeper. As the Apache explains, "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
We are not going to dive into every 3rd party open-source license policy, you may look up them if interested.
### DolphinScheduler-License Check Rules
In general, we would have our License-check scripts to our project. DolphinScheduler-License is provided by [kezhenxu94](https://github.com/kezhenxu94) which differ a bit from other open-source projects. All in all, we are trying to make sure avoiding the license issues at the first time.
We need to follow the following steps when we need to add new jars or external resources:
* Add the name and the version of the jar file in the known-dependencies.txt
* Add relevant maven repository address under 'dolphinscheduler-dist/release-docs/LICENSE' directory
* Append relevant NOTICE files under 'dolphinscheduler-dist/release-docs/NOTICE' directory and make sure they are no different to the original repository
* Add relevant source code protocols under 'dolphinscheduler-dist/release-docs/license/' directory and the file name should be named as license+filename.txt. Eg: license-zk.txt
### References
* [COMMUNITY-LED DEVELOPMENT "THE APACHE WAY"](https://apache.org/dev/licensing-howto.html)
* [ASF 3RD PARTY LICENSE POLICY](https://apache.org/legal/resolved.html)

View File

@ -0,0 +1,11 @@
# How to Become DolphinScheduler Committer
Anyone can be a contributor to an Apache project. Being a contributor simply means that you take an interest in the project and contribute in some way, ranging from asking sensible questions (which documents the project and provides feedback to developers) through to providing new features as patches.
If you become a valuable contributor to the project you may well be invited to become a committer. Committer is a term used at the ASF to signify someone who is committed to a particular project. It brings with it the privilege of write access to the project repository and resources.
In Dolphinscheduler community, if a committer who have earned even more merit, can be invited to be a part of the Project Management Committee (PMC).
One thing that is sometimes hard to understand when you are new to the open development process used at the ASF, is that we value the community more than the code. A strong and healthy community will be respectful and be a fun and rewarding place. More importantly, a diverse and healthy community can continue to support the code over the longer term, even as individual companies come and go from the field.
More details could be found [here](https://community.apache.org/contributors/).

View File

@ -0,0 +1,68 @@
# Code of Conduct
The following Code of Conduct is based on full compliance with the [Apache Software Foundation Code of Conduct](https://www.apache.org/foundation/policies/conduct.html).
## Development philosophy
- **Consistent** code style, naming, and usage are consistent.
- **Easy to read** code is obvious, easy to read and understand, when debugging one knows the intent of the code.
- **Neat** agree with the concepts of《Refactoring》and《Code Cleanliness》and pursue clean and elegant code.
- **Abstract** hierarchy is clear and the concepts are refined and reasonable. Keep methods, classes, packages, and modules at the same level of abstraction.
- **Heart** Maintain a sense of responsibility and continue to be carved in the spirit of artisans.
## Development specifications
- Executing `mvn -U clean package -Prelease` can compile and test through all test cases.
- The test coverage tool checks for no less than dev branch coverage.
- In the root directory, use Checkstyle to check your code for special reasons for violating validation rules. The template location is located at ds_check_style.xml.
- Follow the coding specifications.
## Coding specifications
- Use linux line breaks.
- Indentation (including empty lines) is consistent with the last line.
- An empty line is required between the class declaration and the following variable or method.
- There should be no meaningless empty lines.
- Classes, methods, and variables should be named as the name implies and abbreviations should be avoided.
- Return value variables are named after `result`; `each` is used in loops to name loop variables; and `entry` is used in map instead of `each`.
- The cached exception is called `e`; Catch the exception and do nothing, and the exception is named `ignored`.
- Configuration Files are named in camelCase, and file names are lowercase with uppercase initial/starting letter.
- Code that requires comment interpretation should be as small as possible and interpreted by method name.
- `equals` and `==` In a conditional expression, the constant is left, the variable is on the right, and in the expression greater than less than condition, the variable is left and the constant is right.
- In addition to the abstract classes used for inheritance, try to design the class as `final`.
- Nested loops are as much a method as possible.
- The order in which member variables are defined and the order in which parameters are passed is consistent across classes and methods.
- Priority is given to the use of guard statements.
- Classes and methods have minimal access control.
- The private method used by the method should follow the method, and if there are multiple private methods, the writing private method should appear in the same order as the private method in the original method.
- Method entry and return values are not allowed to be `null`.
- The return and assignment statements of if else are preferred with the tri-objective operator.
- Priority is given to `LinkedList` and only use `ArrayList` if you need to get element values in the collection through the index.
- Collection types such as `ArrayList``HashMap` that may produce expansion must specify the initial size of the collection to avoid expansion.
- Logs and notes are always in English.
- Comments can only contain `javadoc`, `todo` and `fixme`.
- Exposed classes and methods must have javadoc, other classes and methods and methods that override the parent class do not require javadoc.
## Unit test specifications
- Test code and production code are subject to the same code specifications.
- Unit tests are subject to AIR (Automatic, Independent, Repeatable) Design concept.
- Automatic: Unit tests should be fully automated, not interactive. Manual checking of output results is prohibited, `System.out`, `log`, etc. are not allowed, and must be verified with assertions.
- Independent: It is prohibited to call each other between unit test cases and to rely on the order of execution. Each unit test can be run independently.
- Repeatable: Unit tests cannot be affected by the external environment and can be repeated.
- Unit tests are subject to BCDEBorder, Correct, Design, Error) Design principles.
- Border (Boundary value test): The expected results are obtained by entering the boundaries of loop boundaries, special values, data order, etc.
- Correct (Correctness test): The expected results are obtained with the correct input.
- Design (Rationality Design): Design high-quality unit tests in combination with production code design.
- Error (Fault tolerance test): The expected results are obtained through incorrect input such as illegal data, abnormal flow, etc.
- If there is no special reason, the test needs to be fully covered.
- Each test case needs to be accurately asserted.
- Prepare the environment for code separation from the test code.
- Only jUnit `Assert`hamcrest `CoreMatchers`Mockito Correlation can use static import.
- Single-data assertions should use `assertTrue``assertFalse``assertNull` and `assertNotNull`.
- Multi-data assertions should use `assertThat`.
- Accurate assertion, try not to use `not``containsString` assertion.
- The true value of the test case should be named actualXXX, and the expected value should be named expectedXXX.
- Classes and Methods with `@Test` labels do not require javadoc.
- Public specifications.
- Each line is no longer than `200` in length, ensuring that each line is semantically complete for easy understanding.

View File

@ -0,0 +1,94 @@
# Commit Message Notice
### Preface
A good commit message can help other developers (or future developers) quickly understand the context of related changes, and can also help project managers determine whether the commit is suitable for inclusion in the release. But when we checked the commit logs of many open source projects, we found an interesting problem. Some developers have very good code quality, but the commit message record is rather confusing. When other contributors or learners are viewing the code, it cant be intuitively understood through commit log.
The purpose of the changes before and after the submission, as Peter Hutterer saidRe-establishing the context of a piece of code is wasteful. We cant avoid it completely, so our efforts should go to reducing it as much as possible. Commit messages can do exactly that and as a result, a commit message shows whether a developer is a good collaborator. Therefore, DolphinScheduler developed the protocol in conjunction with other communities and official Apache documents.
### Commit Message RIP
#### 1Clearly modify the content
A commit message should clearly state what issues (bug fixes, function enhancements, etc.) the submission solves, so that other developers can better track the issues and clarify the optimization during the version iteration process.
#### 2Associate the corresponding Pull Request or Issue
When our changes are large, the commit message should best be associated with the relevant Issue or Pull Request on GitHub, so that our developers can quickly understand the context of the code submission through the associated information when reviewing the code. If the current commit is for an issue, then the issue can be closed in the Footer section.
#### 3Unified format
The formatted CommitMessage can help provide more historical information for quick browsing, and it can also generate a Change Log directly from commit.
Commit message should include three parts: Header, Body and Footer. Among them, Header is required, Body and Footer can be omitted.
##### Header
The header part has only one line, including three fields: type (required), scope (optional), and subject (required).
[DS-ISSUE number][type] subject
(1) Type is used to indicate the category of commit, and only the following 7 types are allowed.
- featNew features
- fixBug fixes
- docsDocumentation
- style Format (does not affect changes in code operation)
- refactorRefactoring (It is not a new feature or a code change to fix a bug)
- testAdd test
- choreChanges in the build process or auxiliary tools
If the type is feat and fix, the commit will definitely appear in the change log. Other types (docs, chore, style, refactor, test) are not recommended.
(2) Scope
Scope is used to indicate the scope of commit impact, such as server, remote, etc. If there is no suitable scope, you can use \*.
(3) subject
Subject is a short description of the purpose of the commit, no more than 50 characters.
##### Body
The body part is a detailed description of this commit, which can be divided into multiple lines, and the line break will wrap with 72 characters to avoid automatic line wrapping affecting the appearance.
Note the following points in the Body section:
- Use the verb-object structure, note the use of present tense. For example, use change instead of changed or changes
- Don't capitalize the first letter
- The end of the sentence does not need a . (period)
##### Footer
Footer only works in two situations
(1) Incompatible changes
If the current code is not compatible with the previous version, the Footer part starts with BREAKING CHANGE, followed by a description of the change, the reason for the change, and the migration method.
(2) Close Issue
If the current commit is for a certain issue, you can close the issue in the Footer section, or close multiple issues at once.
##### For Example
```
[DS-001][docs-en] add commit message
- commit message RIP
- build some conventions
- help the commit messages become clean and tidy
- help developers and release managers better track issues
and clarify the optimization in the version iteration
This closes #001
```
### Reference documents
[Commit message format](https://cwiki.apache.org/confluence/display/GEODE/Commit+Message+Format)
[On commit messages-Peter Hutterer](http://who-t.blogspot.com/2009/12/on-commit-messages.html)
[RocketMQ Community Operation Conventions](https://mp.weixin.qq.com/s/LKM4IXAY-7dKhTzGu5-oug)

View File

@ -0,0 +1,40 @@
# Participate in Contributing
First of all, thank you very much for choosing and using DolphinScheduler, and welcome to join the DolphinScheduler family!
We encourage any form of participation in the community that will eventually become Committer or PPMC Such as:
* Problems will be encountered via github on the [issue](https://github.com/apache/dolphinscheduler/issues) form feedback out.
* Answer the issue questions that others are asking.
* Help improve the documentation.
* Help your project add test cases.
* Add comments to the code.
* Submit a PR that fixes the bug or Feature.
* Publish application case practice, scheduling process analysis, or technical articles related to scheduling.
* Help promote DolphinScheduler, participate in technical conferences or meetup, sharing and more.
Welcome to the contributing team and join open source starting with submitting your first PR.
- For example, add code comments or find "easy to fix" tags or some very simple issue (misspellings, etc.) and so on, first familiarize yourself with the submission process through the first simple PR.
Note: Contributions are not limited to PR Only, but contribute to the development of the project.
I'm sure you'll benefit from open source by participating in DolphinScheduler!
### 1. Participate in documentation contributions.
Refer to the [Submit Guide-Document Notice](./document.md)
### 2. Participate in code contributions.
Refer to the [Submit Guide-Issue Notice](./issue.md), [Submit Guide-Pull Request Notice](./pull-request.md), [Submit Guide-Commit Message Notice](./commit-message.md)
### 3. How to pick up an Issue and submit a Pull Request.
If you want to implement a Feature or fix a Bug. Please refer to the following:
* All Bugs and the new Features are recommended and managed using the Issues Page.
* If you want to develop a Feature, first reply to the Issue associated with that feature, indicating that you are currently working on it. And set yourself a "deadline" when to Submit the Feature, and add it in the reply comment.
* It's a good idea to find a mentor (or an instructor) in the core contributors who gives immediate feedback on design and functional implementation.
* You should create a new branch to start your work, to get the name of the branch refer to the [Submit Guide-Pull Request Notice](./pull-request.md). For example, if you want to complete the feature and submit Issue 111, your branch name should be feature-111. The feature name can be determined after discussion with the instructor.
* When you're done, send a Pull Request to dolphinscheduler, please refer to the《[Submit Guide-Submit Pull Request Process](./submit-code.md)》
If you want to submit a Pull Request to complete a Feature or fix a Bug, it is recommended that you start with the `good first issue`, `easy-to-fix` issues, complete a small function to submit, do not change too many files at a time, changing too many files will also put a lot of pressure on Reviewers, it is recommended to submit them through multiple Pull Requests, not all at once.

View File

@ -0,0 +1,62 @@
# Documentation Notice
Good documentation is critical for any type of software. Any contribution that can improve the DolphinScheduler documentation is welcome.
### Get the document project
Documentation for the DolphinScheduler project is maintained in a separate [git repository](https://github.com/apache/dolphinscheduler-website).
First you need to fork the document project into your own github repository, and then clone the document to your local computer.
```
git clone https://github.com/<your-github-user-name>/dolphinscheduler-website
```
### The document environment
The DolphinScheduler website is supported by [docsite](https://github.com/chengshiwen/docsite-ext)
Make sure that your node version is 10+, docsite does not yet support versions higher than 10.x.
### Document build guide
1. Run `npm install` in the root directory to install the dependencies.
2. Run commands to collect resources 2.1.Run `export PROTOCOL_MODE=ssh` tells Git clone resource via SSH protocol instead of HTTPS protocol. 2.2.Run `./scripts/prepare_docs.sh` prepare all related resources, for more information you could see [how prepare script work](https://github.com/apache/dolphinscheduler-website/blob/master/HOW_PREPARE_WOKR.md).
3. Run `npm run start` in the root directory to start a local server, you will see the website in 'http://localhost:8080'.
4. Run `npm run build` to build source code into dist directory.
5. Verify your change locally: `python -m SimpleHTTPServer 8000`, when your python version is 3 use :`python3 -m http.server 8000` instead.
If the latest version of node is installed locally, consider using `nvm` to allow different versions of `node` to run on your computer.
1. Refer to the [Instructions](http://nvm.sh) to install nvm.
2. Run `nvm install v10.23.1` to install node v10.
3. Run `nvm use v10.23.1` to switch the current working environment to node v10.
Now you can run and build the website in your local environment.
### The document specification
1. ** Spaces are Required ** between Chinese characters and English or numbers and ** Spaces are not required ** between Chinese punctuation marks and English or numbers, to enhance the aesthetics and readability of the Chinese-English mix.
2. It is recommended that you use "you" in general. Of course, you can use the term when necessary, such as when there is a warning prompt.
### How to submit a document Pull Request
1. Do not use "git add." to commit all changes.
2. Simply push the changed files, for example:
* `*.md`
* `blog.js or docs.js or site.js`
3. Submit the Pull Request to the **master** branch.
### Reference to the documentation
[Apache Flink Translation Specifications](https://cwiki.apache.org/confluence/display/FLINK/Flink+Translation+Specifications)

View File

@ -0,0 +1,36 @@
# DolphinScheduler E2E Test Contribution Guide
The main purpose of E2E test is to verify the integration and data integrity of the system, and its components, by simulating real user scenarios. This makes it possible to extend the scope of testing and ensure the health and stability of the system. To a certain extent, the test workload and costs are reduced. In simple terms, E2E testing is about treating a program as a black box and simulating the access behaviour of a real system from the user's point of view to see if the input to the test (user behaviour/simulated data) gives the expected results. Therefore, the community decided to add E2E automated testing to DolphinScheduler.
The current community E2E test has not yet reached full coverage, so this document has been written with the aim of guiding more partners to get involved.
### How to find the corresponding ISSUE?
The E2E test pages are currently divided into four pages: Project Management, Resource Center, DataSource, and Security Center.
Contributors can find the task by going to GitHub, searching for [apace/dolphinscheduler](https://github.com/apache/dolphinscheduler), and then searching for `e2e test cases` in the [issue list](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue+is%3Aopen+e2e+test+cases). As shown below.
![e2e-issue](../../../../img/contribute/join/e2e/e2e-issue.png)
In each issue, we list the content to be tested and the expected results, which can be seen in the Description. Once you are on the current page, you can select the issue you are interested in, for example, to participate in the Security Center test, just leave a comment under the corresponding issue about the case you want to test.
- Task status: If the test has been completed, it is considered finished and as a contributor you need to find the outstanding tests.
- number: Test case serial number.
- function module: Functional modules to be tested, a functional module containing multiple test cases.
- test point: Specific examples of what needs to be tested. For example button click actions on pages, page jump functions.
- priority: The priority of the test case, **which is recommended to find a high priority**.
- service: The service that needs to be started during the test process.
- test steps: The test steps to be performed for each test case.
- expected results: The expected test results.
- actual results: The actual results.
- remarks: The precautions needed during the test process.
![e2e-security](../../../../img/contribute/join/e2e/e2e-security.png)
### How to write test code?
After taking up the corresponding task, the next step is to get to the crux of writing the code. Many partners may not be familiar with E2E test codes, so you can refer to this page: [e2e-test](../e2e-test.md).
### How to submit a Pull Request?
Participation in the open source community can take many forms, including issue, pull request and translation. To participate in the E2E testing process, contributors are first required to understand the simple process of submitting a pull request, see: [Pull Request](./pull-request.md).

View File

@ -0,0 +1,136 @@
# Issue Notice
## Preface
Issues function is used to track various Features, Bugs, Functions, etc. The project maintainer can organize the tasks to be completed through issues.
Issue is an important step in drawing out a feature or bug,
and the contents that can be discussed in an issue are not limited to the features, the causes of the existing bugs, the research on preliminary scheme, and the corresponding implementation design and code design.
And only when the Issue is approved, the corresponding Pull Request should be implemented.
If an issue corresponds to a large feature, it is recommended to divide it into multiple small issues according to the functional modules and other dimensions.
## Specification
### Issue title
Title Format: [`Issue Type`][`Module Name`] `Issue Description`
The `Issue Type` is as follows:
<table>
<thead>
<tr>
<th style="width: 10%; text-align: center;">Issue Type</th>
<th style="width: 20%; text-align: center;">Description</th>
<th style="width: 20%; text-align: center;">Example</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">Feature</td>
<td style="text-align: center;">Include expected new features and functions</td>
<td style="text-align: center;">[Feature][api] Add xxx api in xxx controller</td>
</tr>
<tr>
<td style="text-align: center;">Bug</td>
<td style="text-align: center;">Bugs in the program</td>
<td style="text-align: center;">[Bug][api] Throw exception when xxx</td>
</tr>
<tr>
<td style="text-align: center;">Improvement</td>
<td style="text-align: center;">Some improvements of the current program, not limited to code format, program performance, etc</td>
<td style="text-align: center;">[Improvement][server] Improve xxx between Master and Worker</td>
</tr>
<tr>
<td style="text-align: center;">Test</td>
<td style="text-align: center;">Specifically for the test case</td>
<td style="text-align: center;">[Test][server] Add xxx e2e test</td>
</tr>
<tr>
<td style="text-align: center;">Sub-Task</td>
<td style="text-align: center;">Those generally are subtasks of feature class. For large features, they can be divided into many small subtasks to complete one by one</td>
<td style="text-align: center;">[Sub-Task][server] Implement xxx in xxx</td>
</tr>
</tbody>
</table>
The `Module Name` is as follows:
<table>
<thead>
<tr>
<th style="width: 10%; text-align: center;">Module Name</th>
<th style="width: 20%; text-align: center;">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">alert</td>
<td style="text-align: center;">Alert module</td>
</tr>
<tr>
<td style="text-align: center;">api</td>
<td style="text-align: center;">Application program interface layer module</td>
</tr>
<tr>
<td style="text-align: center;">service</td>
<td style="text-align: center;">Application service layer module</td>
</tr>
<tr>
<td style="text-align: center;">dao</td>
<td style="text-align: center;">Application data access layer module</td>
</tr>
<tr>
<td style="text-align: center;">plugin</td>
<td style="text-align: center;">Plugin module</td>
</tr>
<tr>
<td style="text-align: center;">remote</td>
<td style="text-align: center;">Communication module</td>
</tr>
<tr>
<td style="text-align: center;">server</td>
<td style="text-align: center;">Server module</td>
</tr>
<tr>
<td style="text-align: center;">ui</td>
<td style="text-align: center;">Front end module</td>
</tr>
<tr>
<td style="text-align: center;">docs-zh</td>
<td style="text-align: center;">Chinese document module</td>
</tr>
<tr>
<td style="text-align: center;">docs</td>
<td style="text-align: center;">English document module</td>
</tr>
<tr>
<td style="text-align: center;">...</td>
<td style="text-align: center;">-</td>
</tr>
</tbody>
</table>
### Issue content template
https://github.com/apache/dolphinscheduler/tree/dev/.github/ISSUE_TEMPLATE
### Contributor
Except for some special cases, it is recommended to discuss under issue or mailing list to determine the design scheme or provide the design scheme,
as well as the code implementation design before completing the issue.
If there are many different solutions, it is suggested to make a decision through mailing list or voting under issue.
The issue can be implemented after final scheme and code implementation design being approved.
The main purpose of this is to avoid wasting time caused by different opinions on implementation design or reconstruction in the pull request review stage.
### Question
- How to deal with the user who raises an issue does not know the module corresponding to the issue.
It is true that most users when raising issue do not know which module the issue belongs to.
In fact, this is very common in many open source communities. In this case, the committer / contributor actually knows the module affected by the issue.
If the issue is really valuable after being approved by committer and contributor, then the committer can modify the issue title according to the specific module involved in the issue,
or leave a message to the user who raises the issue to modify it into the corresponding title.

View File

@ -0,0 +1,100 @@
# Micro BenchMark Notice
All optimization must be based on data verification, and blind optimization is rejected. Based on this, we provide the MicroBench module.
The MicroBench module is based on the OpenJDK JMH component (HotSpot's recommended benchmark test program). When you start benchmarking, you don't need additional dependencies.
JMH, the Java MicroBenchmark Harness, is a tool suite dedicated to code microbenchmark testing. What is Micro Benchmark? Simply put, it is based on method-level benchmark testing, with an accuracy of microseconds. When you locate a hot method and want to further optimize the performance of the method, you can use JMH to quantitatively analyze the optimized results.
### Several points to note in Java benchmark testing:
- Prevent useless code from entering the test method.
- Concurrent testing.
- The test results are presented.
### Typical application scenarios of JMH are:
- 1: Quantitatively analyze the optimization effect of a hotspot function
- 2: Want to quantitatively know how long a function needs to be executed, and the correlation between execution time and input variables
- 3: Compare multiple implementations of a function
DolphinScheduler-MicroBench provides AbstractBaseBenchmark, you can inherit from it, write your benchmark code, AbstractMicroBenchmark can guarantee to run in JUnit mode.
### Customized operating parameters
The default AbstractMicrobenchmark configuration is
Warmup times 10 (warmupIterations)
Number of tests 10 (measureIterations)
Fork quantity 2 (forkCount)
You can specify these parameters at startup-DmeasureIterations, -DperfReportDir (output benchmark test result file directory), -DwarmupIterations, -DforkCount
### DolphinScheduler-MicroBench Introduction
It is generally not recommended to use fewer cycles when running tests. However, a smaller number of tests helps to verify the work during the benchmark test. After the verification is over, run a large number of benchmark tests.
```java
@Warmup(iterations = 2, time = 1)
@Measurement(iterations = 4, time = 1)
@State(Scope.Benchmark)
public class EnumBenchMark extends AbstractBaseBenchmark {
}
```
This can run benchmarks at the method level or the class level. Command line parameters will override the parameters on the annotation.
```java
@Benchmark // Method annotation, indicating that the method is an object that needs to be benchmarked.
@BenchmarkMode(Mode.AverageTime) // Optional benchmark test mode is obtained through enumeration
@OutputTimeUnit(TimeUnit.MICROSECONDS) // Output time unit
public void enumStaticMapTest() {
TestTypeEnum.newGetNameByType(testNum);
}
```
When your benchmark test is written, you can run it to view the specific test conditions: (The actual results depend on your system configuration)
First, it will warm up our code,
```java
# Warmup Iteration 1: 0.007 us/op
# Warmup Iteration 2: 0.008 us/op
Iteration 1: 0.004 us/op
Iteration 2: 0.004 us/op
Iteration 3: 0.004 us/op
Iteration 4: 0.004 us/op
```
After warmup, we usually get the following results
```java
Benchmark (testNum) Mode Cnt Score Error Units
EnumBenchMark.simpleTest 101 thrpt 8 428750972.826 ± 66511362.350 ops/s
EnumBenchMark.simpleTest 108 thrpt 8 299615240.337 ± 290089561.671 ops/s
EnumBenchMark.simpleTest 103 thrpt 8 288423221.721 ± 130542990.747 ops/s
EnumBenchMark.simpleTest 104 thrpt 8 236811792.152 ± 155355935.479 ops/s
EnumBenchMark.simpleTest 105 thrpt 8 472247775.246 ± 45769877.951 ops/s
EnumBenchMark.simpleTest 103 thrpt 8 455473025.252 ± 61212956.944 ops/s
EnumBenchMark.enumStaticMapTest 101 avgt 8 0.006 ± 0.003 us/op
EnumBenchMark.enumStaticMapTest 108 avgt 8 0.005 ± 0.002 us/op
EnumBenchMark.enumStaticMapTest 103 avgt 8 0.006 ± 0.005 us/op
EnumBenchMark.enumStaticMapTest 104 avgt 8 0.006 ± 0.004 us/op
EnumBenchMark.enumStaticMapTest 105 avgt 8 0.004 ± 0.001 us/op
EnumBenchMark.enumStaticMapTest 103 avgt 8 0.004 ± 0.001 us/op
EnumBenchMark.enumValuesTest 101 avgt 8 0.011 ± 0.004 us/op
EnumBenchMark.enumValuesTest 108 avgt 8 0.025 ± 0.016 us/op
EnumBenchMark.enumValuesTest 103 avgt 8 0.019 ± 0.010 us/op
EnumBenchMark.enumValuesTest 104 avgt 8 0.018 ± 0.018 us/op
EnumBenchMark.enumValuesTest 105 avgt 8 0.014 ± 0.012 us/op
EnumBenchMark.enumValuesTest 103 avgt 8 0.012 ± 0.009 us/op
```
OpenJDK officially gave a lot of sample codes, interested students can query and learn JMH by themselves:[OpenJDK-JMH-Example](http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/)

View File

@ -0,0 +1,94 @@
# Pull Request Notice
## Preface
Pull Request is a way of software cooperation, which is a process of bringing code involving different functions into the trunk. During this process, the code can be discussed, reviewed, and modified.
In Pull Request, we try not to discuss the implementation of the code. The general implementation of the code and its logic should be determined in Issue. In the Pull Request, we only focus on the code format and code specification, so as to avoid wasting time caused by different opinions on implementation.
## Specification
### Pull Request Title
Title Format: [`Pull Request Type`-`Issue No`][`Module Name`] `Pull Request Description`
The corresponding relationship between `Pull Request Type` and `Issue Type` is as follows:
<table>
<thead>
<tr>
<th style="width: 10%; text-align: center;">Issue Type</th>
<th style="width: 20%; text-align: center;">Pull Request Type</th>
<th style="width: 20%; text-align: center;">Example(Suppose Issue No is 3333)</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">Feature</td>
<td style="text-align: center;">Feature</td>
<td style="text-align: center;">[Feature-3333][server] Implement xxx</td>
</tr>
<tr>
<td style="text-align: center;">Bug</td>
<td style="text-align: center;">Fix</td>
<td style="text-align: center;">[Fix-3333][server] Fix xxx</td>
</tr>
<tr>
<td style="text-align: center;">Improvement</td>
<td style="text-align: center;">Improvement</td>
<td style="text-align: center;">[Improvement-3333][alert] Improve the performance of xxx</td>
</tr>
<tr>
<td style="text-align: center;">Test</td>
<td style="text-align: center;">Test</td>
<td style="text-align: center;">[Test-3333][api] Add the e2e test of xxx</td>
</tr>
<tr>
<td style="text-align: center;">Sub-Task</td>
<td style="text-align: center;">(Parent type corresponding to Sub-Task)</td>
<td style="text-align: center;">[Feature-3333][server] Implement xxx</td>
</tr>
</tbody>
</table>
`Issue No` refers to the Issue number corresponding to the current Pull Request to be resolved, `Module Name` is the same as the `Module Name` of Issue.
### Pull Request Branch
Branch name format: `Pull Request type`-`Issue number`. e.g. Feature-3333
### Pull Request Content
Please refer to the commit message section.
### Pull Request Code Style
Code style is the thing you have to consider when you submit pull request for DolphinScheduler. We using [Checkstyle](https://checkstyle.sourceforge.io), a development tool to help programmers write Java code that adheres to a coding standard, in CI to keep DolphinScheduler codebase in the same style. Your pull request could not be merged if your code style checker failed. You could format your code by *Checkstyle* in your local environment before you submit your pull request to check code style. The activation step as below:
1. Prepare Checkstyle configuration file: You could download it manually by [click here](https://github.com/apache/dolphinscheduler/blob/3.0.0/style/checkstyle.xml), but find it in DolphinScheduler repository would be a better way. You could find configuration file in the path `style/checkstyle.xml` after you clone repository from Github.
2. Download Checkstyle plugins in Intellij IDEA: Search plugin by keyword **CheckStyle-IDEA** or install in [this page](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea). You could see [install plugin](https://www.jetbrains.com/help/idea/managing-plugins.html#install_plugin_from_repo) if you do not know how to install plugin in Intellij IDEA
3. Configure and activate Checkstyle and Intellij IDEA code-style: After completing the above steps, you could configure and activate it in your environment. You could find Checkstyle plugins in the path `Preferences -> Tool -> Checkstyle`. After that you could activate Checkstyles as screenshot show
<p align="center">
<img src="../../../../img/contribute/join/pull-request/checkstyle-idea.png" alt="checkstyle idea configuration" />
</p>
For now your Checkstyle plugins are setup, it would show codes and files which out of style. We highly recommend you configure Intellij IDEA code-style for auto-formatting your code in Intellij IDEA, you could find this setting in `Preferences -> Editor -> Code Style -> Java` and then activate it as screenshot show
<p align="center">
<img src="../../../../img/contribute/join/pull-request/code-style-idea.png" alt="code style idea configuration" />
</p>
1. Format your codebase in Intellij IDEA before submit your pull request: After you done above steps, you could using Intellij IDEA shortcut `Command + L`(for Mac) or `Ctrl+L`(for Windows) to format your code. The best time to format your code is before you commit your change to your local git repository.
### Question
- How to deal with one Pull Request to many Issues scenario.
First of all, there are fewer scenarios for one Pull Request to many Issues.
The root cause is that multiple issues need to do the same thing.
Usually, there are two solutions to this scenario: the first is to merge multiple issues with into the same issue, and then close the other issues;
the second is multiple issues have subtle differences.
In this scenario, the responsibilities of each issue can be clearly divided. The type of each issue is marked as Sub-Task, and then these sub task type issues are associated with one issue.
And each Pull Request is submitted should be associated with only one issue of a sub task.

View File

@ -0,0 +1,153 @@
# Community Review
Beside submit Issues and pull requests to the GitHub repository mentioned in [team](/us-en/community/community.html), another important way to
contribute to DolphinScheduler is reviewing GitHub Issues or Pull Requests. You can not only know the latest new and
direction of the community, but also understand the good design in others during you reviewing. At the same time, you can
increase your exposure in the community and accumulate your honor.
Anyone is encouraged to review Issues and Pull Requests. We also raise a Help Wanted email discussion to solicit contributors
from the community to review them. You could see detail in [mail][mail-review-wanted], we put the results of mail thread
in [GitHub Discussion][discussion-result-review-wanted].
> Note: It is only users mentioned in the [GitHub Discussion][discussion-result-review-wanted] can review Issues or Pull
> Requests, Community advocates **Anyone is encouraged to review Issues and Pull Requests**. Users in
> [GitHub Discussion][discussion-result-review-wanted] show their willing to review when we collect in the mail thread.
> The advantage of this list is when the community has discussion, in addition to the mention Members in [team](/us-en/community/community.html),
> you can also find some help in [GitHub Discussion][discussion-result-review-wanted] people. If you want to join the
> [GitHub Discussion][discussion-result-review-wanted], please comment in that discussion and leave a module you are interested
> in, and the maintainer will add you to the list.
## How Reviewing
DolphinScheduler receives community contributions through GitHub, and all its Issues and Pull Requests are hosted in GitHub.
If you want to join community by reviewing, please go to section [review Issues](#issues), if you prefer Pull Requests please
go to section [review Pull Requests](#pull-requests).
### Issues
Review Issues means discuss [Issues][all-issues] in GitHub and give suggestions on it. Include but are not limited to the following situations
| Situation | Reason | Label | Action |
| ------ | ------ | ------ | ------ |
| wont fix | Has been fixed in dev branch | [wontfix][label-wontfix] | Close Issue, inform creator the fixed version if it already release |
| duplicate issue | Had the same problem before | [duplicate][label-duplicate] | Close issue, inform creator the link of same issue |
| Description not clearly | Without detail reproduce step | [need more information][label-need-more-information] | Inform creator add more description |
In addition give suggestion, add label for issue is also important during review. The labeled issues can be retrieved
better, which convenient for further processing. An issue can with more than one label. Common issue categories are:
| Label | Meaning |
| ------ | ------ |
| [UI][label-UI] | UI and front-end related |
| [security][label-security] | Security Issue |
| [user experience][label-user-experience] | User experience Issue |
| [development][label-development] | Development Issue |
| [Python][label-Python] | Python Issue |
| [plug-in][label-plug-in] | Plug-in Issue |
| [document][label-document] | Document Issue |
| [docker][label-docker] | Docker Issue |
| [need verify][label-need-verify] | Need verify Issue |
| [e2e][label-e2e] | E2E Issue |
| [win-os][label-win-os] | windows operating system Issue |
| [suggestion][label-suggestion] | Give suggestion to us |
Beside classification, label could also set the priority of Issues. The higher the priority, the more attention pay
in the community, the easier it is to be fixed or implemented. The priority label are as follows
| Label | priority |
| ------ | ------ |
| [priority:high][label-priority-high] | High priority |
| [priority:middle][label-priority-middle] | Middle priority |
| [priority:low][label-priority-low] | Low priority |
All the labels above in common label. For all labels in this project you could see in [full label list][label-all-list]
Before reading following content, please make sure you have labeled the Issue.
* Remove label [Waiting for reply][label-waiting-for-reply] after replying: Label [Waiting for reply][label-waiting-for-reply]
added when [creating an Issue][issue-choose]. It makes positioning un reply issue more convenient, and you should remove
this label after you reviewed it. If you do not remove it, will cause others to waste time looking on the same issue.
* Mark [Waiting for review][label-waiting-for-review] when not sure whether issue is resolved or not: There are two situations
when you review issue. One is the problem has been located or resolved, maybe have to [Create PR](./submit-code.md)
when necessary. Secondly, you are not sure about this issue, you can labeled [Waiting for review][label-waiting-for-review]
and mention others to make a second confirmation.
When an Issue need to create Pull Requests, you could also labeled it from below.
| Label | Mean |
| ------ | ------ |
| [Chore][label-Chore] | Chore for project |
| [Good first issue][label-good-first-issue] | Good first issue for new contributor |
| [easy to fix][label-easy-to-fix] | Easy to fix, harder than `Good first issue` |
| [help wanted][label-help-wanted] | Help wanted |
> Note: Only members have permission to add or delete label. When you need to add or remove lebals but are not member,
> you can `@` members to do that. But as long as you have a GitHub account, you can comment on issues and give suggestions.
> We encourage everyone in the community to comment and answer issues
### Pull Requests
<!-- markdown-link-check-disable -->
Review Pull mean discussing in [Pull Requests][all-PRs] in GitHub and giving suggestions to it. DolphinScheduler's
Pull Requests reviewing are the same as [GitHub's reviewing changes in pull requests][gh-review-pr]. You can give your
suggestions in Pull Requests
* When you think the Pull Request is OK to be merged, you can agree to the Pull Request according to the "Approve" process
in [GitHub's reviewing changes in pull requests][gh-review-pr].
* When you think Pull Request needs to be changed, you can comment it according to the "Comment" process in
[GitHub's reviewing changes in pull requests][gh-review-pr]. And when you think issues that must be fixed before they
merged, please follow "Request changes" in [GitHub's reviewing changes in pull requests][gh-review-pr] to ask contributors
modify it.
<!-- markdown-link-check-enable -->
Labeled Pull Requests is an important part. Reasonable classification can save a lot of time for reviewers. The good news
is that the label's name and usage of Pull Requests are the same in [Issues](#issues), which can reduce the memory. For
example, if there is a Pull Request is related to docker and block deployment. We can label it with [docker][label-docker]
and [priority:high][label-priority-high].
Pull Requests have some unique labels of it own
| Label | Mean |
| ------ | ------ |
| [miss document][label-miss-document] | Pull Requests miss document, and should be add |
| [first time contributor][label-first-time-contributor] | Pull Requests submit by first time contributor |
| [don't merge][label-do-not-merge] | Pull Requests have some problem and should not be merged |
> Note: Only members have permission to add or delete label. When you need to add or remove lebals but are not member,
> you can `@` members to do that. But as long as you have a GitHub account, you can comment on Pull Requests and give suggestions.
> We encourage everyone in the community to review Pull Requests
[mail-review-wanted]: https://lists.apache.org/thread/9flwlzrp69xjn6v8tdkbytq8glqp2k51
[discussion-result-review-wanted]: https://github.com/apache/dolphinscheduler/discussions/7545
[label-wontfix]: https://github.com/apache/dolphinscheduler/labels/wontfix
[label-duplicate]: https://github.com/apache/dolphinscheduler/labels/duplicate
[label-need-more-information]: https://github.com/apache/dolphinscheduler/labels/need%20more%20information
[label-win-os]: https://github.com/apache/dolphinscheduler/labels/win-os
[label-waiting-for-reply]: https://github.com/apache/dolphinscheduler/labels/Waiting%20for%20reply
[label-waiting-for-review]: https://github.com/apache/dolphinscheduler/labels/Waiting%20for%20review
[label-user-experience]: https://github.com/apache/dolphinscheduler/labels/user%20experience
[label-development]: https://github.com/apache/dolphinscheduler/labels/development
[label-UI]: https://github.com/apache/dolphinscheduler/labels/UI
[label-suggestion]: https://github.com/apache/dolphinscheduler/labels/suggestion
[label-security]: https://github.com/apache/dolphinscheduler/labels/security
[label-Python]: https://github.com/apache/dolphinscheduler/labels/Python
[label-plug-in]: https://github.com/apache/dolphinscheduler/labels/plug-in
[label-document]: https://github.com/apache/dolphinscheduler/labels/document
[label-docker]: https://github.com/apache/dolphinscheduler/labels/docker
[label-all-list]: https://github.com/apache/dolphinscheduler/labels
[label-Chore]: https://github.com/apache/dolphinscheduler/labels/Chore
[label-good-first-issue]: https://github.com/apache/dolphinscheduler/labels/good%20first%20issue
[label-help-wanted]: https://github.com/apache/dolphinscheduler/labels/help%20wanted
[label-easy-to-fix]: https://github.com/apache/dolphinscheduler/labels/easy%20to%20fix
[label-priority-high]: https://github.com/apache/dolphinscheduler/labels/priority%3Ahigh
[label-priority-middle]: https://github.com/apache/dolphinscheduler/labels/priority%3Amiddle
[label-priority-low]: https://github.com/apache/dolphinscheduler/labels/priority%3Alow
[label-miss-document]: https://github.com/apache/dolphinscheduler/labels/miss%20document
[label-first-time-contributor]: https://github.com/apache/dolphinscheduler/labels/first%20time%20contributor
[label-do-not-merge]: https://github.com/apache/dolphinscheduler/labels/don%27t%20merge
[label-e2e]: https://github.com/apache/dolphinscheduler/labels/e2e
[label-need-verify]: https://github.com/apache/dolphinscheduler/labels/need%20to%20verify
[issue-choose]: https://github.com/apache/dolphinscheduler/issues/new/choose
[all-issues]: https://github.com/apache/dolphinscheduler/issues
[all-PRs]: https://github.com/apache/dolphinscheduler/pulls
[gh-review-pr]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews

View File

@ -0,0 +1,8 @@
# Security
The Apache Software Foundation takes a rigorous stance on eliminating security issues in its software projects. Apache DolphinScheduler is also very concerned Security issues related to its features and functionality.
If you have apprehensions regarding DolphinSchedulers security or you discover vulnerability or potential threat, dont hesitate to get in touch with the Apache Security Team by dropping a mail at [security@apache.org](mailto:security@apache.org). Please specify the project name as DolphinScheduler in the email and provide a description of the relevant problem or potential threat. You are also urged to recommend the way to reproduce and replicate the issue. The apache security team and the DolphinScheduler community will get back to you after assessing and analysing the findings.
Please pay attention to report the security issue on the security email before disclosing it on public domain.

View File

@ -0,0 +1,63 @@
# Submit Code
* First from the remote repository *https://github.com/apache/dolphinscheduler.git* fork a copy of the code into your own repository
* There are currently three branches in the remote repository:
* master normal delivery branch
After the stable release, merge the code from the stable branch into the master.
    
* dev daily development branch
Every day dev development branch, newly submitted code can pull request to this branch.
* Clone your repository to your local
`git clone https://github.com/apache/dolphinscheduler.git`
* Add remote repository address, named upstream
`git remote add upstream https://github.com/apache/dolphinscheduler.git`
* View repository
    `git remote -v`
>At this time, there will be two repositories: origin (your own repository) and upstream (remote repository)
* Get/Update remote repository code
    `git fetch upstream`
* Synchronize remote repository code to local repository
```
git checkout origin/dev
git merge --no-ff upstream/dev
```
If remote branch has a new branch such as `dev-1.0`, you need to synchronize this branch to the local repository
```
git checkout -b dev-1.0 upstream/dev-1.0
git push --set-upstream origin dev-1.0
```
* Create new branch
```
git checkout -b xxx origin/dev
```
Make sure that the branch `xxx` is building successfully on the latest code of the official dev branch
* After modifying the code locally in the new branch, submit it to your own repository:
`git commit -m 'commit content'`
`git push origin xxx --set-upstream`
* Submit changes to the remote repository
* On the github page, click "New pull request".
* Select the modified local branch and the branch you want to merge with the past, click "Create pull request".
* Then the community Committers will do CodeReview, and then he will discuss some details (including design, implementation, performance, etc.) with you. When everyone on the team is satisfied with this modification, the commit will be merged into the dev branch
* Finally, congratulations, you have become an official contributor to dolphinscheduler!

View File

@ -0,0 +1,23 @@
# Subscribe Mailing Lists
It is highly recommended to subscribe to the development mailing list to keep up-to-date with the community.
In the process of using DolphinScheduler, if you have any questions or ideas, suggestions, you can participate in the DolphinScheduler community building through the Apache mailing list. Sending a subscription email is also very simple, the steps are as follows:
1. Send an email to dev-subscribe@dolphinscheduler.apache.org with your own email address, subject and content are arbitrary.
2. Receive confirmation email and reply. After completing step 1, you will receive a confirmation email from dev-help@dolphinscheduler.apache.org (if not received, please confirm whether the email is automatically classified as spam, promotion email, subscription email, etc.) . Then reply directly to the email, or click on the link in the email to reply quickly, the subject and content are arbitrary.
3. Receive a welcome email. After completing the above steps, you will receive a welcome email with the subject WELCOME to dev@dolphinscheduler.apache.org, and you have successfully subscribed to the Apache DolphinScheduler mailing list.
# Unsubscribe Mailing Lists
If you do not need to know what's going on with DolphinScheduler, you can unsubscribe from the mailing list.
Unsubscribe from the mailing list steps are as follows:
1. Send an email to dev-unsubscribe@dolphinscheduler.apache.org with your subscribed email address, subject and content are arbitrary.
2. Receive confirmation email and reply. After completing step 1, you will receive a confirmation email from dev-help@dolphinscheduler.apache.org (if not received, please confirm whether the email is automatically classified as spam, promotion email, subscription email, etc.) . Then reply directly to the email, or click on the link in the email to reply quickly, the subject and content are arbitrary.
3. Receive a goodbye email. After completing the above steps, you will receive a goodbye email with the subject GOODBYE from dev@dolphinscheduler.apache.org, and you have successfully unsubscribed to the Apache DolphinScheduler mailing list, and you will not receive emails from dev@dolphinscheduler.apache.org.

View File

@ -0,0 +1,118 @@
## Unit Test Coverage
### 1. The Benefits of Writing Unit Tests
- Unit tests help everyone to get into the details of the code and understand how it works.
- Through test cases we can find bugs and submit robust code.
- The test case is also a demo usage of the code.
### 2. Some design principles for unit test cases
- The steps, granularity and combination of conditions should be carefully designed.
- Pay attention to boundary conditions.
- Unit tests should be well designed as well as avoiding useless code.
- When you find a `method` is difficult to write unit test, and if you confirm that the `method` is `bad code`, then refactor it with the developer.
<!-- markdown-link-check-disable -->
- DolphinScheduler: [mockito](http://site.mockito.org/). Here are some development guides: [mockito tutorial](http://www.baeldung.com/bdd-mockito), [mockito refcard](https://dzone.com/refcardz/mockito)
<!-- markdown-link-check-enable -->
- TDD(option): When you start writing a new feature, you can try writing test cases first.
### 3. Test coverage setpoint
- At this stage, the default value for test coverage of Delta change codes is >= 60%, the higher the better.
- We can see the test reports on this page: https://codecov.io/gh/apache/dolphinscheduler
## Fundamental guidelines for unit test
### 1. Isolation and singleness
A test case should be accurate to the method level, and it should be possible to execute the test case alone. At the same time the focus is always on the method (only the method is tested).
If the method is too complex, it should be split up again during the development phase. For test cases, it is best that a case focuses on only one branch (judgment). When changes are applied to it, they only affect the success of a test case. This will greatly facilitate our verification of issues and problem solving during the development phase. At the same time, however, it also poses a great challenge in terms of coverage.
### 2. Automaticity
Unit tests can be automated. Mandatory: all unit tests must be written under src/test. Also the method naming should conform to the specification. Benchmark tests are excluded.
### 3. reproducibility
Multiple executions (any environment, any time) result in unique and repeatable results.
### 4. Lightweight
That is, any environment can be implemented quickly.
This requires that we don't rely on too many components, such as various spring beans and the like. These are all mock in unit tests, nd adding them would increase the speed of our single-test execution, as well as potentially passing on contamination.
For some databases, other external components, etc. As far as possible, the mock client is not dependent on the external environment (the presence of any external dependencies greatly limits the portability and stability of test cases and the correctness of results), which also makes it easy for developers to test in any environment.
### 5. Measurable
Over the years, mockito has grown to be the NO.1 mock, but it still doesn't support mock static methods, constructors, etc. Even the website keeps saying: "Don't mock everything". So use static methods as little as possible.
It is generally recommended to provide static methods only in some utility classes, in which case you don't need mocks and just use real classes. If the dependent class is not a utility class, static methods can be refactored into instance methods. This is more in line with the object-oriented design concept.
### 6. Completeness
Test coverage, this is a very difficult problem. For the core process, we hope to achieve 90% coverage, non-core process requirements more than 60%.
High enough coverage will reduce the probability of bugs and also reduce the cost of our regression tests. This is a long process, and whenever developers add or modify code, test cases need to be refined at the same time. We hope developers and relevant code reviewer will pay enough attention to this point.
### 7. Refusion invalid assertion
Invalid assertions make the test itself meaningless, it has little to do with whether your code is correct or not. And there is a risk of creating an illusion of success that may last until your code is deploying to production.
There are several types of invalid assertions:
1. Different types of comparisons.
2. Determines that an object or variable with a default value is not null.
This seems meaningless. Therefore, when making the relevant judgements you should pay attention to whether it contains a default value itself.
3. Assertions should be affirmative rather than negative if possible. Assertions should be within a range of predicted results, or exact values, whenever possible (otherwise you may end up with something that doesn't match your actual expectations but passes the assertion) unless your code only cares about whether it is empty or not.
### 8. Some points to note for unit tests
1: Thread.sleep()
Try not to use Thread.sleep in your test code, it makes the test unstable and may fail unexpectedly due to the environment or load. The following approach is recommended.
`Awaitility.await().atMost(...)`
2: Ignore some test classes
The @Ignore annotation should be linked to the relevant issue address so that subsequent developers can track the history of why the test was ignored.
For example @Ignore("see #1").
3: try-catch Unit test exception
The test will fail when the code in the unit test throws an exception. Therefore, there is no need to use try-catch to catch exceptions.
```java
@Test
public void testMethod() {
try {
// Some code
} catch (MyException e) {
Assert.fail(e.getMessage()); // Noncompliant
}
}
```
You should this:
```java
@Test
public void testMethod() throws MyException {
// Some code
}
```
4: Test exceptions
When you need to test for exceptions, you should avoid including multiple method invocations in your test code (especially if there are multiple methods that can raise the same exception), and you should clearly state what you are testing for.
5: Refuse to use MockitoJUnitRunner.Silent.class
When an UnnecessaryStubbingException occurs in a unit test, do not first consider using @RunWith(MockitoJUnitRunner.Silent.class) to resolve it. This just hides the problem, and you should follow the exception hint to resolve the issue in question, which is not a difficult task. When the changes are done, you will find that your code is much cleaner again.

View File

@ -0,0 +1,32 @@
# Release Post
We still have some publish task to do after we send the announcement mail, currently we have to publish Docker images to
Docker Hub and also publish pydolphinscheduler to PyPI.
## Publish Docker Image
we already have the exists CI to publish the latest Docker image to GitHub container register with [config](https://github.com/apache/dolphinscheduler/blob/d80cf21456265c9d84e642bdb4db4067c7577fc6/.github/workflows/publish-docker.yaml#L55-L63).
We could reuse the main command the CI run and publish our Docker images to Docker Hub by single command.
```bash
# Please change the <VERSION> place hold to the version you release
./mvnw -B clean deploy \
-Dmaven.test.skip \
-Dmaven.javadoc.skip \
-Dmaven.checkstyle.skip \
-Dmaven.deploy.skip \
-Ddocker.tag=<VERSION> \
-Ddocker.hub=apache \
-Pdocker,release
```
## Publish pydolphinscheduler to PyPI
Python API need to release to PyPI for easier download and use, you can see more detail in [Python API release](https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-python/pydolphinscheduler/RELEASE.md#to-pypi)
to finish PyPI release.
## Get All Contributors
You might need all contributors in current release when you want to publish the release news or announcement, you could
use the git command `git log --pretty="%an" <PREVIOUS-RELEASE-SHA>..<CURRENT-RELEASE-SHA> | sort | uniq` to auto generate
the git author name.

View File

@ -0,0 +1,31 @@
# Release Preparation
## Check release-docs
Compared with the last release, the `release-docs` of the current release needs to be updated to the latest, if there are dependencies and versions changes
- `dolphinscheduler-dist/release-docs/LICENSE`
- `dolphinscheduler-dist/release-docs/NOTICE`
- `dolphinscheduler-dist/release-docs/licenses`
## Update Version
For example, to release `x.y.z`, the following updates are required:
- Version in the code:
- `sql`:
- `dolphinscheduler_mysql.sql`: `t_ds_version` needs to be updated to x.y.z
- `dolphinscheduler_postgre.sql`: `t_ds_version` needs to be updated to x.y.z
- `dolphinscheduler_h2.sql`: `t_ds_version` needs to be updated to x.y.z
- `upgrade`: whether to add`x.y.z_schema`
- `soft_version`: need to be updated to x.y.z
- `deploy/docker/.env`: `HUB` change to `apache``TAG` change to `x.y.z`
- `deploy/kubernetes/dolphinscheduler`:
- `Chart.yaml`: `appVersion` needs to be updated to x.y.z (`version` is helm chart versionincremented and different from x.y.z)
- `values.yaml`: `image.tag` needs to be updated to x.y.z
- `dolphinscheduler-python/pydolphinscheduler/setup.py`: change `version` to x.y.z
- Version in the docs:
- Change the placeholder `<version>`(except `pom`) to the `x.y.z` in directory `docs`
- Add new history version
- `docs/docs/en/history-versions.md` and `docs/docs/zh/history-versions.md`: Add the new version and link for `x.y.z`
- `docs/configs/docsdev.js`: change `/dev/` to `/x.y.z/`

View File

@ -0,0 +1,540 @@
# Release Guide
## Check Your Environment
To make sure you could successfully complete the release for DolphinScheduler, you should check your environment and make sure
all conditions are met, if any or them are missing, you should install them and make sure them work.
```shell
# JDK 1.8 above is requests
java -version
# Maven requests
mvn -version
# Python 3.6 above is requests, and you have to make keyword `python` work in your terminal and version match
python --version
```
## GPG Settings
### Install GPG
Download installation package on [official GnuPG website](https://www.gnupg.org/download/index.html).
The command of GnuPG 1.x version can differ a little from that of 2.x version.
The following instructions take `GnuPG-2.1.23` version for example.
After the installation, execute the following command to check the version number.
```shell
gpg --version
```
### Create Key
After the installation, execute the following command to create key.
This command indicates `GnuPG-2.x` can be used:
```shell
gpg --full-gen-key
```
This command indicates `GnuPG-1.x` can be used:
```shell
gpg --gen-key
```
Finish the key creation according to instructions, **Notice: Please use Apache mails and its password for key creation.**
```shell
gpg (GnuPG) 2.0.12; Copyright (C) 2009 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Please select what kind of key you want:
(1) RSA and RSA (default)
(2) DSA and Elgamal
(3) DSA (sign only)
(4) RSA (sign only)
Your selection? 1
RSA keys may be between 1024 and 4096 bits long.
What keysize do you want? (2048) 4096
Requested keysize is 4096 bits
Please specify how long the key should be valid.
0 = key does not expire
<n> = key expires in n days
<n>w = key expires in n weeks
<n>m = key expires in n months
<n>y = key expires in n years
Key is valid for? (0)
Key does not expire at all
Is this correct? (y/N) y
GnuPG needs to construct a user ID to identify your key.
Real name: ${Input username}
Email address: ${Input email}
Comment: ${Input comment}
You selected this USER-ID:
"${Inputed username} (${Inputed comment}) <${Inputed email}>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key. # Input your Apache mail passwords
```
### Check Generated Key
```shell
gpg --list-keys
```
Execution Result:
```shell
pub 4096R/85E11560 2019-11-15
uid ${Username} (${Comment}) <{Email}>
sub 4096R/A63BC462 2019-11-15
```
Among them, 85E11560 is public key ID.
### Upload the Public Key to Key Server
The command is as follow:
```shell
gpg --keyserver hkp://pool.sks-keyservers.net --send-key 85E11560
```
`pool.sks-keyservers.net` is randomly chosen from [public key server](https://sks-keyservers.net/status/).
Each server will automatically synchronize with one another, so it would be okay to choose any one, a backup keys servers
is `gpg --keyserver hkp://keyserver.ubuntu.com --send-key <YOUR_KEY_ID>`
## Apache Maven Central Repository Release
### Set `settings-security.xml` and `settings.xml`
In this section, we add Apache server maven configuration to prepare the release, we have to add `settings-security.xml` according
to [here](http://maven.apache.org/guides/mini/guide-encryption.html) firstly and then change your `~/.m2/settings.xml` like below
```xml
<settings>
<servers>
<server>
<id>apache.snapshots.https</id>
<username> <!-- APACHE LDAP username --> </username>
<password> <!-- APACHE LDAP encrypted password --> </password>
</server>
<server>
<id>apache.releases.https</id>
<username> <!-- APACHE LDAP username --> </username>
<password> <!-- APACHE LDAP encrypted password --> </password>
</server>
</servers>
</settings>
```
### Set Release in Environment
We will use the release version, your github name and your Apache username below several times, so it is better to store
it to bash variable for easier use.
```shell
VERSION=<THE-VERSION-YOU-RELEASE>
GH_USERNAME=<YOUR-GITHUB-USERNAME>
A_USERNAME=<YOUR-APACHE-USERNAME>
```
> Note: We can use the variable directly in you bash after we set environment, without changing anything. For example, we
> can use command `git clone -b "${VERSION}"-prepare https://github.com/apache/dolphinscheduler.git` to clone the release branch
> and it can be success by covert the `"${VERSION}"` to `<THE-VERSION-YOU-RELEASE>`. But you have to change `<VERSION>` manually in
> some of not bash step like [vote mail](#vote-procedure), we using `<VERSION>` instead of `"${VERSION}"` to notice release
> manager they have to change by hand.
### Create Release Branch
In this section, we dwonload source code from github and create new branch to release
```shell
git clone -b "${VERSION}"-prepare https://github.com/apache/dolphinscheduler.git
cd ~/dolphinscheduler/
git pull
git checkout -b "${VERSION}"-release
git push origin "${VERSION}"-release
```
### Pre-Release Check
```shell
# make gpg command could be run in maven correct
export GPG_TTY=$(tty)
mvn release:prepare -Prelease,python -Darguments="-Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true" -DautoVersionSubmodules=true -DdryRun=true -Dusername="${GH_USERNAME}"
```
* `-Prelease,python`: choose release and python profile, which will pack all the source codes, jar files and executable binary packages, and Python distribute package.
* `-DautoVersionSubmodules=true`: it can make the version number is inputted only once and not for each sub-module.
* `-DdryRun=true`: dry run which means not to generate or submit new version number and new tag.
### Prepare for the Release
First, clean local pre-release check information.
```shell
mvn release:clean
```
Then, prepare to execute the release.
```shell
mvn release:prepare -Prelease,python -Darguments="-Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true" -DautoVersionSubmodules=true -DpushChanges=false -Dusername="${GH_USERNAME}"
```
It is basically the same as the previous rehearsal command, but deleting `-DdryRun=true` parameter.
* `-DpushChanges=fals`: do not submit the edited version number and tag to GitHub automatically.
> Note: You have to config your git `user.name` and `user.password` by command `git config --global user.email "you@example.com"`
> and `git config --global user.name "Your Name"` if you meet some mistake like **Please tell me who you are.**
> from git.
After making sure there is no mistake in local files, submit them to GitHub.
```shell
git push -u origin "${VERSION}"-release
git push origin --tags
```
<!-- markdown-link-check-disable -->
> Note1: In this step, you should use github token for password because native password no longer supported, you can see
> https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token for more
> detail about how to create token about it.
> Note2: After the command done, it will auto-created `release.properties` file and `*.Backup` files, their will be need
> in the following command and DO NOT DELETE THEM
<!-- markdown-link-check-enable -->
### Deploy the Release
```shell
mvn release:perform -Prelease,python -Darguments="-Dmaven.test.skip=true -Dcheckstyle.skip=true -Dmaven.javadoc.skip=true" -DautoVersionSubmodules=true -Dusername="${GH_USERNAME}"
```
After that command is executed, the version to be released will be uploaded to Apache staging repository automatically.
Go to [apache staging repositories](https://repository.apache.org/#stagingRepositories) and login by Apache LDAP. then you can see the uploaded version, the content of `Repository` column is the `${STAGING.REPOSITORY}`.
Click `Close` to tell Nexus that the construction is finished, because only in this way, this version can be usable.
If there is any problem in gpg signature, `Close` will fail, but you can see the failure information through `Activity`.
## Apache SVN Repository Release
### Checkout dolphinscheduler Release Directory
If there is no local work directory, create one at first.
```shell
mkdir -p ~/ds_svn/dev/
cd ~/ds_svn/dev/
```
After the creation, checkout dolphinscheduler release directory from Apache SVN.
```shell
svn --username="${A_USERNAME}" co https://dist.apache.org/repos/dist/dev/dolphinscheduler
cd ~/ds_svn/dev/dolphinscheduler
```
### Add gpg Public Key
Only the account in its first deployment needs to add that.
It is alright for `KEYS` to only include the public key of the deployed account.
```shell
gpg -a --export <YOUR-GPG-KEY-ID> >> KEYS
```
### Add the Release Content to SVN Directory
Create folder by version number.
```shell
mkdir -p ~/ds_svn/dev/dolphinscheduler/"${VERSION}"
mkdir -p ~/ds_svn/dev/dolphinscheduler/"${VERSION}"/python
cd ~/ds_svn/dev/dolphinscheduler/"${VERSION}"
```
Add source code packages, binary packages and executable binary packages to SVN working directory.
```shell
# Source and binary tarball for main code
cp -f ~/dolphinscheduler/dolphinscheduler-dist/target/*.tar.gz ~/ds_svn/dev/dolphinscheduler/"${VERSION}"
cp -f ~/dolphinscheduler/dolphinscheduler-dist/target/*.tar.gz.asc ~/ds_svn/dev/dolphinscheduler/"${VERSION}"
# Source and binary tarball for Python API
cp -f ~/dolphinscheduler/dolphinscheduler-dist/target/python/* ~/ds_svn/dev/dolphinscheduler/"${VERSION}"/python
```
### Generate sign files
```shell
shasum -a 512 apache-dolphinscheduler-"${VERSION}"-src.tar.gz >> apache-dolphinscheduler-"${VERSION}"-src.tar.gz.sha512
shasum -b -a 512 apache-dolphinscheduler-"${VERSION}"-bin.tar.gz >> apache-dolphinscheduler-"${VERSION}"-bin.tar.gz.sha512
cd python
shasum -a 512 apache-dolphinscheduler-python-"${VERSION}".tar.gz >> apache-dolphinscheduler-python-"${VERSION}".tar.gz.sha512
shasum -b -a 512 apache_dolphinscheduler-python-"${VERSION}"-py3-none-any.whl >> apache_dolphinscheduler-python-"${VERSION}"-py3-none-any.whl.sha512
cd ../
```
### Commit to Apache SVN
```shell
cd ~/ds_svn/dev/dolphinscheduler
svn add *
svn --username="${A_USERNAME}" commit -m "release ${VERSION}"
```
## Check Release
### Check sha512 hash
```shell
shasum -c apache-dolphinscheduler-"${VERSION}"-src.tar.gz.sha512
shasum -c apache-dolphinscheduler-"${VERSION}"-bin.tar.gz.sha512
cd python
shasum -c apache-dolphinscheduler-python-"${VERSION}".tar.gz.sha512
shasum -c apache_dolphinscheduler-python-"${VERSION}"-py3-none-any.whl.sha512
cd ../
```
### Check gpg Signature
First, import releaser's public key.
Import KEYS from SVN repository to local. (The releaser does not need to import again; the checking assistant needs to import it, with the user name filled as the releaser's. )
```shell
curl https://dist.apache.org/repos/dist/dev/dolphinscheduler/KEYS >> KEYS
gpg --import KEYS
gpg --edit-key "${A_USERNAME}"
> trust
Please decide how far you trust this user to correctly verify other users' keys
(by looking at passports, checking fingerprints from different sources, etc.)
1 = I don't know or won't say
2 = I do NOT trust
3 = I trust marginally
4 = I trust fully
5 = I trust ultimately
m = back to the main menu
Your decision? 5
> save
```
Then, check the gpg signature.
```shell
gpg --verify apache-dolphinscheduler-"${VERSION}"-src.tar.gz.asc
gpg --verify apache-dolphinscheduler-"${VERSION}"-bin.tar.gz.asc
cd python
gpg --verify apache-dolphinscheduler-python-"${VERSION}".tar.gz.asc
gpg --verify apache_dolphinscheduler-python-"${VERSION}"-py3-none-any.whl.asc
cd ../
```
> Note: You have to create gpg signature manually when you can not find your `asc` file, the command
> `gpg --armor --detach-sign --digest-algo=SHA512 apache-dolphinscheduler-"${VERSION}"-bin.tar.gz` and
> `gpg --armor --detach-sign --digest-algo=SHA512 apache-dolphinscheduler-"${VERSION}"-src.tar.gz` will create them
### Check Released Files
#### Check source package
Decompress `apache-dolphinscheduler-<VERSION>-src.tar.gz` and `python/apache-dolphinscheduler-python-<VERSION>.tar.gz` then check the following items:
* Check whether source tarball is oversized for including nonessential files
* `LICENSE` and `NOTICE` files exist
* Correct year in `NOTICE` file
* There is only text files but no binary files
* All source files have ASF headers
* Codes can be compiled and pass the unit tests (mvn install)
* The contents of the release match with what's tagged in version control (diff -r a verify_dir tag_dir)
* Check if there is any extra files or folders, empty folders for example
#### Check binary packages
Decompress `apache-dolphinscheduler-<VERSION>-src.tar.gz` and `python/apache-dolphinscheduler-python-<VERSION>-bin.tar.gz`
to check the following items:
- `LICENSE` and `NOTICE` files exist
- Correct year in `NOTICE` file
- Check the third party dependency license:
- The software have a compatible license
- All software licenses mentioned in `LICENSE`
- All the third party dependency licenses are under `licenses` folder
- If it depends on Apache license and has a `NOTICE` file, that `NOTICE` file need to be added to `NOTICE` file of the release
## Call for a Vote
### Update Release Notes
You should create a release note in GitHub by [new release note](https://github.com/apache/dolphinscheduler/releases/new).
It should be done before vote mail because we need the release note in the mail. You could use command
`git log --pretty="- %s" <PREVIOUS-RELEASE-SHA>..<CURRENT-RELEASE-SHA> > changelog.md` to creat the changelog(some log
maybe not correct, you should filter them by yourself) and classify them and paste them to GitHub release note page
### Vote procedure
1. DolphinScheduler community vote: send the vote e-mail to `dev@dolphinscheduler.apache.org`.
PMC needs to check the rightness of the version according to the document before they vote.
After at least 72 hours and with at least 3 `+1 and no -1 PMC member` votes, it can come to the next stage of the vote.
2. Announce the vote result: send the result vote e-mail to `dev@dolphinscheduler.apache.org`
### Vote Templates
#### DolphinScheduler Community Vote Template
Title
```txt
[VOTE] Release Apache DolphinScheduler <VERSION>
```
Body
```txt
Hello DolphinScheduler Community,
This is a call for vote to release Apache DolphinScheduler version <VERSION>
Release notes: https://github.com/apache/dolphinscheduler/releases/tag/<VERSION>
The release candidates: https://dist.apache.org/repos/dist/dev/dolphinscheduler/<VERSION>/
Maven 2 staging repository: https://repository.apache.org/content/repositories/<VERSION>/org/apache/dolphinscheduler/
Git tag for the release: https://github.com/apache/dolphinscheduler/tree/<VERSION>
Release Commit ID: https://github.com/apache/dolphinscheduler/commit/<SHA-VALUE>
Keys to verify the Release Candidate: https://dist.apache.org/repos/dist/dev/dolphinscheduler/KEYS
Look at here for how to verify this release candidate: https://dolphinscheduler.apache.org/en-us/community/release.html
The vote will be open for at least 72 hours or until necessary number of votes are reached.
Please vote accordingly:
[ ] +1 approve
[ ] +0 no opinion
[ ] -1 disapprove with the reason
Checklist for reference:
[ ] Download links are valid.
[ ] Checksums and PGP signatures are valid.
[ ] Source code artifacts have correct names matching the current release.
[ ] LICENSE and NOTICE files are correct for each DolphinScheduler repo.
[ ] All files have license headers if necessary.
[ ] No compiled archives bundled in source archive.
```
2. Announce the vote result:
Body
```txt
The vote to release Apache DolphinScheduler <VERSION> has passed.Here is the vote result,
4 PMC member +1 votes:
xxx
xxx
xxx
xxx
1 community +1 vote:
xxx
Thanks everyone for taking time to check this release and help us.
```
## Finish the Release
### Move source packages, binary packages from the `dev` directory to `release` directory
```shell
svn mv https://dist.apache.org/repos/dist/dev/dolphinscheduler/"${VERSION}" https://dist.apache.org/repos/dist/release/dolphinscheduler/
```
### Export you new gpg KEYS from dev to release(optional)
Only if the first time you release with this gpg KEY, including it is you first release or you change your KEY
```shell
mkdir -p ~/ds_svn/release/
cd ~/ds_svn/release/
svn --username="${A_USERNAME}" co https://dist.apache.org/repos/dist/release/dolphinscheduler
gpg -a --export <YOUR-GPG-KEY-ID> >> KEYS
svn add *
svn --username="${A_USERNAME}" commit -m "new key <YOUR-GPG-KEY-ID> add"
```
### Update Document
Website should be present before you send the announce mail this section will tell you how to change the website. For example,
the release version is `<VERSION>`, the following updates are required(note it will take effect immediately when the PR is merged):
- Repository **apache/dolphinscheduler-website**:
- `download/en-us/download.md` and `download/zh-cn/download.md`: add the download of the `<VERSION>` release package
- `scripts/conf.sh`: Add new release version `<VERSION>` key-value pair to variable `DEV_RELEASE_DOCS_VERSIONS`
- Repository **apache/dolphinscheduler**:
- `docs/configs/site.js`:
- `docsLatest`: update to `<VERSION>`
- `docs0`: The `text` of two places of `en-us/zh-cn` needs to be updated to `latest(<VERSION>)`
- `docsxyz`: Add a drop-down menu with `key` as `docsxyz` and `text` as `<VERSION>` in `children` of two places of `en-us/zh-cn`
- `docs/configs/index.md.jsx`: Add `<VERSION>: docsxyzConfig`
- `docs/docs/en/history-versions.md` and `docs/docs/zh/history-versions.md`: Add new `<VERSION>` release docs.
- `.github/ISSUE_TEMPLATE/bug-report.yml`: DolphinScheduler's GitHub [bug-report](https://github.com/apache/dolphinscheduler/blob/dev/.github/ISSUE_TEMPLATE/bug-report.yml)
issue template have **Version** selection bottom. So after we release DolphinScheduler we should and the new `<VERSION>` to
bug-report.yml
### Find DolphinScheduler in [apache staging repositories](https://repository.apache.org/#stagingRepositories) and click `Release`
### Send Announcement E-mail Community
You should send announcement E-mail after release process finished. The E-mail should send to `dev@dolphinscheduler.apache.org`
and cc to `announce@apache.org`.
Announcement e-mail template as below
Title
```txt
[ANNOUNCE] Release Apache DolphinScheduler <VERSION>
```
Body
```txt
Hi all,
We are glad to announce the release of Apache DolphinScheduler <VERSION>. Once again I would like to express my thanks to your help.
Dolphin Scheduler is a distributed and easy-to-extend visual workflow scheduler system,
dedicated to solving the complex task dependencies in data processing, making the scheduler system out of the box for data processing.
Download Links: https://dolphinscheduler.apache.org/en-us/download/download.html
Release Notes: https://github.com/apache/dolphinscheduler/releases/tag/<VERSION>
Website: https://dolphinscheduler.apache.org/
DolphinScheduler Resources:
- Issue: https://github.com/apache/dolphinscheduler/issues/
- Mailing list: dev@dolphinscheduler.apache.org
- Documents: https://dolphinscheduler.apache.org/zh-cn/docs/<VERSION>/user_doc/about/introduction.html
```

View File

@ -23,7 +23,8 @@ Note**Due to the large number of services, it is recommended that the single-
## Q: Which mailboxes does the system support? ## Q: Which mailboxes does the system support?
A: Support most mailboxes, qq, 163, 126, 139, outlook, aliyun, etc. are supported. Support TLS and SSL protocols, optionally configured in alert.properties A: Support most mailboxes, qq, 163, 126, 139, outlook, aliyun, etc. are supported. Support TLS and SSL protocols, these can be configured in the ui of dolphinscheduler:
[How to setup email alarm](../en/guide/alert/email.md).
--- ---
@ -700,47 +701,14 @@ AThe repair can be completed by executing the following SQL in the database:
update t_ds_version set version='2.0.1'; update t_ds_version set version='2.0.1';
``` ```
## Can not find python-gateway-server in distribute package ---
After version 3.0.0-alpha, Python gateway server integrate into API server, and Python gateway service will start when you ## QCan not find python-gateway-server in distribute package
AAfter version 3.0.0-alpha, Python gateway server integrate into API server, and Python gateway service will start when you
start API server. If you want disabled when Python gateway service you could change API server configuration in path start API server. If you want disabled when Python gateway service you could change API server configuration in path
`api-server/conf/application.yaml` and change attribute `python-gateway.enabled : false`. `api-server/conf/application.yaml` and change attribute `python-gateway.enabled : false`.
## How to Build Custom Docker Image
DolphinScheduler will release new Docker images after it released, you could find them in DockerHub. You could create
custom Docker images base on those images if you want to change image like add some dependencies or upgrade package.
```Dockerfile
FROM apache/dolphinscheduler-standalone-server
RUN apt update ; \
apt install -y <YOUR-CUSTOM-DEPENDENCE> ; \
```
If you want to modify DolphinScheduler source code, then build and distribute your own images, you can run below command
to build Docker images and install them locally, which you could find them by command `docker imaegs`.
```shell
./mvnw -B clean install \
-Dmaven.test.skip \
-Dmaven.javadoc.skip \
-Dmaven.checkstyle.skip \
-Dmaven.deploy.skip \
-Ddocker.tag=latest \
-Pdocker,release
```
If you want to modify DolphinScheduler source code, but also want to add customize dependencies of Docker image, you can
modify the definition of Dockerfile after modifying the source code. You can run the following command in root source code
directory to find all Dockerfile files.
```shell
find . -iname 'Dockerfile'
```
Then run the command above start with `./mvnw -B clean install`. You can see all docker images you just created with
command `docker images` after finish commnand `mvnw`.
--- ---
## We will collect more FAQ later We will collect more FAQ later

View File

@ -1,18 +1,22 @@
# Alert Component User Guide # Alert Component User Guide
## How to Create Alert Plugins and Alert Groups ## Alert Plugins and Alert Groups Creation
In version 2.0.0, users need to create alert instances, and needs to choose an alarm policy when defining an alarm instance, there are three options: send if the task succeeds, send on failure, and send on both success and failure. when the workflow or task is executed, if an alarm is triggered, calling the alarm instance send method needs a logical judgment, which matches the alarm instance with the task status, executes the alarm instance sending logic if it matches, and filters if it does not match. When create alert instances then associate them with alert groups. Alert group can use multiple alert instances. In version 2.0.0, users need to create alert instances, and needs to choose an alarm policy when defining an alarm instance, there are three options: send if the task succeeds, send on failure, and send on both success and failure. when the workflow or task is executed, if an alarm is triggered, calling the alarm instance send method needs a logical judgment, which matches the alarm instance with the task status, executes the alarm instance sending logic if it matches, and filters if it does not match. When create alert instances then associate them with alert groups. Alert group can use multiple alert instances.
The alarm module supports the following scenarios: The alarm module supports the following scenarios:
<img src="/img/alert/alert_scenarios_en.png">
The steps to use are as follows: <img src="../../../../img/alert/alert_scenarios_en.png">
First, go to the Security Center page. Select Alarm Group Management, click Alarm Instance Management on the left and create an alarm instance. Select the corresponding alarm plug-in and fill in the relevant alarm parameters. Steps to be used are as follows:
Then select Alarm Group Management, create an alarm group, and choose the corresponding alarm instance. - Go to `Security -> Alarm Group Management -> Alarm Instance Management -> Alarm Instance`.
- Select the corresponding alarm plug-in and fill in the relevant alarm parameters.
- Select `Alarm Group Management`, create an alarm group, and choose the corresponding alarm instance.
<img src="/img/alert/alert_step_1.png"> ![alert-instance01](../../../../img/new_ui/dev/alert/alert_instance01.png)
<img src="/img/alert/alert_step_2.png">
<img src="/img/alert/alert_step_3.png"> ![alert-instance02](../../../../img/new_ui/dev/alert/alert_instance02.png)
<img src="/img/alert/alert_step_4.png">
![alert-instance03](../../../../img/new_ui/dev/alert/alert_instance03.png)
![alert-instance04](../../../../img/new_ui/dev/alert/alert_instance04.png)

View File

@ -1,27 +1,27 @@
# DingTalk # DingTalk
If you need to use `DingTalk` for alerting, create an alert instance in the alert instance management and select the DingTalk plugin. If you need to use `DingTalk` for alerting, create an alert instance in the alert instance management and select the `DingTalk` plugin.
The following shows the `DingTalk` configuration example: The following shows the `DingTalk` configuration example:
![dingtalk-plugin](/img/alert/dingtalk-plugin.png) ![alert-dingtalk](../../../../img/new_ui/dev/alert/alert_dingtalk.png)
## Parameter Configuration ## Parameter Configuration
* Webhook | **Parameter** | **Description** |
> The format is: https://oapi.dingtalk.com/robot/send?access_token=XXXXXX | --- | --- |
* Keyword | Warning Type | Alert on success or failure or both. |
> Custom keywords for security settings | WebHook | The format is: [https://oapi.dingtalk.com/robot/send?access\_token=XXXXXX](https://oapi.dingtalk.com/robot/send?access_token=XXXXXX) |
* Secret | Keyword | Custom keywords for security settings. |
> Signature of security settings | Secret | Signature of security settings |
* MessageType | Msg Type | Message parse type (support txt, markdown, markdownV2, html). |
> Support both text and markdown types | At User Mobile | When a custom bot sends a message, you can specify the "@person list" by their mobile phone number. When the selected people in the "@people list" receive the message, there will be a `@` message reminder. `No disturb` mode always receives reminders, and "someone @ you" appears in the message. The "At User Mobile" represents mobile phone number of the "@person" |
| At User Ids | The user ID by "@person" |
| Proxy | The proxy address of the proxy server. |
| Port | The proxy port of Proxy-Server. |
| User | Authentication(Username) for the proxy server. |
| Password | Authentication(Password) for the proxy server. |
When a custom bot sends a message, you can specify the "@person list" by their mobile phone number. When the selected people in the "@people list" receive the message, there will be a `@` message reminder. `No disturb` mode always receives reminders, and "someone @ you" appears in the message. ## Reference
* @Mobiles
> The mobile phone number of the "@person"
* @UserIds
> The user ID by "@person"
* @All
> @Everyone
[DingTalk Custom Robot Access Development Documentation](https://open.dingtalk.com/document/robots/custom-robot-access) - [DingTalk Custom Robot Access Development Documentation](https://open.dingtalk.com/document/robots/custom-robot-access)

View File

@ -0,0 +1,10 @@
# Email
If you need to use `Email` for alerting, create an alert instance in the alert instance management and select the Email plugin.
The following shows the `Email` configuration example:
![alert-email](../../../../img/alert/email-alter-setup1-en.png)
![alert-email](../../../../img/alert/email-alter-setup2-en.png)
![alert-email](../../../../img/alert/email-alter-setup3-en.png)

View File

@ -1,37 +1,32 @@
# Webex Teams # Webex Teams
If you need to use `Webex Teams` to alert, create an alert instance in the alert instance management, and choose the WebexTeams plugin. If you need to use `Webex Teams` to alert, create an alert instance in the alert instance management, and choose the WebexTeams plugin. You can pick private alert or room group chat alert.
You can pick private alert or room group chat alert.
The following is the `WebexTeams` configuration example: The following is the `WebexTeams` configuration example:
![enterprise-webexteams-plugin](/img/alert/enterprise-webexteams-plugin.png) ![enterprise-webexteams-plugin](../../../../img/alert/enterprise-webexteams-plugin.png)
## Parameter Configuration ## Parameter Configuration
* botAccessToken | **Parameter** | **Description** |
> The robot's access token | --- | --- |
* roomID | botAccessToken | The access token of robot. |
> The ID of the room that receives message (only support one room ID) | roomID | The ID of the room that receives message (only support one room ID). |
* toPersonId | toPersonId | The person ID of the recipient when sending a private 1:1 message. |
> The person ID of the recipient when sending a private 1:1 message | toPersonEmail | The email address of the recipient when sending a private 1:1 message. |
* toPersonEmail | atSomeoneInRoom | If the message destination is room, the emails of the person being @, use `,` (eng commas) to separate multiple emails. |
> The email address of the recipient when sending a private 1:1 message | destination |The destination of the message (one message only support one destination). |
* atSomeoneInRoom
> If the message destination is room, the emails of the person being @, use `,` (eng commas) to separate multiple emails
* destination
> The destination of the message (one message only support one destination)
## Create a Bot ## Create Bot
Create a bot visit [Official Website My-Apps](https://developer.webex.com/my-apps) to `Create a New APP` and select `Create a Bot`, fill in the bot information and acquire `bot username` and `bot ID` for further usage. Create a bot visit [Official Website My-Apps](https://developer.webex.com/my-apps) to `Create a New APP` and select `Create a Bot`, fill in the bot information and acquire `bot username` and `bot ID` for further usage.
![enterprise-webexteams-bot-info](/img/alert/enterprise-webexteams-bot.png) ![enterprise-webexteams-bot-info](../../../../img/alert/enterprise-webexteams-bot.png)
## Create a Room ## Create a Room
Create a root visit [Official Website for Developer APIs](https://developer.webex.com/docs/api/v1/rooms/create-a-room) to create a new room, fill in the room name and acquire `id`(room ID) and `creatorId` for further usage. Create a root visit [Official Website for Developer APIs](https://developer.webex.com/docs/api/v1/rooms/create-a-room) to create a new room, fill in the room name and acquire `id`(room ID) and `creatorId` for further usage.
![enterprise-webexteams-room-info](/img/alert/enterprise-webexteams-room.png) ![enterprise-webexteams-room-info](../../../../img/alert/enterprise-webexteams-room.png)
### Invite Bot to the Room ### Invite Bot to the Room
@ -43,22 +38,24 @@ In this way, you can send private message to a person by `User Email` or `UserId
The `user Email` is user register Email. The `user Email` is user register Email.
The `userId` we can acquire it from the `creatorId` of creating a new group chat room API. The `userId` we can acquire it from the `creatorId` of creating a new group chat room API.
![enterprise-webexteams-private-message-form](/img/alert/enterprise-webexteams-private-form.png) ![enterprise-webexteams-private-message-form](../../../../img/alert/enterprise-webexteams-private-form.png)
### Private Alert Message Example ### Private Alert Message Example
![enterprise-webexteams-private-message-example](/img/alert/enterprise-webexteams-private-msg.png) ![enterprise-webexteams-private-message-example](../../../../img/alert/enterprise-webexteams-private-msg.png)
## Send Group Room Message ## Send Group Room Message
In this way, you can send group room message to a room by `Room ID`. Fill in the `Room Id` and `Bot Access Token` and select `Destination` `roomId`. In this way, you can send group room message to a room by `Room ID`. Fill in the `Room Id` and `Bot Access Token` and select `Destination` `roomId`.
The `Room ID` we can acquire it from the `id` of creating a new group chat room API. The `Room ID` we can acquire it from the `id` of creating a new group chat room API.
![enterprise-webexteams-room](/img/alert/enterprise-webexteams-group-form.png) ![enterprise-webexteams-room](../../../../img/alert/enterprise-webexteams-group-form.png)
### Group Room Alert Message Example ### Group Room Alert Message Example
![enterprise-webexteams-room-message-example](/img/alert/enterprise-webexteams-room-msg.png) ![enterprise-webexteams-room-message-example](../../../../img/alert/enterprise-webexteams-room-msg.png)
[WebexTeams Application Bot Guide](https://developer.webex.com/docs/bots) ## References:
[WebexTeams Message Guide](https://developer.webex.com/docs/api/v1/messages/create-a-message)
- [WebexTeams Application Bot Guide](https://developer.webex.com/docs/bots)
- [WebexTeams Message Guide](https://developer.webex.com/docs/api/v1/messages/create-a-message)

View File

@ -3,7 +3,7 @@
If you need to use `Enterprise WeChat` to alert, create an alert instance in the alert instance management, and choose the `WeChat` plugin. If you need to use `Enterprise WeChat` to alert, create an alert instance in the alert instance management, and choose the `WeChat` plugin.
The following is the `WeChat` configuration example: The following is the `WeChat` configuration example:
![enterprise-wechat-plugin](/img/alert/enterprise-wechat-plugin.png) ![enterprise-wechat-plugin](../../../../img/alert/enterprise-wechat-plugin.png)
## Send Type ## Send Type
@ -14,15 +14,15 @@ The parameter `send.type` corresponds to sending messages to Enterprise WeChat c
The APP sends type means to notify the alert results via Enterprise WeChat customized APPs, supports sending messages to both specified users and all members. Currently, send to specified enterprise department and tags are not supported, a new PR to contribute is welcomed. The APP sends type means to notify the alert results via Enterprise WeChat customized APPs, supports sending messages to both specified users and all members. Currently, send to specified enterprise department and tags are not supported, a new PR to contribute is welcomed.
The following is the `APP` alert config example: The following is the `APP` alert config example:
![enterprise-wechat-app-msg-config](/img/alert/wechat-app-form-example.png) ![enterprise-wechat-app-msg-config](../../../../img/alert/wechat-app-form-example.png)
The following is the `APP` `MARKDOWN` alert message example: The following is the `APP` `MARKDOWN` alert message example:
![enterprise-wechat-app-msg-markdown](/img/alert/enterprise-wechat-app-msg-md.png) ![enterprise-wechat-app-msg-markdown](../../../../img/alert/enterprise-wechat-app-msg-md.png)
The following is the `APP` `TEXT` alert message example: The following is the `APP` `TEXT` alert message example:
![enterprise-wechat-app-msg-text](/img/alert/enterprise-wechat-app-msg.png) ![enterprise-wechat-app-msg-text](../../../../img/alert/enterprise-wechat-app-msg.png)
#### Prerequisites #### Prerequisites
@ -34,7 +34,7 @@ The Enterprise WeChat APPs support sending messages to both specified users and
To acquire user `userId` refer to [Official Doc](https://developer.work.weixin.qq.com/document/path/95402), acquire `userId` by user phone number. To acquire user `userId` refer to [Official Doc](https://developer.work.weixin.qq.com/document/path/95402), acquire `userId` by user phone number.
The following is the `query userId` API example: The following is the `query userId` API example:
![enterprise-wechat-create-group](/img/alert/enterprise-wechat-query-userid.png) ![enterprise-wechat-create-group](../../../../img/alert/enterprise-wechat-query-userid.png)
#### References #### References
@ -46,15 +46,15 @@ APP: https://work.weixin.qq.com/api/doc/90000/90135/90236
The Group Chat send type means to notify the alert results via group chat created by Enterprise WeChat API, sending messages to all members of the group and specified users are not supported. The Group Chat send type means to notify the alert results via group chat created by Enterprise WeChat API, sending messages to all members of the group and specified users are not supported.
The following is the `Group Chat` alert config example: The following is the `Group Chat` alert config example:
![enterprise-wechat-app-msg-config](/img/alert/wechat-group-form-example.png) ![enterprise-wechat-app-msg-config](../../../../img/alert/wechat-group-form-example.png)
The following is the `APP` `MARKDOWN` alert message example: The following is the `APP` `MARKDOWN` alert message example:
![enterprise-wechat-group-msg-markdown](/img/alert/enterprise-wechat-group-msg-md.png) ![enterprise-wechat-group-msg-markdown](../../../../img/alert/enterprise-wechat-group-msg-md.png)
The following is the `Group Chat` `TEXT` alert message example: The following is the `Group Chat` `TEXT` alert message example:
![enterprise-wechat-group-msg-text](/img/alert/enterprise-wechat-group-msg.png) ![enterprise-wechat-group-msg-text](../../../../img/alert/enterprise-wechat-group-msg.png)
#### Prerequisites #### Prerequisites
@ -62,10 +62,10 @@ Before sending messages to group chat, create a new group chat by Enterprise WeC
To acquire user `userId` refer to [Official Doc](https://developer.work.weixin.qq.com/document/path/95402), acquire `userId` by user phone number. To acquire user `userId` refer to [Official Doc](https://developer.work.weixin.qq.com/document/path/95402), acquire `userId` by user phone number.
The following is the `create new group chat` API and `query userId` API example: The following is the `create new group chat` API and `query userId` API example:
![enterprise-wechat-create-group](/img/alert/enterprise-wechat-create-group.png) ![enterprise-wechat-create-group](../../../../img/alert/enterprise-wechat-create-group.png)
![enterprise-wechat-create-group](/img/alert/enterprise-wechat-query-userid.png) ![enterprise-wechat-create-group](../../../../img/alert/enterprise-wechat-query-userid.png)
#### References ## Reference
Group Chathttps://work.weixin.qq.com/api/doc/90000/90135/90248 - Group Chathttps://work.weixin.qq.com/api/doc/90000/90135/90248

View File

@ -0,0 +1,17 @@
# Feishu
If you need to use `Feishu` for alerting, create an alert instance in the alert instance management and select
the `Feishu` plugin.
The following shows the `Feishu` configuration example:
![alert-feishu](../../../../img/new_ui/dev/alert/alert_feishu.png)
## Parameter Configuration
* Webhook
> Copy the robot webhook URL shown below:
![alert-feishu-webhook](../../../../img/new_ui/dev/alert/alert_feishu_webhook.png)
[FeishuUse bots in groups](https://www.feishu.cn/hc/en-US/articles/360024984973)

View File

@ -4,31 +4,28 @@ If you need to use `Http script` for alerting, create an alert instance in the a
## Parameter Configuration ## Parameter Configuration
* URL | **Parameter** | **Description** |
> The `Http` request URL needs to contain protocol, host, path and parameters if the method is `GET` | --- | --- |
* Request Type | URL | The `Http` request URL needs to contain protocol, host, path and parameters if the method is `GET`. |
> Select the request type from `POST` or `GET` | Request Type | Select the request type from `POST` or `GET`. |
* Headers | Headers | The headers of the `Http` request in JSON format. |
> The headers of the `Http` request in JSON format | Body | The request body of the `Http` request in JSON format, when using `POST` method to alert. |
* Body | Content Field | The field name to place the alert information. |
> The request body of the `Http` request in JSON format, when using `POST` method to alert
* Content Field
> The field name to place the alert information
## Send Type ## Send Type
Using `POST` and `GET` method to send `Http` request in the `Request Type`. Using `POST` and `GET` method to send `Http` request in the `Request Type`.
### GET Http ### GET HTTP
Send alert information by `Http` GET method. Send alert information by `Http` GET method.
The following shows the `GET` configuration example: The following shows the `GET` configuration example:
![enterprise-wechat-app-msg-config](/img/alert/http-get-example.png) ![enterprise-wechat-app-msg-config](../../../../img/alert/http-get-example.png)
### POST Http ### POST HTTP
Send alert information inside `Http` body by `Http` POST method. Send alert information inside `Http` body by `Http` POST method.
The following shows the `POST` configuration example: The following shows the `POST` configuration example:
![enterprise-wechat-app-msg-config](/img/alert/http-post-example.png) ![enterprise-wechat-app-msg-config](../../../../img/alert/http-post-example.png)

View File

@ -1,17 +1,18 @@
# DingTalk # Script
If you need to use `Shell script` for alerting, create an alert instance in the alert instance management and select the `Script` plugin. If you need to use `Shell script` for alerting, create an alert instance in the alert instance management and select the `Script` plugin.
The following shows the `Script` configuration example: The following shows the `Script` configuration example:
![dingtalk-plugin](/img/alert/script-plugin.png) ![dingtalk-plugin](../../../../img/alert/script-plugin.png)
## Parameter Configuration ## Parameter Configuration
* User Params | **Parameter** | **Description** |
> User defined parameters will pass to the script. | --- | --- |
* Script Path | User Params | User defined parameters will pass to the script. |
> The file location path in the server. | Script Path |The file location path in the server. |
* Type | Type | Support `Shell` script. |
> Support `Shell` script.
**_Notice:_** please consider the script file access privileges with the executing tenant. ### Note
Consider the script file access privileges with the executing tenant.

View File

@ -3,30 +3,25 @@
If you need `Telegram` to alert, create an alert instance in the alert instance management, and choose the `Telegram` plugin. If you need `Telegram` to alert, create an alert instance in the alert instance management, and choose the `Telegram` plugin.
The following shows the `Telegram` configuration example: The following shows the `Telegram` configuration example:
![telegram-plugin](/img/alert/telegram-plugin.png) ![alert-telegram](../../../../img/new_ui/dev/alert/alert_telegram.png)
## Parameter Configuration ## Parameter Configuration
* WebHook: | **Parameter** | **Description** |
> The WebHook of Telegram when use robot to send message | --- | --- |
* botToken | WebHook | The WebHook of Telegram when use robot to send message. |
> The robot's access token | botToken | The access token of robot. |
* chatId | chatId | Sub Telegram Channel. |
> Sub Telegram Channel | parseMode | Message parse type (support txt, markdown, markdownV2, html). |
* parseMode | EnableProxy | Enable proxy sever. |
> Message parse type (support txt, markdown, markdownV2, html) | Proxy | The proxy address of the proxy server. |
* EnableProxy | Port | The proxy port of proxy server. |
> Enable proxy sever | User | Authentication(Username) for the proxy server. |
* Proxy | Password | Authentication(Password) for the proxy server. |
> the proxy address of the proxy server
* Port
> the proxy port of Proxy-Server
* User
> Authentication(Username) for the proxy server
* Password
> Authentication(Password) for the proxy server
**NOTICE**The webhook needs to be able to receive and use the same JSON body of HTTP POST that DolphinScheduler constructs and the following shows the JSON body: ### NOTE
The webhook needs to be able to receive and use the same JSON body of HTTP POST that DolphinScheduler constructs and the following shows the JSON body:
```json ```json
{ {
@ -35,8 +30,8 @@ The following shows the `Telegram` configuration example:
} }
``` ```
References: ## References:
- [Telegram Application Bot Guide](https://core.telegram.org/bots) - [Telegram Application Bot Guide](https://core.telegram.org/bots)
- [Telegram Bots Api](https://core.telegram.org/bots/api) - [Telegram Bots Api](https://core.telegram.org/bots/api)
- [Telegram SendMessage Api](https://core.telegram.org/bots/api#sendmessage) - [Telegram SendMessage Api](https://core.telegram.org/bots/api#sendmessage)

View File

@ -1,58 +1,51 @@
# Overview # Data Quality
## Introduction ## Introduction
The data quality task is used to check the data accuracy during the integration and processing of data. Data quality tasks in this release include single-table checking, single-table custom SQL checking, multi-table accuracy, and two-table value comparisons. The running environment of the data quality task is Spark 2.4.0, and other versions have not been verified, and users can verify by themselves. The data quality task is used to check the data accuracy during the integration and processing of data. Data quality tasks in this release include single-table checking, single-table custom SQL checking, multi-table accuracy, and two-table value comparisons. The running environment of the data quality task is Spark 2.4.0, and other versions have not been verified, and users can verify by themselves.
- The execution flow of the data quality task is as follows:
> The user defines the task in the interface, and the user input value is stored in `TaskParam` The execution logic of the data quality task is as follows:
When running a task, `Master` will parse `TaskParam`, encapsulate the parameters required by `DataQualityTask` and send it to `Worker`.
Worker runs the data quality task. After the data quality task finishes running, it writes the statistical results to the specified storage engine. The current data quality task result is stored in the `t_ds_dq_execute_result` table of `dolphinscheduler`
`Worker` sends the task result to `Master`, after `Master` receives `TaskResponse`, it will judge whether the task type is `DataQualityTask`, if so, it will read the corresponding result from `t_ds_dq_execute_result` according to `taskInstanceId`, and then The result is judged according to the check mode, operator and threshold configured by the user. If the result is a failure, the corresponding operation, alarm or interruption will be performed according to the failure policy configured by the user.
Add config : `<server-name>/conf/common.properties` - The user defines the task in the interface, and the user input value is stored in `TaskParam`.
- When running a task, `Master` will parse `TaskParam`, encapsulate the parameters required by `DataQualityTask` and send it to `Worker`.
- Worker runs the data quality task. After the data quality task finishes running, it writes the statistical results to the specified storage engine.
- The current data quality task result is stored in the `t_ds_dq_execute_result` table of `dolphinscheduler`
`Worker` sends the task result to `Master`, after `Master` receives `TaskResponse`, it will judge whether the task type is `DataQualityTask`, if so, it will read the corresponding result from `t_ds_dq_execute_result` according to `taskInstanceId`, and then The result is judged according to the check mode, operator and threshold configured by the user.
- If the result is a failure, the corresponding operation, alarm or interruption will be performed according to the failure policy configured by the user.
- Add config : `<server-name>/conf/common.properties`
```properties ```properties
# Change to specific version if you not use dev branch
data-quality.jar.name=dolphinscheduler-data-quality-dev-SNAPSHOT.jar data-quality.jar.name=dolphinscheduler-data-quality-dev-SNAPSHOT.jar
``` ```
Please fill in `data-quality.jar.name` according to the actual package name, - Please fill in `data-quality.jar.name` according to the actual package name.
If you package `data-quality` separately, remember to modify the package name to be consistent with `data-quality.jar.name`. - If you package `data-quality` separately, remember to modify the package name to be consistent with `data-quality.jar.name`.
If the old version is upgraded and used, you need to execute the `sql` update script to initialize the database before running. - If the old version is upgraded and used, you need to execute the `sql` update script to initialize the database before running.
If you want to use `MySQL` data, you need to comment out the `scope` of `MySQL` in `pom.xml` - If you want to use `MySQL` data, you need to comment out the `scope` of `MySQL` in `pom.xml`.
Currently only `MySQL`, `PostgreSQL` and `HIVE` data sources have been tested, other data sources have not been tested yet - Currently only `MySQL`, `PostgreSQL` and `HIVE` data sources have been tested, other data sources have not been tested yet.
`Spark` needs to be configured to read `Hive` metadata, `Spark` does not use `jdbc` to read `Hive` - `Spark` needs to be configured to read `Hive` metadata, `Spark` does not use `jdbc` to read `Hive`.
## Detail ## Detailed Inspection Logic
- CheckMethod: [CheckFormula][Operator][Threshold], if the result is true, it indicates that the data does not meet expectations, and the failure strategy is executed. | **Parameter** | **Description** |
- CheckFormula | ----- | ---- |
- Expected-Actual | CheckMethod | [CheckFormula][Operator][Threshold], if the result is true, it indicates that the data does not meet expectations, and the failure strategy is executed. |
- Actual-Expected | CheckFormula | <ul><li>Expected-Actual</li><li>Actual-Expected</li><li>(Actual/Expected)x100%</li><li>(Expected-Actual)/Expected x100%</li></ul> |
- (Actual/Expected)x100% | Operator | =, >, >=, <, <=, != |
- (Expected-Actual)/Expected x100% | ExpectedValue | <ul><li>FixValue</li><li>DailyAvg</li><li>WeeklyAvg</li><li>MonthlyAvg</li><li>Last7DayAvg</li><li>Last30DayAvg</li><li>SrcTableTotalRows</li><li>TargetTableTotalRows</li></ul> |
- Operator=、>、>=、<<=、!= | Example |<ul><li>CheckFormulaExpected-Actual</li><li>Operator></li><li>Threshold0</li><li>ExpectedValueFixValue=9</li></ul>
- ExpectedValue
- FixValue
- DailyAvg
- WeeklyAvg
- MonthlyAvg
- Last7DayAvg
- Last30DayAvg
- SrcTableTotalRows
- TargetTableTotalRows
- example In the example, assuming that the actual value is 10, the operator is >, and the expected value is 9, then the result 10 -9 > 0 is true, which means that the row data in the empty column has exceeded the threshold, and the task is judged to fail.
- CheckFormulaExpected-Actual
- Operator> # Task Operation Guide
- Threshold0
- ExpectedValueFixValue=9。 ## Null Value Check for Single Table Check
### Inspection Introduction
Assuming that the actual value is 10, the operator is >, and the expected value is 9, then the result 10 -9 > 0 is true, which means that the row data in the empty column has exceeded the threshold, and the task is judged to fail
# Guide
## NullCheck
### Introduction
The goal of the null value check is to check the number of empty rows in the specified column. The number of empty rows can be compared with the total number of rows or a specified threshold. If it is greater than a certain threshold, it will be judged as failure. The goal of the null value check is to check the number of empty rows in the specified column. The number of empty rows can be compared with the total number of rows or a specified threshold. If it is greater than a certain threshold, it will be judged as failure.
- Calculate the SQL statement that the specified column is empty as follows:
- The SQL statement that calculates the null of the specified column is as follows:
```sql ```sql
SELECT COUNT(*) AS miss FROM ${src_table} WHERE (${src_field} is null or ${src_field} = '') AND (${src_filter}) SELECT COUNT(*) AS miss FROM ${src_table} WHERE (${src_field} is null or ${src_field} = '') AND (${src_filter})
@ -64,247 +57,253 @@ The goal of the null value check is to check the number of empty rows in the spe
SELECT COUNT(*) AS total FROM ${src_table} WHERE (${src_filter}) SELECT COUNT(*) AS total FROM ${src_table} WHERE (${src_filter})
``` ```
### UI Guide ### Interface Operation Guide
![dataquality_null_check](/img/tasks/demo/null_check.png)
- Source data type: select MySQL, PostgreSQL, etc.
- Source data source: the corresponding data source under the source data type
- Source data table: drop-down to select the table where the validation data is located
- Src filter conditions: such as the title, it will also be used when counting the total number of rows in the table, optional
- Src table check column: drop-down to select the check column name
- Check method:
- [Expected-Actual]
- [Actual-Expected]
- [Actual/Expected]x100%
- [(Expected-Actual)/Expected]x100%
- Check operators: =, >, >=, <, <=, ! =
- Threshold: The value used in the formula for comparison
- Failure strategy
- Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent
- Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent
- Expected value type: select the desired type from the drop-down menu
## Timeliness Check ![dataquality_null_check](../../../img/tasks/demo/null_check.png)
### Introduction
The timeliness check is used to check whether the data is processed within the expected time. The start time and end time can be specified to define the time range. If the amount of data within the time range does not reach the set threshold, the check task will be judged as fail
### UI Guide
![dataquality_timeliness_check](/img/tasks/demo/timeliness_check.png)
- Source data type: select MySQL, PostgreSQL, etc.
- Source data source: the corresponding data source under the source data type
- Source data table: drop-down to select the table where the validation data is located
- Src filter conditions: such as the title, it will also be used when counting the total number of rows in the table, optional
- Src table check column: drop-down to select check column name
- start time: the start time of a time range
- end time: the end time of a time range
- Time Format: Set the corresponding time format
- Check method:
- [Expected-Actual]
- [Actual-Expected]
- [Actual/Expected]x100%
- [(Expected-Actual)/Expected]x100%
- Check operators: =, >, >=, <, <=, ! =
- Threshold: The value used in the formula for comparison
- Failure strategy
- Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent
- Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent
- Expected value type: select the desired type from the drop-down menu
## Field Length Check | **Parameter** | **Description** |
### Introduction | ----- | ---- |
The goal of field length verification is to check whether the length of the selected field meets the expectations. If there is data that does not meet the requirements, and the number of rows exceeds the threshold, the task will be judged to fail | Source data type | Select MySQL, PostgreSQL, etc. |
### UI Guide | Source data source | The corresponding data source under the source data type. |
![dataquality_length_check](/img/tasks/demo/field_length_check.png) | Source data table | Drop-down to select the table where the validation data is located. |
- Source data type: select MySQL, PostgreSQL, etc. | Src filter conditions | Such as the title, it will also be used when counting the total number of rows in the table, optional. |
- Source data source: the corresponding data source under the source data type | Src table check column | Drop-down to select the check column name. |
- Source data table: drop-down to select the table where the validation data is located | Check method | <ul><li>[Expected-Actual]</li><li>[Actual-Expected]</li><li>[Actual/Expected]x100%</li><li>[(Expected-Actual)/Expected]x100%</li></ul> |
- Src filter conditions: such as the title, it will also be used when counting the total number of rows in the table, optional | Check operators | =, >, >=, <, <=, ! = |
- Src table check column: drop-down to select the check column name | Threshold | The value used in the formula for comparison. |
- Logical operators: =, >, >=, <, <=, ! = | Failure strategy | <ul><li>Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent.</li><li>Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent.</li></ul> |
- Field length limit: like the title | Expected value type | Select the desired type from the drop-down menu. |
- Check method:
- [Expected-Actual]
- [Actual-Expected]
- [Actual/Expected]x100%
- [(Expected-Actual)/Expected]x100%
- Check operators: =, >, >=, <, <=, ! =
- Threshold: The value used in the formula for comparison
- Failure strategy
- Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent
- Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent
- Expected value type: select the desired type from the drop-down menu
## Uniqueness Check ## Timeliness Check of Single Table Check
### Introduction ### Inspection Introduction
The goal of the uniqueness check is to check whether the field is duplicated. It is generally used to check whether the primary key is duplicated. If there is duplication and the threshold is reached, the check task will be judged to be failed. The timeliness check is used to check whether the data is processed within the expected time. The start time and end time can be specified to define the time range. If the amount of data within the time range does not reach the set threshold, the check task will be judged as fail.
### UI Guide
![dataquality_uniqueness_check](/img/tasks/demo/uniqueness_check.png)
- Source data type: select MySQL, PostgreSQL, etc.
- Source data source: the corresponding data source under the source data type
- Source data table: drop-down to select the table where the validation data is located
- Src filter conditions: such as the title, it will also be used when counting the total number of rows in the table, optional
- Src table check column: drop-down to select the check column name
- Check method:
- [Expected-Actual]
- [Actual-Expected]
- [Actual/Expected]x100%
- [(Expected-Actual)/Expected]x100%
- Check operators: =, >, >=, <, <=, ! =
- Threshold: The value used in the formula for comparison
- Failure strategy
- Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent
- Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent
- Expected value type: select the desired type from the drop-down menu
## Regular Expression Check ### Interface Operation Guide
### Introduction
![dataquality_timeliness_check](../../../img/tasks/demo/timeliness_check.png)
| **Parameter** | **Description** |
| ----- | ---- |
| Source data type | Select MySQL, PostgreSQL, etc.
| Source data source | The corresponding data source under the source data type.
| Source data table | Drop-down to select the table where the validation data is located. |
| Src filter conditions | Such as the title, it will also be used when counting the total number of rows in the table, optional. |
| Src table check column | Drop-down to select check column name. |
| Start time | The start time of a time range. |
| end time | The end time of a time range. |
| Time Format | Set the corresponding time format. |
| Check method | <ul><li>[Expected-Actual]</li><li>[Actual-Expected]</li><li>[Actual/Expected]x100%</li><li>[(Expected-Actual)/Expected]x100%</li></ul> |
| Check operators | =, >, >=, <, <=, ! = |
| Threshold | The value used in the formula for comparison. |
| Failure strategy | <ul><li>Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent.</li><li>Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent.</li></ul> |
| Expected value type | Select the desired type from the drop-down menu. |
## Field Length Check for Single Table Check
### Inspection Introduction
The goal of field length verification is to check whether the length of the selected field meets the expectations. If there is data that does not meet the requirements, and the number of rows exceeds the threshold, the task will be judged to fail.
### Interface Operation Guide
![dataquality_length_check](../../../img/tasks/demo/field_length_check.png)
| **Parameter** | **Description** |
| ----- | ---- |
| Source data type | Select MySQL, PostgreSQL, etc. |
| Source data source | The corresponding data source under the source data type. |
| Source data table | Drop-down to select the table where the validation data is located. |
| Src filter conditions | Such as the title, it will also be used when counting the total number of rows in the table, optional. |
| Src table check column | Drop-down to select the check column name. |
| Logical operators | =, >, >=, <, <=, ! = |
| Field length limit | Like the title. |
| Check method | <ul><li>[Expected-Actual]</li><li>[Actual-Expected]</li><li>[Actual/Expected]x100%</li><li>[(Expected-Actual)/Expected]x100%</li></ul> |
| Check operators | =, >, >=, <, <=, ! = |
| Threshold | The value used in the formula for comparison. |
| Failure strategy | <ul><li>Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent.</li><li>Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent.</li></ul> |
| Expected value type | Select the desired type from the drop-down menu. |
## Uniqueness Check for Single Table Check
### Inspection Introduction
The goal of the uniqueness check is to check whether the fields are duplicated. It is generally used to check whether the primary key is duplicated. If there are duplicates and the threshold is reached, the check task will be judged to be failed.
### Interface Operation Guide
![dataquality_uniqueness_check](../../../img/tasks/demo/uniqueness_check.png)
| **Parameter** | **Description** |
| ----- | ---- |
| Source data type | Select MySQL, PostgreSQL, etc. |
| Source data source | The corresponding data source under the source data type. |
| Source data table | Drop-down to select the table where the validation data is located. |
| Src filter conditions | Such as the title, it will also be used when counting the total number of rows in the table, optional. |
| Src table check column | Drop-down to select the check column name. |
| Check method | <ul><li>[Expected-Actual]</li><li>[Actual-Expected]</li><li>[Actual/Expected]x100%</li><li>[(Expected-Actual)/Expected]x100%</li></ul> |
| Check operators | =, >, >=, <, <=, ! = |
| Threshold | The value used in the formula for comparison. |
| Failure strategy | <ul><li>Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent.</li><li>Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent.</li></ul> |
| Expected value type | Select the desired type from the drop-down menu. |
## Regular Expression Check for Single Table Check
### Inspection Introduction
The goal of regular expression verification is to check whether the format of the value of a field meets the requirements, such as time format, email format, ID card format, etc. If there is data that does not meet the format and exceeds the threshold, the task will be judged as failed. The goal of regular expression verification is to check whether the format of the value of a field meets the requirements, such as time format, email format, ID card format, etc. If there is data that does not meet the format and exceeds the threshold, the task will be judged as failed.
### UI Guide
![dataquality_regex_check](/img/tasks/demo/regexp_check.png)
- Source data type: select MySQL, PostgreSQL, etc.
- Source data source: the corresponding data source under the source data type
- Source data table: drop-down to select the table where the validation data is located
- Src filter conditions: such as the title, it will also be used when counting the total number of rows in the table, optional
- Src table check column: drop-down to select check column name
- Regular expression: as title
- Check method:
- [Expected-Actual]
- [Actual-Expected]
- [Actual/Expected]x100%
- [(Expected-Actual)/Expected]x100%
- Check operators: =, >, >=, <, <=, ! =
- Threshold: The value used in the formula for comparison
- Failure strategy
- Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent
- Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent
- Expected value type: select the desired type from the drop-down menu
## Enumeration Check ### Interface Operation Guide
### Introduction
The goal of enumeration value verification is to check whether the value of a field is within the range of enumeration values. If there is data that is not in the range of enumeration values and exceeds the threshold, the task will be judged to fail ![dataquality_regex_check](../../../img/tasks/demo/regexp_check.png)
### UI Guide
![dataquality_enum_check](/img/tasks/demo/enumeration_check.png) | **Parameter** | **Description** |
- Source data type: select MySQL, PostgreSQL, etc. | ----- | ---- |
- Source data source: the corresponding data source under the source data type | Source data type | Select MySQL, PostgreSQL, etc. |
- Source data table: drop-down to select the table where the validation data is located | Source data source | The corresponding data source under the source data type. |
- Src table filter conditions: such as title, also used when counting the total number of rows in the table, optional | Source data table | Drop-down to select the table where the validation data is located. |
- Src table check column: drop-down to select the check column name | Src filter conditions | Such as the title, it will also be used when counting the total number of rows in the table, optional. |
- List of enumeration values: separated by commas | Src table check column | Drop-down to select check column name. |
- Check method: | Regular expression | As title. |
- [Expected-Actual] | Check method | <ul><li>[Expected-Actual]</li><li>[Actual-Expected]</li><li>[Actual/Expected]x100%</li><li>[(Expected-Actual)/Expected]x100%</li></ul> |
- [Actual-Expected] | Check operators | =, >, >=, <, <=, ! = |
- [Actual/Expected]x100% | Threshold | The value used in the formula for comparison. |
- [(Expected-Actual)/Expected]x100% | Failure strategy | <ul><li>Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent.</li><li>Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent.</li></ul> |
- Check operators: =, >, >=, <, <=, ! = | Expected value type | Select the desired type from the drop-down menu. |
- Threshold: The value used in the formula for comparison
- Failure strategy ## Enumeration Value Validation for Single Table Check
- Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent ### Inspection Introduction
- Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent The goal of enumeration value verification is to check whether the value of a field is within the range of the enumeration value. If there is data that is not in the range of the enumeration value and exceeds the threshold, the task will be judged to fail.
- Expected value type: select the desired type from the drop-down menu
## Table Count Check ### Interface Operation Guide
### Introduction
![dataquality_enum_check](../../../img/tasks/demo/enumeration_check.png)
| **Parameter** | **Description** |
| ----- | ---- |
| Source data type | Select MySQL, PostgreSQL, etc. |
| Source data source | The corresponding data source under the source data type. |
| Source data table | Drop-down to select the table where the validation data is located. |
| Src table filter conditions | Such as title, also used when counting the total number of rows in the table, optional. |
| Src table check column | Drop-down to select the check column name. |
| List of enumeration values | Separated by commas. |
| Check method | <ul><li>[Expected-Actual]</li><li>[Actual-Expected]</li><li>[Actual/Expected]x100%</li><li>[(Expected-Actual)/Expected]x100%</li></ul> |
| Check operators | =, >, >=, <, <=, ! = |
| Threshold | The value used in the formula for comparison. |
| Failure strategy | <ul><li>Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent.</li><li>Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent.</li></ul> |
| Expected value type | Select the desired type from the drop-down menu. |
## Table Row Number Verification for Single Table Check
### Inspection Introduction
The goal of table row number verification is to check whether the number of rows in the table reaches the expected value. If the number of rows does not meet the standard, the task will be judged as failed. The goal of table row number verification is to check whether the number of rows in the table reaches the expected value. If the number of rows does not meet the standard, the task will be judged as failed.
### UI Guide
![dataquality_count_check](/img/tasks/demo/table_count_check.png)
- Source data type: select MySQL, PostgreSQL, etc.
- Source data source: the corresponding data source under the source data type
- Source data table: drop-down to select the table where the validation data is located
- Src filter conditions: such as the title, it will also be used when counting the total number of rows in the table, optional
- Src table check column: drop-down to select the check column name
- Check method:
- [Expected-Actual]
- [Actual-Expected]
- [Actual/Expected]x100%
- [(Expected-Actual)/Expected]x100%
- Check operators: =, >, >=, <, <=, ! =
- Threshold: The value used in the formula for comparison
- Failure strategy
- Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent
- Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent
- Expected value type: select the desired type from the drop-down menu
## Custom SQL Check ### Interface Operation Guide
### Introduction
### UI Guide
![dataquality_custom_sql_check](/img/tasks/demo/custom_sql_check.png)
- Source data type: select MySQL, PostgreSQL, etc.
- Source data source: the corresponding data source under the source data type
- Source data table: drop-down to select the table where the data to be verified is located
- Actual value name: alias in SQL for statistical value calculation, such as max_num
- Actual value calculation SQL: SQL for outputting actual values,
- Note: The SQL must be statistical SQL, such as counting the number of rows, calculating the maximum value, minimum value, etc.
- select max(a) as max_num from ${src_table}, the table name must be filled like this
- Src filter conditions: such as the title, it will also be used when counting the total number of rows in the table, optional
- Check method:
- Check operators: =, >, >=, <, <=, ! =
- Threshold: The value used in the formula for comparison
- Failure strategy
- Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent
- Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent
- Expected value type: select the desired type from the drop-down menu
## Accuracy check of multi-table ![dataquality_count_check](../../../img/tasks/demo/table_count_check.png)
### Introduction
| **Parameter** | **Description** |
| ----- | ---- |
| Source data type | Select MySQL, PostgreSQL, etc. |
| Source data source | The corresponding data source under the source data type. |
| Source data table | Drop-down to select the table where the validation data is located. |
| Src filter conditions | Such as the title, it will also be used when counting the total number of rows in the table, optional. |
| Src table check column | Drop-down to select the check column name. |
| Check method | <ul><li>[Expected-Actual]</li><li>[Actual-Expected]</li><li>[Actual/Expected]x100%</li><li>[(Expected-Actual)/Expected]x100%</li></ul> |
| Check operators | =, >, >=, <, <=, ! = |
| Threshold | The value used in the formula for comparison. |
| Failure strategy | <ul><li>Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent.</li><li>Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent.</li></ul> |
| Expected value type | Select the desired type from the drop-down menu. |
## Custom SQL Check for Single Table Check
### Interface Operation Guide
![dataquality_custom_sql_check](../../../img/tasks/demo/custom_sql_check.png)
| **Parameter** | **Description** |
| ----- | ---- |
| Source data type | Select MySQL, PostgreSQL, etc. |
| Source data source | The corresponding data source under the source data type. |
| Source data table | Drop-down to select the table where the data to be verified is located. |
| Actual value name | Alias in SQL for statistical value calculation, such as max_num. |
|Actual value calculation SQL | SQL for outputting actual values. Note:<ul><li>The SQL must be statistical SQL, such as counting the number of rows, calculating the maximum value, minimum value, etc.</li><li>Select max(a) as max_num from ${src_table}, the table name must be filled like this.</li></ul> |
| Src filter conditions | Such as the title, it will also be used when counting the total number of rows in the table, optional. |
| Check method | <ul><li>[Expected-Actual]</li><li>[Actual-Expected]</li><li>[Actual/Expected]x100%</li><li>[(Expected-Actual)/Expected]x100%</li></ul> |
| Check operators | =, >, >=, <, <=, ! = |
| Threshold | The value used in the formula for comparison. |
| Failure strategy | <ul><li>Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent.</li><li>Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent.</li></ul> |
| Expected value type | Select the desired type from the drop-down menu. |
## Accuracy Check of Multi-table
### Inspection Introduction
Accuracy checks are performed by comparing the accuracy differences of data records for selected fields between two tables, examples are as follows Accuracy checks are performed by comparing the accuracy differences of data records for selected fields between two tables, examples are as follows
- table test1 - table test1
| c1 | c2 | | c1 | c2 |
| :---: | :---: | | :---: | :---: |
| a | 1 | | a | 1 |
|b|2| | b | 2 |
- table test2 - table test2
| c21 | c22 | | c21 | c22 |
| :---: | :---: | | :---: | :---: |
| a | 1 | | a | 1 |
|b|3| | b | 3 |
If you compare the data in c1 and c21, the tables test1 and test2 are exactly the same. If you compare c2 and c22, the data in table test1 and table test2 are inconsistent. If you compare the data in c1 and c21, the tables test1 and test2 are exactly the same. If you compare c2 and c22, the data in table test1 and table test2 are inconsistent.
### UI Guide
![dataquality_multi_table_accuracy_check](/img/tasks/demo/multi_table_accuracy_check.png) ### Interface Operation Guide
- Source data type: select MySQL, PostgreSQL, etc.
- Source data source: the corresponding data source under the source data type ![dataquality_multi_table_accuracy_check](../../../img/tasks/demo/multi_table_accuracy_check.png)
- Source data table: drop-down to select the table where the data to be verified is located
- Src filter conditions: such as the title, it will also be used when counting the total number of rows in the table, optional | **Parameter** | **Description** |
- Target data type: choose MySQL, PostgreSQL, etc. | ----- | ---- |
- Target data source: the corresponding data source under the source data type | Source data type | Select MySQL, PostgreSQL, etc. |
- Target data table: drop-down to select the table where the data to be verified is located | Source data source | The corresponding data source under the source data type. |
- Target filter conditions: such as the title, it will also be used when counting the total number of rows in the table, optional | Source data table | Drop-down to select the table where the data to be verified is located. |
- Check column: | Src filter conditions | Such as the title, it will also be used when counting the total number of rows in the table, optional. |
- Fill in the source data column, operator and target data column respectively | Target data type | Choose MySQL, PostgreSQL, etc. |
- Verification method: select the desired verification method | Target data source | The corresponding data source under the source data type. |
- Operators: =, >, >=, <, <=, ! = | Target data table | Drop-down to select the table where the data to be verified is located. |
- Failure strategy | Target filter conditions | Such as the title, it will also be used when counting the total number of rows in the table, optional. |
- Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent | Check column | Fill in the source data column, operator and target data column respectively. |
- Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent | Verification method | Select the desired verification method. |
- Expected value type: select the desired type in the drop-down menu, only SrcTableTotalRow, TargetTableTotalRow and fixed value are suitable for selection here | Operators | =, >, >=, <, <=, ! = |
| Failure strategy | <ul><li>Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent.</li><li>Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent.</li><ul> |
| Expected value type | Select the desired type in the drop-down menu, only `SrcTableTotalRow`, `TargetTableTotalRow` and fixed value are suitable for selection here. |
## Comparison of the values checked by the two tables ## Comparison of the values checked by the two tables
### Introduction ### Inspection Introduction
Two-table value comparison allows users to customize different SQL statistics for two tables and compare the corresponding values. For example, for the source table A, the total amount of a certain column is calculated, and for the target table, the total amount of a certain column is calculated. value sum2, compare sum1 and sum2 to determine the check result Two-table value comparison allows users to customize different SQL statistics for two tables and compare the corresponding values. For example, for the source table A, the total amount of a certain column is calculated, and for the target table, the total amount of a certain column is calculated. value sum2, compare sum1 and sum2 to determine the check result.
### UI Guide
![dataquality_multi_table_comparison_check](/img/tasks/demo/multi_table_comparison_check.png) ### Interface Operation Guide
- Source data type: select MySQL, PostgreSQL, etc.
- Source data source: the corresponding data source under the source data type ![dataquality_multi_table_comparison_check](../../../img/tasks/demo/multi_table_comparison_check.png)
- Source data table: the table where the data is to be verified
- Actual value name: Calculate the alias in SQL for the actual value, such as max_age1 | **Parameter** | **Description** |
- Actual value calculation SQL: SQL for outputting actual values, | ----- | ---- |
- Note: The SQL must be statistical SQL, such as counting the number of rows, calculating the maximum value, minimum value, etc. | Source data type | Select MySQL, PostgreSQL, etc. |
- select max(age) as max_age1 from ${src_table} The table name must be filled like this | Source data source | The corresponding data source under the source data type. |
- Target data type: choose MySQL, PostgreSQL, etc. | Source data table | The table where the data is to be verified. |
- Target data source: the corresponding data source under the source data type | Actual value name | Calculate the alias in SQL for the actual value, such as max_age1. |
- Target data table: the table where the data is to be verified | Actual value calculation SQL | SQL for outputting actual values. Note: <ul><li>The SQL must be statistical SQL, such as counting the number of rows, calculating the maximum value, minimum value, etc.</li><li>Select max(age) as max_age1 from ${src_table} The table name must be filled like this.</li></ul> |
- Expected value name: Calculate the alias in SQL for the expected value, such as max_age2 | Target data type | Choose MySQL, PostgreSQL, etc. |
- Expected value calculation SQL: SQL for outputting expected value, | Target data source | The corresponding data source under the source data type. |
- Note: The SQL must be statistical SQL, such as counting the number of rows, calculating the maximum value, minimum value, etc. | Target data table | The table where the data is to be verified. |
- select max(age) as max_age2 from ${target_table} The table name must be filled like this | Expected value name | Calculate the alias in SQL for the expected value, such as max_age2. |
- Verification method: select the desired verification method | Expected value calculation SQL | SQL for outputting expected value. Note: <ul><li>The SQL must be statistical SQL, such as counting the number of rows, calculating the maximum value, minimum value, etc.</li><li>Select max(age) as max_age2 from ${target_table} The table name must be filled like this.</li></ul> |
- Operators: =, >, >=, <, <=, ! = | Verification method | Select the desired verification method. |
- Failure strategy | Operators | =, >, >=, <, <=, ! = |
- Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent | Failure strategy | <ul><li>Alert: The data quality task failed, the DolphinScheduler task result is successful, and an alert is sent.</li><li>Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent.</li></ul> |
- Blocking: The data quality task fails, the DolphinScheduler task result is failed, and an alarm is sent
## Task result view ## Task result view
![dataquality_result](/img/tasks/demo/result.png)
![dataquality_result](../../../img/tasks/demo/result.png)
## Rule View ## Rule View
### List of rules ### List of rules
![dataquality_rule_list](/img/tasks/demo/rule_list.png)
![dataquality_rule_list](../../../img/tasks/demo/rule_list.png)
### Rules Details ### Rules Details
![dataquality_rule_detail](/img/tasks/demo/rule_detail.png)
![dataquality_rule_detail](../../../img/tasks/demo/rule_detail.png)

View File

@ -0,0 +1,21 @@
# ClickHouse
![ClickHouse Datasource](../../../../img/new_ui/dev/datasource/ClickHouse.png)
## Datasource Parameters
| **Datasource** | **Description** |
| --- | --- |
| Datasource | Select CLICKHOUSE. |
| Datasource Name | Enter the name of the datasource. |
| Description | Enter a description of the datasource. |
| IP/Host Name | Enter the CLICKHOUSE service IP. |
| Port | Enter the CLICKHOUSE service port. |
| Username | Set the username for CLICKHOUSE connection. |
| Password | Set the password for CLICKHOUSE connection. |
| Database Name | Enter the database name of the CLICKHOUSE connection. |
| jdbc connect parameters | Parameter settings for CLICKHOUSE connection, in JSON format. |
## Native Supported
Yes, could use this datasource by default.

View File

@ -0,0 +1,21 @@
# DB2
![DB2 Datasource](../../../../img/new_ui/dev/datasource/DB2.png)
## Datasource Parameters
| **Datasource** | **Description** |
| --- | --- |
| Datasource | Select DB2. |
| Datasource Name | Enter the name of the datasource. |
| Description | Enter a description of the datasource. |
| IP/Host Name | Enter the DB2 service IP. |
| Port | Enter the DB2 service port. |
| Username | Set the username for DB2 connection. |
| Password | Set the password for DB2 connection. |
| Database Name | Enter the database name of the DB2 connection. |
| jdbc connect parameters | Parameter settings for DB2 connection, in JSON format. |
## Native Supported
Yes, could use this datasource by default.

View File

@ -2,24 +2,28 @@
## Use HiveServer2 ## Use HiveServer2
![hive](/img/new_ui/dev/datasource/hive.png) ![hive](../../../../img/new_ui/dev/datasource/hive.png)
- Datasource: select `HIVE` ## Datasource Parameters
- Datasource name: enter the name of the DataSource
- Description: enter a description of the DataSource | **Datasource** | **Description** |
- IP/Host Name: enter the HIVE service IP | --- | --- |
- Port: enter the HIVE service port | Datasource | Select HIVE. |
- Username: set the username for HIVE connection | Datasource name | Enter the name of the DataSource. |
- Password: set the password for HIVE connection | Description | Enter a description of the DataSource. |
- Database name: enter the database name of the HIVE connection | IP/Host Name | Enter the HIVE service IP. |
- Jdbc connection parameters: parameter settings for HIVE connection, in JSON format | Port | Enter the HIVE service port. |
| Username | Set the username for HIVE connection. |
| Password | Set the password for HIVE connection. |
| Database name | Enter the database name of the HIVE connection. |
| Jdbc connection parameters | Parameter settings for HIVE connection, in JSON format. |
> NOTICE: If you wish to execute multiple HIVE SQL in the same session, you could set `support.hive.oneSession = true` in `common.properties`. > NOTICE: If you wish to execute multiple HIVE SQL in the same session, you could set `support.hive.oneSession = true` in `common.properties`.
> It is helpful when you try to set env variables before running HIVE SQL. Default value of `support.hive.oneSession` is `false` and multi-SQLs run in different sessions. > It is helpful when you try to set env variables before running HIVE SQL. Default value of `support.hive.oneSession` is `false` and multi-SQLs run in different sessions.
## Use HiveServer2 HA ZooKeeper ## Use HiveServer2 HA ZooKeeper
![hive-server2](/img/new_ui/dev/datasource/hiveserver2.png) ![hive-server2](../../../../img/new_ui/dev/datasource/hiveserver2.png)
NOTICE: If Kerberos is disabled, ensure the parameter `hadoop.security.authentication.startup.state` is false, and parameter `java.security.krb5.conf.path` value sets null. NOTICE: If Kerberos is disabled, ensure the parameter `hadoop.security.authentication.startup.state` is false, and parameter `java.security.krb5.conf.path` value sets null.
If **Kerberos** is enabled, needs to set the following parameters in `common.properties`: If **Kerberos** is enabled, needs to set the following parameters in `common.properties`:

View File

@ -1,24 +0,0 @@
# DataSource
DataSource supports MySQL, PostgreSQL, Hive/Impala, Spark, ClickHouse, Oracle, SQL Server and other DataSources.
- Click bottom "Data Source Center -> Create Data Source" to create a new datasource.
- Click "Test Connection" to test whether the DataSource can connect successfully(datasource can be saved only if passed the
connection test).
## Using datasource incompatible to Apache LICENSE V2 LICENSE
Some of datasource are native supported to DolphinScheduler while others need users download JDBC driver package manually,
because those JDBC driver incompatible to Apache LICENSE V2 LICENSE. For this reason we have to release DolphinScheduler's
distribute package without those packages, even if this will make more complicated for users. Datasource such as MySQL,
Oracle, SQL Server as the examples, but we have the solution to solve this
### Example
For example, if you want to use MySQL datasource, you need to download the correct JDBC driver from [mysql maven repository](https://repo1.maven.org/maven2/mysql/mysql-connector-java),
and move it into directory `api-server/libs` and `worker-server/libs`. After that, you could activate MySQL datasource by
restarting `api-server` and `worker-server`. Mount to container volume in the same path and restart it if you use container
like Docker.
> Note: If you only want to use MySQL in the datasource center, there is no requirement for the version of MySQL JDBC driver.
> But if you want to use MySQL as the metabase of DolphinScheduler, it only supports [8.0.16 and above](https:/ /repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar) version.

View File

@ -1,18 +1,22 @@
# MySQL # MySQL
![mysql](/img/new_ui/dev/datasource/mysql.png) ![mysql](../../../../img/new_ui/dev/datasource/mysql.png)
- Datasource: select MYSQL ## Datasource Parameters
- Datasource name: enter the name of the DataSource
- Description: enter a description of the DataSource | **Datasource** | **Description** |
- IP/Host Name: enter the MYSQL service IP | --- | --- |
- Port: enter the MYSQL service port | Datasource | Select MYSQL. |
- Username: set the username for MYSQL connection | Datasource name | Enter the name of the DataSource. |
- Password: set the password for MYSQL connection | Description | Enter a description of the DataSource. |
- Database name: enter the database name of the MYSQL connection | IP/Host Name | Enter the MYSQL service IP. |
- Jdbc connection parameters: parameter settings for MYSQL connection, in JSON format | Port | Enter the MYSQL service port. |
| Username | Set the username for MYSQL connection. |
| Password | Set the password for MYSQL connection. |
| Database name | Enter the database name of the MYSQL connection. |
| Jdbc connection parameters | Parameter settings for MYSQL connection, in JSON format. |
## Native Supported ## Native Supported
No, read section example in [introduction](introduction.md) to activate this datasource. No, read section example in [datasource-setting](../howto/datasource-setting.md) `DataSource Center` section to activate this datasource.

View File

@ -0,0 +1,21 @@
# Oracle
![oracle](../../../../img/new_ui/dev/datasource/oracle.png)
## Datasource Parameters
| **Datasource** | **Description** |
| --- | --- |
| Datasource | Select Oracle. |
| Datasource Name | Enter the name of the datasource. |
| Description | Enter a description of the datasource. |
| IP/Host Name | Enter the Oracle service IP. |
| Port | Enter the Oracle service port. |
| Username | Set the username for Oracle connection. |
| Password | Set the password for Oracle connection. |
| Database Name | Enter the database name of the Oracle connection. |
| jdbc connect parameters | Parameter settings for Oracle connection, in JSON format. |
## Native Supported
Yes, could use this datasource by default.

View File

@ -1,16 +1,20 @@
# PostgreSQL # PostgreSQL
![postgresql](/img/new_ui/dev/datasource/postgresql.png) ![postgresql](../../../../img/new_ui/dev/datasource/postgresql.png)
- Datasource: select POSTGRESQL ## Datasource Parameters
- Datasource name: enter the name of the DataSource
- Description: enter a description of the DataSource | **Datasource** | **Description** |
- IP/Host Name: enter the PostgreSQL service IP | --- | --- |
- Port: enter the PostgreSQL service port | Datasource | Select POSTGRESQL. |
- Username: set the username for PostgreSQL connection | Datasource name | Enter the name of the DataSource. |
- Password: set the password for PostgreSQL connection | Description | Enter a description of the DataSource. |
- Database name: enter the database name of the PostgreSQL connection | IP/Host Name | Enter the PostgreSQL service IP. |
- Jdbc connection parameters: parameter settings for PostgreSQL connection, in JSON format | Port | Enter the PostgreSQL service port. |
| Username | Set the username for PostgreSQL connection. |
| Password | Set the password for PostgreSQL connection. |
| Database name | Enter the database name of the PostgreSQL connection. |
| Jdbc connection parameters | Parameter settings for PostgreSQL connection, in JSON format. |
## Native Supported ## Native Supported

View File

@ -0,0 +1,22 @@
# Presto
![Presto Datasource](../../../../img/new_ui/dev/datasource/presto.png)
## Datasource Parameters
| **Datasource** | **Description** |
| --- | --- |
| Datasource | Select Presto. |
| Datasource Name | Enter the name of the datasource. |
| Description | Enter a description of the datasource. |
| IP/Host Name | Enter the Presto service IP. |
| Port | Enter the Presto service port. |
| Username | Set the username for Presto connection. |
| Password | Set the password for Presto connection. |
| Database Name | Enter the database name of the Presto connection. |
| jdbc connect parameters | Parameter settings for Presto connection, in JSON format. |
## Native Supported
Yes, could use this datasource by default.

View File

@ -0,0 +1,21 @@
# Amazon Redshift
![Redshift datasource](../../../../img/new_ui/dev/datasource/redshift.png)
## Datasource Parameters
| **Datasource** | **Description** |
| --- | --- |
| Datasource | Select Redshift. |
| Datasource Name | Enter the name of the datasource. |
| Description | Enter a description of the datasource. |
| IP/Host Name | Enter the Redshift service IP. |
| Port | Enter the Redshift service port. |
| Username | Set the username for Redshift connection. |
| Password | Set the password for Redshift connection. |
| Database Name | Enter the database name of the Redshift connection. |
| jdbc connect parameters | Parameter settings for Redshift connection, in JSON format. |
## Native Supported
Yes, could use this datasource by default.

View File

@ -1,16 +1,20 @@
# Spark # Spark
![sparksql](/img/new_ui/dev/datasource/sparksql.png) ![sparksql](../../../../img/new_ui/dev/datasource/sparksql.png)
- Datasource: select Spark ## Datasource Parameters
- Datasource name: enter the name of the DataSource
- Description: enter a description of the DataSource | **Datasource** | **Description** |
- IP/Host Name: enter the Spark service IP | --- | --- |
- Port: enter the Spark service port | Datasource | Select Spark. |
- Username: set the username for Spark connection | Datasource name | Enter the name of the DataSource. |
- Password: set the password for Spark connection | Description | Enter a description of the DataSource. |
- Database name: enter the database name of the Spark connection | IP/Host Name | Enter the Spark service IP. |
- Jdbc connection parameters: parameter settings for Spark connection, in JSON format | Port | Enter the Spark service port. |
| Username | Set the username for Spark connection. |
| Password | Set the password for Spark connection. |
| Database name | Enter the database name of the Spark connection. |
| Jdbc connection parameters | Parameter settings for Spark connection, in JSON format. |
## Native Supported ## Native Supported

Some files were not shown because too many files have changed in this diff Show More