Compare commits
314 Commits
dev
...
2.0.5-rele
| Author | SHA1 | Date |
|---|---|---|
|
|
d88656c4ce | |
|
|
f31328276c | |
|
|
d95132921d | |
|
|
6d47fc156f | |
|
|
8d8d597dc6 | |
|
|
7b66774b31 | |
|
|
9b9a4cdfb3 | |
|
|
3ea4a9e7bf | |
|
|
43b4423915 | |
|
|
ac5c3936ee | |
|
|
2f2a871575 | |
|
|
0ff01e3c68 | |
|
|
dc63c2f2b8 | |
|
|
e608f4ad42 | |
|
|
29ab135cbc | |
|
|
d91d403749 | |
|
|
66be70f903 | |
|
|
3a73c50c96 | |
|
|
6d0e367f69 | |
|
|
aa117136cf | |
|
|
97ba97e891 | |
|
|
05f3fc64d5 | |
|
|
555288dbc6 | |
|
|
1f6be286cc | |
|
|
2dec94d3b4 | |
|
|
3158b2c179 | |
|
|
21a1d9cd9e | |
|
|
8d7ed3f6c4 | |
|
|
b9e3b857c4 | |
|
|
2aa5b4c6cc | |
|
|
7ac376923f | |
|
|
7a7558c9dd | |
|
|
9bfff90c66 | |
|
|
9e133a2f50 | |
|
|
5ec9d1c4a9 | |
|
|
de476edc38 | |
|
|
2f53c4f69c | |
|
|
6d40dcb12c | |
|
|
cf19ff000b | |
|
|
8f990abaf4 | |
|
|
a322f9cf27 | |
|
|
d5d71842e9 | |
|
|
30668960fb | |
|
|
a24a81685a | |
|
|
8b601a7f2c | |
|
|
f1a3c52a66 | |
|
|
f5241e5d27 | |
|
|
4748df9990 | |
|
|
05545e1041 | |
|
|
6bf8063fe8 | |
|
|
8e9b4a9821 | |
|
|
d2bd95d453 | |
|
|
5ba55cc55d | |
|
|
40762a2ef9 | |
|
|
5158f4a0a9 | |
|
|
0ba4263d90 | |
|
|
49ce61e496 | |
|
|
6d0b5a5837 | |
|
|
bca7353fe4 | |
|
|
3b30ed7f51 | |
|
|
59c0abcc27 | |
|
|
2d3c50cbae | |
|
|
cf9e04ce1d | |
|
|
1f0aeabb92 | |
|
|
600ee5e77c | |
|
|
4d5b5b42a4 | |
|
|
d6d806c3cc | |
|
|
99cfd4864a | |
|
|
dbcf179482 | |
|
|
ceae42721f | |
|
|
7b0617b58d | |
|
|
889274562e | |
|
|
584ad1cd17 | |
|
|
7b1744baf5 | |
|
|
1642968b34 | |
|
|
329a37ccee | |
|
|
ddd516cb96 | |
|
|
f02cde30b8 | |
|
|
90a33e06eb | |
|
|
46a5d17bf6 | |
|
|
8dc529d35f | |
|
|
419f18f8b8 | |
|
|
6b2ae79d5f | |
|
|
be86eaf357 | |
|
|
5592e7bb7b | |
|
|
1d3f77bedb | |
|
|
24ddd07493 | |
|
|
d1fcb0e821 | |
|
|
a668c46e89 | |
|
|
4d525536f6 | |
|
|
c4eab17bd4 | |
|
|
28cbaf05cb | |
|
|
35a1d732c6 | |
|
|
6aaecdbd0b | |
|
|
f5fd29a05d | |
|
|
f77a117803 | |
|
|
b8f0bebadd | |
|
|
a262eebbce | |
|
|
ed0c233c1a | |
|
|
8f441b7776 | |
|
|
b36c1967b8 | |
|
|
27795e695e | |
|
|
720e0ad360 | |
|
|
890faffd22 | |
|
|
24747b3dae | |
|
|
85b3b2d29d | |
|
|
bcef5f5588 | |
|
|
5ede171140 | |
|
|
4f4cbba80d | |
|
|
32fb3f84df | |
|
|
f2aef53ad1 | |
|
|
54525806df | |
|
|
fa52022ccd | |
|
|
d23b3444bb | |
|
|
affb2a3f0f | |
|
|
df40cdc116 | |
|
|
6033e98a2d | |
|
|
250e857c70 | |
|
|
744577f252 | |
|
|
9e068d23e2 | |
|
|
8c5f364796 | |
|
|
6c819ee16d | |
|
|
f8942bf798 | |
|
|
8fa61cf050 | |
|
|
1693405383 | |
|
|
5c297a594c | |
|
|
281cea8a64 | |
|
|
ab1467e622 | |
|
|
c956185e00 | |
|
|
1657ce31a6 | |
|
|
0b6f3fb0c3 | |
|
|
60001f807e | |
|
|
895b0fa9b8 | |
|
|
49089d3dc1 | |
|
|
533a89c5e1 | |
|
|
3aa939eaa9 | |
|
|
65a6b580ab | |
|
|
0a65854ee3 | |
|
|
9fa239518c | |
|
|
f6fd7f6540 | |
|
|
255670fda9 | |
|
|
54a89e9e24 | |
|
|
ec0e57c53d | |
|
|
921f388077 | |
|
|
14888518db | |
|
|
bef4fa8321 | |
|
|
b17fa26d61 | |
|
|
79ab27299e | |
|
|
5dad635ff0 | |
|
|
7ec4cb9dc3 | |
|
|
87e091076a | |
|
|
8b239a0728 | |
|
|
5a8cd58ee5 | |
|
|
41c05b53c7 | |
|
|
db5367ab68 | |
|
|
9a49077fdf | |
|
|
29a4323540 | |
|
|
9a307dc71a | |
|
|
fc233f06ff | |
|
|
a97bc2c756 | |
|
|
c011f6487a | |
|
|
bb60c518ef | |
|
|
26b0de16dc | |
|
|
75a70eda00 | |
|
|
4e8507e6ca | |
|
|
d397eff848 | |
|
|
a8edeac1e3 | |
|
|
d7eab830a7 | |
|
|
7ecf51597f | |
|
|
30848478bf | |
|
|
c2d0acd713 | |
|
|
efbbaff8ac | |
|
|
b4c422e977 | |
|
|
98ab5219ff | |
|
|
58f5f398bc | |
|
|
e9d27015c3 | |
|
|
1d4076fbc2 | |
|
|
e769bbf178 | |
|
|
0a44a47266 | |
|
|
1e0757bd8e | |
|
|
17f8e1879d | |
|
|
f54f2c1f91 | |
|
|
0b376f7f90 | |
|
|
52f610ada1 | |
|
|
2bff58e5e1 | |
|
|
70e67dfc67 | |
|
|
f9851fa181 | |
|
|
623d154a17 | |
|
|
449c098aef | |
|
|
4ad1d4b252 | |
|
|
1f821ab1a6 | |
|
|
548f43dc26 | |
|
|
659d2bb4b3 | |
|
|
423d7ea3a1 | |
|
|
ec0c1b53a8 | |
|
|
b2143c31e6 | |
|
|
e96a39f57c | |
|
|
1a139342f9 | |
|
|
5813d6bed3 | |
|
|
e3d85476f2 | |
|
|
a20462a81c | |
|
|
b7bd813e35 | |
|
|
c158e5790b | |
|
|
b3e8704194 | |
|
|
40e00585aa | |
|
|
cea283f7db | |
|
|
26d2c52c25 | |
|
|
77f4b0aaf5 | |
|
|
6955ba5a6f | |
|
|
0eac3e8eae | |
|
|
9283ee2bdf | |
|
|
36fd0c83f5 | |
|
|
2bf3b22d64 | |
|
|
19cb1237b3 | |
|
|
6821c7a9ac | |
|
|
8a27ae4593 | |
|
|
b31338b950 | |
|
|
adaeb962ec | |
|
|
b7d2b11d56 | |
|
|
549824a036 | |
|
|
09dbfa2048 | |
|
|
61e86b242b | |
|
|
80c4aaaea5 | |
|
|
8585b48402 | |
|
|
5582fedafa | |
|
|
d8398fe7fd | |
|
|
e755355bab | |
|
|
303954873f | |
|
|
9a5b8edaf8 | |
|
|
652b9230a7 | |
|
|
4015448441 | |
|
|
c5fdcaa12c | |
|
|
604c224346 | |
|
|
446a4c5e38 | |
|
|
9bd693b7ef | |
|
|
378a015cc8 | |
|
|
c6c497dbcd | |
|
|
03e62dc434 | |
|
|
7f554a1ca8 | |
|
|
92347a73e0 | |
|
|
eabb30216c | |
|
|
ae087699af | |
|
|
72dc21a4b9 | |
|
|
37b11bf606 | |
|
|
5283e54dc8 | |
|
|
4baa211e15 | |
|
|
4e812e97c3 | |
|
|
523357f574 | |
|
|
98465b1281 | |
|
|
98b8d5424a | |
|
|
cb4b6f1d92 | |
|
|
e93a08efb9 | |
|
|
f375be7a63 | |
|
|
93ad2823f4 | |
|
|
a007595dbc | |
|
|
275443ff38 | |
|
|
7b9abf896a | |
|
|
7684a2e03c | |
|
|
855c4b7561 | |
|
|
e806bd2263 | |
|
|
2a623561b1 | |
|
|
858ec26b72 | |
|
|
61d3fec0c6 | |
|
|
800558f417 | |
|
|
cd173ac140 | |
|
|
2446976251 | |
|
|
d83661db25 | |
|
|
e302e510a2 | |
|
|
5b77cd29fc | |
|
|
7a3976d840 | |
|
|
d13652dd81 | |
|
|
b9e0079023 | |
|
|
8fa1e8817d | |
|
|
58d03d632e | |
|
|
d661e0395d | |
|
|
6cf3328be1 | |
|
|
fcfcedea0a | |
|
|
c82d908690 | |
|
|
c644f8608f | |
|
|
38fb2b4413 | |
|
|
f77efc551f | |
|
|
d6b32fecb7 | |
|
|
c44f70b372 | |
|
|
d1ef024db1 | |
|
|
2ab404e25b | |
|
|
c53e21b981 | |
|
|
257b76cccf | |
|
|
986f81381d | |
|
|
a729c82974 | |
|
|
1ac362463e | |
|
|
8bb5127e77 | |
|
|
81b13533a6 | |
|
|
b94735c3b7 | |
|
|
f4d826eede | |
|
|
4723d64d56 | |
|
|
6fe27389d9 | |
|
|
3c8e7dd5b8 | |
|
|
3bd2b91d05 | |
|
|
5f19d5be41 | |
|
|
0659aa3f46 | |
|
|
07119bc17f | |
|
|
1fd12a59b1 | |
|
|
f60dc3eb2a | |
|
|
a9338fe697 | |
|
|
6ffd019683 | |
|
|
9942d73db6 | |
|
|
cbc457b1a7 | |
|
|
8d18ab510e | |
|
|
3702845c1f | |
|
|
2460eb6fb9 | |
|
|
f8b68dccd7 | |
|
|
677a8d427e | |
|
|
e5cdd8bd27 | |
|
|
c99ad738c0 |
|
|
@ -15,6 +15,7 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_datasource_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
dolphinscheduler/dolphinscheduler-alert @kezhenxu94
|
||||
dolphinscheduler/dolphinscheduler-e2e @kezhenxu94
|
||||
dolphinscheduler/dolphinscheduler-registry @kezhenxu94
|
||||
dolphinscheduler/dolphinscheduler-standalone-server @kezhenxu94
|
||||
|
|
@ -38,16 +38,3 @@ runs:
|
|||
with:
|
||||
reviewdog_version: v0.10.2
|
||||
|
||||
- shell: bash
|
||||
run: ./mvnw -B -q checkstyle:checkstyle-aggregate
|
||||
|
||||
- shell: bash
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ inputs.token }}
|
||||
run: |
|
||||
if [[ -n "${{ inputs.token }}" ]]; then
|
||||
reviewdog -f=checkstyle \
|
||||
-reporter="github-pr-check" \
|
||||
-filter-mode="added" \
|
||||
-fail-on-error="true" < target/checkstyle-result.xml
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -55,13 +55,6 @@ jobs:
|
|||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven
|
||||
- name: Bootstrap database
|
||||
run: |
|
||||
sed -i "/image: bitnami\/postgresql/a\ ports:\n - 5432:5432" $(pwd)/docker/docker-swarm/docker-compose.yml
|
||||
sed -i "/image: bitnami\/zookeeper/a\ ports:\n - 2181:2181" $(pwd)/docker/docker-swarm/docker-compose.yml
|
||||
docker-compose -f $(pwd)/docker/docker-swarm/docker-compose.yml up -d dolphinscheduler-zookeeper dolphinscheduler-postgresql
|
||||
until docker logs docker-swarm_dolphinscheduler-postgresql_1 2>&1 | grep 'listening on IPv4 address'; do echo "waiting for postgresql ready ..."; sleep 1; done
|
||||
docker run --rm --network docker-swarm_dolphinscheduler -v $(pwd)/sql/dolphinscheduler_postgre.sql:/docker-entrypoint-initdb.d/dolphinscheduler_postgre.sql bitnami/postgresql:11.11.0 bash -c "PGPASSWORD=root psql -h docker-swarm_dolphinscheduler-postgresql_1 -U root -d dolphinscheduler -v ON_ERROR_STOP=1 -f /docker-entrypoint-initdb.d/dolphinscheduler_postgre.sql"
|
||||
|
||||
- name: Run Unit tests
|
||||
run: ./mvnw clean verify -B -Dmaven.test.skip=false
|
||||
|
|
@ -85,7 +78,7 @@ jobs:
|
|||
-Dsonar.core.codeCoveragePlugin=jacoco
|
||||
-Dsonar.projectKey=apache-dolphinscheduler
|
||||
-Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682
|
||||
-Dsonar.exclusions=dolphinscheduler-ui/src/**/i18n/locale/*.js,dolphinscheduler-microbench/src/**/*
|
||||
-Dsonar.exclusions=dolphinscheduler-ui/src/**/i18n/locale/*.js
|
||||
-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
|
|
@ -46,3 +46,17 @@ dolphinscheduler-server/src/main/resources/logback.xml
|
|||
dolphinscheduler-ui/dist
|
||||
dolphinscheduler-ui/node
|
||||
docker/build/apache-dolphinscheduler*
|
||||
|
||||
# ------------------
|
||||
# pydolphinscheduler
|
||||
# ------------------
|
||||
# Cache
|
||||
__pycache__/
|
||||
|
||||
# Build
|
||||
build/
|
||||
*egg-info/
|
||||
|
||||
# Test coverage
|
||||
.coverage
|
||||
htmlcov/
|
||||
|
|
|
|||
|
|
@ -26,8 +26,9 @@ header:
|
|||
- LICENSE
|
||||
- DISCLAIMER
|
||||
- dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/ScriptRunner.java
|
||||
- dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/CodeGenerateUtils.java
|
||||
- mvnw.cmd
|
||||
- sql/soft_version
|
||||
- dolphinscheduler-dao/src/main/resources/sql/soft_version
|
||||
- .mvn
|
||||
- .gitattributes
|
||||
- '**/licenses/**/LICENSE-*'
|
||||
|
|
@ -45,5 +46,6 @@ header:
|
|||
- '.github/actions/lable-on-issue/**'
|
||||
- '.github/actions/reviewdog-setup/**'
|
||||
- '.github/actions/translate-on-issue/**'
|
||||
- '**/.gitkeep'
|
||||
|
||||
comment: on-failure
|
||||
|
|
|
|||
2
LICENSE
2
LICENSE
|
|
@ -219,4 +219,4 @@ The text of each license is the standard Apache 2.0 license.
|
|||
DolphinPluginClassLoader from https://github.com/prestosql/presto Apache 2.0
|
||||
DolphinPluginDiscovery from https://github.com/prestosql/presto Apache 2.0
|
||||
DolphinPluginLoader from https://github.com/prestosql/presto Apache 2.0
|
||||
|
||||
CodeGenerateUtils from https://github.com/twitter-archive/snowflake/tree/snowflake-2010 Apache 2.0
|
||||
|
|
|
|||
2
NOTICE
2
NOTICE
|
|
@ -1,5 +1,5 @@
|
|||
Apache DolphinScheduler
|
||||
Copyright 2019-2021 The Apache Software Foundation
|
||||
Copyright 2019-2022 The Apache Software Foundation
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -41,7 +41,7 @@ Its main objectives are as follows:
|
|||
## What's in DolphinScheduler
|
||||
|
||||
Stability | Accessibility | Features | Scalability |
|
||||
-- | -- | -- | --
|
||||
--------- | ------------- | -------- | ------------|
|
||||
Decentralized multi-master and multi-worker | Visualization of workflow key information, such as task status, task type, retry times, task operation machine information, visual variables, and so on at a glance. | Support pause, recover operation | Support customized task types
|
||||
support HA | Visualization of all workflow operations, dragging tasks to draw DAGs, configuring data sources and resources. At the same time, for third-party systems, provide API mode operations. | Users on DolphinScheduler can achieve many-to-one or one-to-one mapping relationship through tenants and Hadoop users, which is very important for scheduling large data jobs. | The scheduler supports distributed scheduling, and the overall scheduling capability will increase linearly with the scale of the cluster. Master and Worker support dynamic adjustment.
|
||||
Overload processing: By using the task queue mechanism, the number of schedulable tasks on a single machine can be flexibly configured. Machine jam can be avoided with high tolerance to numbers of tasks cached in task queue. | One-click deployment | Support traditional shell tasks, and big data platform task scheduling: MR, Spark, SQL (MySQL, PostgreSQL, hive, spark SQL), Python, Procedure, Sub_Process | |
|
||||
|
|
@ -59,11 +59,11 @@ Overload processing: By using the task queue mechanism, the number of schedulabl
|
|||
|
||||
## QuickStart in Docker
|
||||
|
||||
Please referer the official website document: [QuickStart in Docker](https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/docker-deployment.html)
|
||||
Please refer the official website document: [QuickStart in Docker](https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/guide/installation/docker.html)
|
||||
|
||||
## QuickStart in Kubernetes
|
||||
|
||||
Please referer the official website document: [QuickStart in Kubernetes](https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/kubernetes-deployment.html)
|
||||
Please refer to the official website document: [QuickStart in Kubernetes](https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/guide/installation/kubernetes.html)
|
||||
|
||||
## How to Build
|
||||
|
||||
|
|
@ -95,8 +95,8 @@ You are very welcome to communicate with the developers and users of Dolphin Sch
|
|||
2. Follow the [Twitter account of DolphinScheduler](https://twitter.com/dolphinschedule) and get the latest news on time.
|
||||
|
||||
### Contributor over time
|
||||
|
||||
[](https://www.apiseven.com/en/contributor-graph?chart=contributorOverTime&repo=apache/dolphinscheduler)
|
||||
|
||||
[](https://www.apiseven.com/en/contributor-graph?chart=contributorOverTime&repo=apache/dolphinscheduler)
|
||||
|
||||
## How to Contribute
|
||||
|
||||
|
|
|
|||
|
|
@ -1,132 +0,0 @@
|
|||
### Instructions for using the Dolphin Scheduler's Ambari plug-in
|
||||
|
||||
#### Note
|
||||
|
||||
1. This document is intended for users with a basic understanding of Ambari
|
||||
2. This document is a description of adding the Dolphin Scheduler service to the installed Ambari service
|
||||
3. This document is based on version 2.5.2 of Ambari
|
||||
|
||||
#### Installation preparation
|
||||
|
||||
1. Prepare the RPM packages
|
||||
|
||||
- It is generated by executing the command ```mvn -U clean install -Prpmbuild -Dmaven.test.skip=true -X``` in the project root directory (In the directory: dolphinscheduler-dist/target/rpm/apache-dolphinscheduler/RPMS/noarch )
|
||||
|
||||
2. Create an installation for DS,who have read and write access to the installation directory (/opt/soft)
|
||||
|
||||
3. Install with rpm package
|
||||
|
||||
- Manual installation (recommended):
|
||||
- Copy the prepared RPM packages to each node of the cluster.
|
||||
- Execute with DS installation user: ```rpm -ivh apache-dolphinscheduler-xxx.noarch.rpm```
|
||||
- Mysql-connector-java packaged using the default POM file will not be included.
|
||||
- The RPM package was packaged in the project with the installation path of /opt/soft.
|
||||
If you use mysql as the database, you need add it manually.
|
||||
|
||||
- Automatic installation with ambari
|
||||
- Each node of the cluster needs to configure the local yum source
|
||||
- Copy the prepared RPM packages to each node local yum source
|
||||
|
||||
4. Copy plug-in directory
|
||||
|
||||
- copy directory ambari_plugin/common-services/DOLPHIN to ambari-server/resources/common-services/
|
||||
- copy directory ambari_plugin/statcks/DOLPHIN to ambari-server/resources/stacks/HDP/2.6/services/--stack version is selected based on the actual situation
|
||||
|
||||
5. Initializes the database information
|
||||
|
||||
```
|
||||
-- Create the database for the Dolphin Scheduler:dolphinscheduler
|
||||
CREATE DATABASE dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE
|
||||
utf8_general_ci;
|
||||
|
||||
-- Initialize the user and password for the dolphinscheduler database and assign permissions
|
||||
-- Replace the {user} in the SQL statement below with the user of the dolphinscheduler database
|
||||
GRANT ALL PRIVILEGES ON dolphinscheduler.* TO '{user}'@'%' IDENTIFIED BY '{password}';
|
||||
GRANT ALL PRIVILEGES ON dolphinscheduler.* TO '{user}'@'localhost' IDENTIFIED BY
|
||||
'{password}';
|
||||
flush privileges;
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Ambari Install Dolphin Scheduler
|
||||
- **NOTE: You have to install zookeeper first**
|
||||
|
||||
1. Install Dolphin Scheduler on ambari web interface
|
||||
|
||||

|
||||
|
||||
2. Select the nodes for the Dolphin Scheduler's Master installation
|
||||
|
||||

|
||||
|
||||
3. Configure the Dolphin Scheduler's nodes for Worker, Api, Logger, Alert installation
|
||||
|
||||

|
||||
|
||||
4. Set the installation users of the Dolphin Scheduler service (created in step 1) and the user groups they belong to
|
||||
|
||||

|
||||
|
||||
5. System Env Optimization will export some system environment config. Modify according to actual situation
|
||||
|
||||

|
||||
|
||||
6. Configure the database information (same as in the initialization database in step 1)
|
||||
|
||||

|
||||
|
||||
7. Configure additional information if needed
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
8. Perform the next steps as normal
|
||||
|
||||

|
||||
|
||||
9. The interface after successful installation
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
------
|
||||
|
||||
|
||||
|
||||
#### Add components to the node through Ambari -- for example, add a DS Worker
|
||||
|
||||
***NOTE***: DS Logger is the installation dependent component of DS Worker in Dolphin's Ambari installation (need to add installation first; Prevent the Job log on the corresponding Worker from being checked)
|
||||
|
||||
1. Locate the component node to add -- for example, node ark3
|
||||
|
||||

|
||||
|
||||
2. Add components -- the drop-down list is all addable
|
||||
|
||||

|
||||
|
||||
3. Confirm component addition
|
||||
|
||||

|
||||
|
||||
4. After adding DS Worker and DS Logger components
|
||||
|
||||

|
||||
|
||||
5. Start the component
|
||||
|
||||

|
||||
|
||||
|
||||
#### Remove the component from the node with Ambari
|
||||
|
||||
1. Stop the component in the corresponding node
|
||||
|
||||

|
||||
|
||||
2. Remove components
|
||||
|
||||

|
||||
|
|
@ -1,158 +0,0 @@
|
|||
{
|
||||
"DOLPHIN": {
|
||||
"service": [],
|
||||
"DOLPHIN_API": [
|
||||
{
|
||||
"name": "dolphin_api_port_check",
|
||||
"label": "dolphin_api_port_check",
|
||||
"description": "dolphin_api_port_check.",
|
||||
"interval": 10,
|
||||
"scope": "ANY",
|
||||
"source": {
|
||||
"type": "PORT",
|
||||
"uri": "{{dolphin-application-api/server.port}}",
|
||||
"default_port": 12345,
|
||||
"reporting": {
|
||||
"ok": {
|
||||
"text": "TCP OK - {0:.3f}s response on port {1}"
|
||||
},
|
||||
"warning": {
|
||||
"text": "TCP OK - {0:.3f}s response on port {1}",
|
||||
"value": 1.5
|
||||
},
|
||||
"critical": {
|
||||
"text": "Connection failed: {0} to {1}:{2}",
|
||||
"value": 5.0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"DOLPHIN_LOGGER": [
|
||||
{
|
||||
"name": "dolphin_logger_port_check",
|
||||
"label": "dolphin_logger_port_check",
|
||||
"description": "dolphin_logger_port_check.",
|
||||
"interval": 10,
|
||||
"scope": "ANY",
|
||||
"source": {
|
||||
"type": "PORT",
|
||||
"uri": "{{dolphin-common/loggerserver.rpc.port}}",
|
||||
"default_port": 50051,
|
||||
"reporting": {
|
||||
"ok": {
|
||||
"text": "TCP OK - {0:.3f}s response on port {1}"
|
||||
},
|
||||
"warning": {
|
||||
"text": "TCP OK - {0:.3f}s response on port {1}",
|
||||
"value": 1.5
|
||||
},
|
||||
"critical": {
|
||||
"text": "Connection failed: {0} to {1}:{2}",
|
||||
"value": 5.0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"DOLPHIN_MASTER": [
|
||||
{
|
||||
"name": "DOLPHIN_MASTER_CHECK",
|
||||
"label": "check dolphin scheduler master status",
|
||||
"description": "",
|
||||
"interval":10,
|
||||
"scope": "HOST",
|
||||
"enabled": true,
|
||||
"source": {
|
||||
"type": "SCRIPT",
|
||||
"path": "DOLPHIN/1.3.0/package/alerts/alert_dolphin_scheduler_status.py",
|
||||
"parameters": [
|
||||
|
||||
{
|
||||
"name": "connection.timeout",
|
||||
"display_name": "Connection Timeout",
|
||||
"value": 5.0,
|
||||
"type": "NUMERIC",
|
||||
"description": "The maximum time before this alert is considered to be CRITICAL",
|
||||
"units": "seconds",
|
||||
"threshold": "CRITICAL"
|
||||
},
|
||||
{
|
||||
"name": "alertName",
|
||||
"display_name": "alertName",
|
||||
"value": "DOLPHIN_MASTER",
|
||||
"type": "STRING",
|
||||
"description": "alert name"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"DOLPHIN_WORKER": [
|
||||
{
|
||||
"name": "DOLPHIN_WORKER_CHECK",
|
||||
"label": "check dolphin scheduler worker status",
|
||||
"description": "",
|
||||
"interval":10,
|
||||
"scope": "HOST",
|
||||
"enabled": true,
|
||||
"source": {
|
||||
"type": "SCRIPT",
|
||||
"path": "DOLPHIN/1.3.0/package/alerts/alert_dolphin_scheduler_status.py",
|
||||
"parameters": [
|
||||
|
||||
{
|
||||
"name": "connection.timeout",
|
||||
"display_name": "Connection Timeout",
|
||||
"value": 5.0,
|
||||
"type": "NUMERIC",
|
||||
"description": "The maximum time before this alert is considered to be CRITICAL",
|
||||
"units": "seconds",
|
||||
"threshold": "CRITICAL"
|
||||
},
|
||||
{
|
||||
"name": "alertName",
|
||||
"display_name": "alertName",
|
||||
"value": "DOLPHIN_WORKER",
|
||||
"type": "STRING",
|
||||
"description": "alert name"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"DOLPHIN_ALERT": [
|
||||
{
|
||||
"name": "DOLPHIN_DOLPHIN_ALERT_CHECK",
|
||||
"label": "check dolphin scheduler alert status",
|
||||
"description": "",
|
||||
"interval":10,
|
||||
"scope": "HOST",
|
||||
"enabled": true,
|
||||
"source": {
|
||||
"type": "SCRIPT",
|
||||
"path": "DOLPHIN/1.3.0/package/alerts/alert_dolphin_scheduler_status.py",
|
||||
"parameters": [
|
||||
|
||||
{
|
||||
"name": "connection.timeout",
|
||||
"display_name": "Connection Timeout",
|
||||
"value": 5.0,
|
||||
"type": "NUMERIC",
|
||||
"description": "The maximum time before this alert is considered to be CRITICAL",
|
||||
"units": "seconds",
|
||||
"threshold": "CRITICAL"
|
||||
},
|
||||
{
|
||||
"name": "alertName",
|
||||
"display_name": "alertName",
|
||||
"value": "DOLPHIN_ALERT",
|
||||
"type": "STRING",
|
||||
"description": "alert name"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>alert.type</name>
|
||||
<value>EMAIL</value>
|
||||
<description>alert type is EMAIL/SMS</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.protocol</name>
|
||||
<value>SMTP</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.server.host</name>
|
||||
<value>xxx.xxx.com</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.server.port</name>
|
||||
<value>25</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.sender</name>
|
||||
<value>admin</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.user</name>
|
||||
<value>admin</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.passwd</name>
|
||||
<value>000000</value>
|
||||
<description></description>
|
||||
<property-type>PASSWORD</property-type>
|
||||
<value-attributes>
|
||||
<type>password</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>mail.smtp.starttls.enable</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.smtp.ssl.enable</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.smtp.ssl.trust</name>
|
||||
<value>xxx.xxx.com</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>enterprise.wechat.enable</name>
|
||||
<value>false</value>
|
||||
<description></description>
|
||||
<value-attributes>
|
||||
<type>value-list</type>
|
||||
<entries>
|
||||
<entry>
|
||||
<value>true</value>
|
||||
<label>Enabled</label>
|
||||
</entry>
|
||||
<entry>
|
||||
<value>false</value>
|
||||
<label>Disabled</label>
|
||||
</entry>
|
||||
</entries>
|
||||
<selection-cardinality>1</selection-cardinality>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>enterprise.wechat.corp.id</name>
|
||||
<value>wechatId</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>enterprise.wechat.secret</name>
|
||||
<value>secret</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>enterprise.wechat.agent.id</name>
|
||||
<value>agentId</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>enterprise.wechat.users</name>
|
||||
<value>wechatUsers</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>server.port</name>
|
||||
<value>12345</value>
|
||||
<description>
|
||||
server port
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
</property>
|
||||
<property>
|
||||
<name>server.servlet.session.timeout</name>
|
||||
<value>7200</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>server.servlet.context-path</name>
|
||||
<value>/dolphinscheduler/</value>
|
||||
<description>
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.servlet.multipart.max-file-size</name>
|
||||
<value>1024</value>
|
||||
<value-attributes>
|
||||
<unit>MB</unit>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.servlet.multipart.max-request-size</name>
|
||||
<value>1024</value>
|
||||
<value-attributes>
|
||||
<unit>MB</unit>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>server.jetty.max-http-post-size</name>
|
||||
<value>5000000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.messages.encoding</name>
|
||||
<value>UTF-8</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.messages.basename</name>
|
||||
<value>i18n/messages</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>security.authentication.type</name>
|
||||
<value>PASSWORD</value>
|
||||
<description></description>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,158 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>resource.storage.type</name>
|
||||
<display-name>Choose Resource Upload Startup Type</display-name>
|
||||
<description>
|
||||
Resource upload startup type : HDFS,S3,NONE
|
||||
</description>
|
||||
<value>NONE</value>
|
||||
<value-attributes>
|
||||
<type>value-list</type>
|
||||
<entries>
|
||||
<entry>
|
||||
<value>HDFS</value>
|
||||
<label>HDFS</label>
|
||||
</entry>
|
||||
<entry>
|
||||
<value>S3</value>
|
||||
<label>S3</label>
|
||||
</entry>
|
||||
<entry>
|
||||
<value>NONE</value>
|
||||
<label>NONE</label>
|
||||
</entry>
|
||||
</entries>
|
||||
<selection-cardinality>1</selection-cardinality>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>resource.upload.path</name>
|
||||
<value>/dolphinscheduler</value>
|
||||
<description>
|
||||
resource store on HDFS/S3 path, resource file will store to this hadoop hdfs path, self configuration, please make sure the directory exists on hdfs and have read write permissions。"/dolphinscheduler" is recommended
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>data.basedir.path</name>
|
||||
<value>/tmp/dolphinscheduler</value>
|
||||
<description>
|
||||
user data local directory path, please make sure the directory exists and have read write permissions
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>hadoop.security.authentication.startup.state</name>
|
||||
<value>false</value>
|
||||
<value-attributes>
|
||||
<type>value-list</type>
|
||||
<entries>
|
||||
<entry>
|
||||
<value>true</value>
|
||||
<label>Enabled</label>
|
||||
</entry>
|
||||
<entry>
|
||||
<value>false</value>
|
||||
<label>Disabled</label>
|
||||
</entry>
|
||||
</entries>
|
||||
<selection-cardinality>1</selection-cardinality>
|
||||
</value-attributes>
|
||||
<description>whether kerberos starts</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>java.security.krb5.conf.path</name>
|
||||
<value>/opt/krb5.conf</value>
|
||||
<description>
|
||||
java.security.krb5.conf path
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>login.user.keytab.username</name>
|
||||
<value>hdfs-mycluster@ESZ.COM</value>
|
||||
<description>
|
||||
LoginUserFromKeytab user
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>login.user.keytab.path</name>
|
||||
<value>/opt/hdfs.headless.keytab</value>
|
||||
<description>
|
||||
LoginUserFromKeytab path
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>resource.view.suffixs</name>
|
||||
<value>txt,log,sh,conf,cfg,py,java,sql,hql,xml,properties</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>hdfs.root.user</name>
|
||||
<value>hdfs</value>
|
||||
<description>
|
||||
Users who have permission to create directories under the HDFS root path
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>fs.defaultFS</name>
|
||||
<value>hdfs://mycluster:8020</value>
|
||||
<description>
|
||||
HA or single namenode,
|
||||
If namenode ha needs to copy core-site.xml and hdfs-site.xml to the conf directory,
|
||||
support s3,for example : s3a://dolphinscheduler
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>fs.s3a.endpoint</name>
|
||||
<value>http://host:9010</value>
|
||||
<description>
|
||||
s3 need,s3 endpoint
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>fs.s3a.access.key</name>
|
||||
<value>A3DXS30FO22544RE</value>
|
||||
<description>
|
||||
s3 need,s3 access key
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>fs.s3a.secret.key</name>
|
||||
<value>OloCLq3n+8+sdPHUhJ21XrSxTC+JK</value>
|
||||
<description>
|
||||
s3 need,s3 secret key
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>kerberos.expire.time</name>
|
||||
<value>7</value>
|
||||
<description></description>
|
||||
</property>
|
||||
|
||||
</configuration>
|
||||
|
|
@ -1,206 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>spring.datasource.initialSize</name>
|
||||
<value>5</value>
|
||||
<description>
|
||||
Init connection number
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.minIdle</name>
|
||||
<value>5</value>
|
||||
<description>
|
||||
Min connection number
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.maxActive</name>
|
||||
<value>50</value>
|
||||
<description>
|
||||
Max connection number
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.maxWait</name>
|
||||
<value>60000</value>
|
||||
<description>
|
||||
Max wait time for get a connection in milliseconds.
|
||||
If configuring maxWait, fair locks are enabled by default and concurrency efficiency decreases.
|
||||
If necessary, unfair locks can be used by configuring the useUnfairLock attribute to true.
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.timeBetweenEvictionRunsMillis</name>
|
||||
<value>60000</value>
|
||||
<description>
|
||||
Milliseconds for check to close free connections
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.timeBetweenConnectErrorMillis</name>
|
||||
<value>60000</value>
|
||||
<description>
|
||||
The Destroy thread detects the connection interval and closes the physical connection in milliseconds
|
||||
if the connection idle time is greater than or equal to minEvictableIdleTimeMillis.
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.minEvictableIdleTimeMillis</name>
|
||||
<value>300000</value>
|
||||
<description>
|
||||
The longest time a connection remains idle without being evicted, in milliseconds
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.validationQuery</name>
|
||||
<value>SELECT 1</value>
|
||||
<description>
|
||||
The SQL used to check whether the connection is valid requires a query statement.
|
||||
If validation Query is null, testOnBorrow, testOnReturn, and testWhileIdle will not work.
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.validationQueryTimeout</name>
|
||||
<value>3</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
Check whether the connection is valid for timeout, in seconds
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.testWhileIdle</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
When applying for a connection,
|
||||
if it is detected that the connection is idle longer than time Between Eviction Runs Millis,
|
||||
validation Query is performed to check whether the connection is valid
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.testOnBorrow</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
Execute validation to check if the connection is valid when applying for a connection
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.testOnReturn</name>
|
||||
<value>false</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
Execute validation to check if the connection is valid when the connection is returned
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.defaultAutoCommit</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.keepAlive</name>
|
||||
<value>false</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>spring.datasource.poolPreparedStatements</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
Open PSCache, specify count PSCache for every connection
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.maxPoolPreparedStatementPerConnectionSize</name>
|
||||
<value>20</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.spring.datasource.filters</name>
|
||||
<value>stat,wall,log4j</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.connectionProperties</name>
|
||||
<value>druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>dolphin.database.type</name>
|
||||
<value>mysql</value>
|
||||
<description>Dolphin Scheduler DataBase Type Which Is Select</description>
|
||||
<display-name>Dolphin Database Type</display-name>
|
||||
<value-attributes>
|
||||
<type>value-list</type>
|
||||
<entries>
|
||||
<entry>
|
||||
<value>mysql</value>
|
||||
<label>Mysql</label>
|
||||
</entry>
|
||||
<entry>
|
||||
<value>postgresql</value>
|
||||
<label>Postgresql</label>
|
||||
</entry>
|
||||
</entries>
|
||||
<selection-cardinality>1</selection-cardinality>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphin.database.host</name>
|
||||
<value></value>
|
||||
<display-name>Dolphin Database Host</display-name>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphin.database.port</name>
|
||||
<value></value>
|
||||
<display-name>Dolphin Database Port</display-name>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphin.database.username</name>
|
||||
<value></value>
|
||||
<display-name>Dolphin Database Username</display-name>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphin.database.password</name>
|
||||
<value></value>
|
||||
<display-name>Dolphin Database Password</display-name>
|
||||
<property-type>PASSWORD</property-type>
|
||||
<value-attributes>
|
||||
<type>password</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphin.user</name>
|
||||
<value></value>
|
||||
<description>Which user to install and admin dolphin scheduler</description>
|
||||
<display-name>Deploy User</display-name>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>dolphin.group</name>
|
||||
<value></value>
|
||||
<description>Which user to install and admin dolphin scheduler</description>
|
||||
<display-name>Deploy Group</display-name>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphinscheduler-env-content</name>
|
||||
<display-name>Dolphinscheduler Env template</display-name>
|
||||
<description>This is the jinja template for dolphinscheduler.env.sh file</description>
|
||||
<value>#
|
||||
# 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.
|
||||
#
|
||||
|
||||
export HADOOP_HOME=/opt/soft/hadoop
|
||||
export HADOOP_CONF_DIR=/opt/soft/hadoop/etc/hadoop
|
||||
export SPARK_HOME1=/opt/soft/spark1
|
||||
export SPARK_HOME2=/opt/soft/spark2
|
||||
export PYTHON_HOME=/opt/soft/python
|
||||
export JAVA_HOME=/opt/soft/java
|
||||
export HIVE_HOME=/opt/soft/hive
|
||||
export FLINK_HOME=/opt/soft/flink
|
||||
export DATAX_HOME=/opt/soft/datax</value>
|
||||
<value-attributes>
|
||||
<type>content</type>
|
||||
<empty-value-valid>false</empty-value-valid>
|
||||
<show-property-name>false</show-property-name>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>master.exec.threads</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master execute thread num</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.exec.task.num</name>
|
||||
<value>20</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master execute task number in parallel</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.heartbeat.interval</name>
|
||||
<value>10</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master heartbeat interval</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.task.commit.retryTimes</name>
|
||||
<value>5</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master commit task retry times</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.task.commit.interval</name>
|
||||
<value>1000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master commit task interval</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.max.cpuload.avg</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>only less than cpu avg load, master server can work. default value : the number of cpu cores * 2</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.reserved.memory</name>
|
||||
<value>0.3</value>
|
||||
<description>only larger than reserved memory, master server can work. default value : physical memory * 1/10, unit is G.</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>master.listen.port</name>
|
||||
<value>5678</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master listen port</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>org.quartz.scheduler.instanceName</name>
|
||||
<value>DolphinScheduler</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<!-- 列举枚举值 -->
|
||||
<name>org.quartz.scheduler.instanceId</name>
|
||||
<value>AUTO</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.scheduler.makeSchedulerThreadDaemon</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.useProperties</name>
|
||||
<value>false</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.threadPool.class</name>
|
||||
<value>org.quartz.simpl.SimpleThreadPool</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.threadPool.makeThreadsDaemons</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.threadPool.threadCount</name>
|
||||
<value>25</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.threadPool.threadPriority</name>
|
||||
<value>5</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.class</name>
|
||||
<value>org.quartz.impl.jdbcjobstore.JobStoreTX</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.tablePrefix</name>
|
||||
<value>QRTZ_</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.isClustered</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.misfireThreshold</name>
|
||||
<value>60000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.clusterCheckinInterval</name>
|
||||
<value>5000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.acquireTriggersWithinLock</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.dataSource</name>
|
||||
<value>myDs</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.dataSource.myDs.connectionProvider.class</name>
|
||||
<value>org.apache.dolphinscheduler.service.quartz.DruidConnectionProvider</value>
|
||||
<description></description>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,67 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>worker.exec.threads</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>worker execute thread num</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>worker.heartbeat.interval</name>
|
||||
<value>10</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>worker heartbeat interval</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>worker.max.cpuload.avg</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>only less than cpu avg load, worker server can work. default value : the number of cpu cores * 2</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>worker.reserved.memory</name>
|
||||
<value>0.3</value>
|
||||
<description>only larger than reserved memory, worker server can work. default value : physical memory * 1/10, unit is G.</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>worker.listen.port</name>
|
||||
<value>1234</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>worker listen port</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>worker.group</name>
|
||||
<value>default</value>
|
||||
<description>default worker group</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>zookeeper.dolphinscheduler.root</name>
|
||||
<value>/dolphinscheduler</value>
|
||||
<description>
|
||||
dolphinscheduler root directory
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.session.timeout</name>
|
||||
<value>300</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.connection.timeout</name>
|
||||
<value>300</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.retry.base.sleep</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.retry.max.sleep</name>
|
||||
<value>30000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.retry.maxtime</name>
|
||||
<value>5</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<metainfo>
|
||||
<schemaVersion>2.0</schemaVersion>
|
||||
<services>
|
||||
<service>
|
||||
<name>DOLPHIN</name>
|
||||
<displayName>Dolphin Scheduler</displayName>
|
||||
<comment>分布式易扩展的可视化DAG工作流任务调度系统</comment>
|
||||
<version>1.3.0</version>
|
||||
<components>
|
||||
<component>
|
||||
<name>DOLPHIN_MASTER</name>
|
||||
<displayName>DS Master</displayName>
|
||||
<category>MASTER</category>
|
||||
<cardinality>1+</cardinality>
|
||||
<commandScript>
|
||||
<script>scripts/dolphin_master_service.py</script>
|
||||
<scriptType>PYTHON</scriptType>
|
||||
<timeout>600</timeout>
|
||||
</commandScript>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<name>DOLPHIN_LOGGER</name>
|
||||
<displayName>DS Logger</displayName>
|
||||
<category>SLAVE</category>
|
||||
<cardinality>1+</cardinality>
|
||||
<commandScript>
|
||||
<script>scripts/dolphin_logger_service.py</script>
|
||||
<scriptType>PYTHON</scriptType>
|
||||
<timeout>600</timeout>
|
||||
</commandScript>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<name>DOLPHIN_WORKER</name>
|
||||
<displayName>DS Worker</displayName>
|
||||
<category>SLAVE</category>
|
||||
<cardinality>1+</cardinality>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<name>DOLPHIN/DOLPHIN_LOGGER</name>
|
||||
<scope>host</scope>
|
||||
<auto-deploy>
|
||||
<enabled>true</enabled>
|
||||
</auto-deploy>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<commandScript>
|
||||
<script>scripts/dolphin_worker_service.py</script>
|
||||
<scriptType>PYTHON</scriptType>
|
||||
<timeout>600</timeout>
|
||||
</commandScript>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<name>DOLPHIN_ALERT</name>
|
||||
<displayName>DS Alert</displayName>
|
||||
<category>SLAVE</category>
|
||||
<cardinality>1</cardinality>
|
||||
<commandScript>
|
||||
<script>scripts/dolphin_alert_service.py</script>
|
||||
<scriptType>PYTHON</scriptType>
|
||||
<timeout>600</timeout>
|
||||
</commandScript>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<name>DOLPHIN_API</name>
|
||||
<displayName>DS_Api</displayName>
|
||||
<category>SLAVE</category>
|
||||
<cardinality>1</cardinality>
|
||||
<commandScript>
|
||||
<script>scripts/dolphin_api_service.py</script>
|
||||
<scriptType>PYTHON</scriptType>
|
||||
<timeout>600</timeout>
|
||||
</commandScript>
|
||||
</component>
|
||||
</components>
|
||||
|
||||
<requiredServices>
|
||||
<service>ZOOKEEPER</service>
|
||||
</requiredServices>
|
||||
|
||||
<osSpecifics>
|
||||
<osSpecific>
|
||||
<osFamily>any</osFamily>
|
||||
<packages>
|
||||
<package>
|
||||
<name>apache-dolphinscheduler*</name>
|
||||
</package>
|
||||
</packages>
|
||||
</osSpecific>
|
||||
</osSpecifics>
|
||||
|
||||
<configuration-dependencies>
|
||||
<config-type>dolphin-alert</config-type>
|
||||
<config-type>dolphin-app-api</config-type>
|
||||
<config-type>dolphin-app-dao</config-type>
|
||||
<config-type>dolphin-common</config-type>
|
||||
<config-type>dolphin-env</config-type>
|
||||
<config-type>dolphin-quartz</config-type>
|
||||
</configuration-dependencies>
|
||||
|
||||
<themes>
|
||||
<theme>
|
||||
<fileName>theme.json</fileName>
|
||||
<default>true</default>
|
||||
</theme>
|
||||
</themes>
|
||||
|
||||
<quickLinksConfigurations-dir>quicklinks</quickLinksConfigurations-dir>
|
||||
<quickLinksConfigurations>
|
||||
<quickLinksConfiguration>
|
||||
<fileName>quicklinks.json</fileName>
|
||||
<default>true</default>
|
||||
</quickLinksConfiguration>
|
||||
</quickLinksConfigurations>
|
||||
</service>
|
||||
</services>
|
||||
</metainfo>
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
import socket
|
||||
import urllib2
|
||||
import os
|
||||
import logging
|
||||
import ambari_simplejson as json
|
||||
from resource_management.libraries.script.script import Script
|
||||
import sys
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('utf-8')
|
||||
|
||||
logger = logging.getLogger('ambari_alerts')
|
||||
|
||||
config = Script.get_config()
|
||||
|
||||
|
||||
def get_tokens():
|
||||
"""
|
||||
Returns a tuple of tokens in the format {{site/property}} that will be used
|
||||
to build the dictionary passed into execute
|
||||
|
||||
:rtype tuple
|
||||
"""
|
||||
|
||||
def get_info(url, connection_timeout):
|
||||
response = None
|
||||
|
||||
try:
|
||||
response = urllib2.urlopen(url, timeout=connection_timeout)
|
||||
json_data = response.read()
|
||||
return json_data
|
||||
finally:
|
||||
if response is not None:
|
||||
try:
|
||||
response.close()
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def execute(configurations={}, parameters={}, host_name=None):
|
||||
"""
|
||||
Returns a tuple containing the result code and a pre-formatted result label
|
||||
|
||||
Keyword arguments:
|
||||
configurations : a mapping of configuration key to value
|
||||
parameters : a mapping of script parameter key to value
|
||||
host_name : the name of this host where the alert is running
|
||||
|
||||
:type configurations dict
|
||||
:type parameters dict
|
||||
:type host_name str
|
||||
"""
|
||||
|
||||
alert_name = parameters['alertName']
|
||||
|
||||
dolphin_pidfile_dir = "/opt/soft/run/dolphinscheduler"
|
||||
|
||||
pid = "0"
|
||||
|
||||
|
||||
from resource_management.core import sudo
|
||||
|
||||
is_running = True
|
||||
pid_file_path = ""
|
||||
if alert_name == 'DOLPHIN_MASTER':
|
||||
pid_file_path = dolphin_pidfile_dir + "/master-server.pid"
|
||||
elif alert_name == 'DOLPHIN_WORKER':
|
||||
pid_file_path = dolphin_pidfile_dir + "/worker-server.pid"
|
||||
elif alert_name == 'DOLPHIN_ALERT':
|
||||
pid_file_path = dolphin_pidfile_dir + "/alert-server.pid"
|
||||
elif alert_name == 'DOLPHIN_LOGGER':
|
||||
pid_file_path = dolphin_pidfile_dir + "/logger-server.pid"
|
||||
elif alert_name == 'DOLPHIN_API':
|
||||
pid_file_path = dolphin_pidfile_dir + "/api-server.pid"
|
||||
|
||||
if not pid_file_path or not os.path.isfile(pid_file_path):
|
||||
is_running = False
|
||||
|
||||
try:
|
||||
pid = int(sudo.read_file(pid_file_path))
|
||||
except:
|
||||
is_running = False
|
||||
|
||||
try:
|
||||
# Kill will not actually kill the process
|
||||
# From the doc:
|
||||
# If sig is 0, then no signal is sent, but error checking is still
|
||||
# performed; this can be used to check for the existence of a
|
||||
# process ID or process group ID.
|
||||
sudo.kill(pid, 0)
|
||||
except OSError:
|
||||
is_running = False
|
||||
|
||||
if host_name is None:
|
||||
host_name = socket.getfqdn()
|
||||
|
||||
if not is_running:
|
||||
result_code = "CRITICAL"
|
||||
else:
|
||||
result_code = "OK"
|
||||
|
||||
label = "The comment {0} of DOLPHIN_SCHEDULER on {1} is {2}".format(alert_name, host_name, result_code)
|
||||
|
||||
return ((result_code, [label]))
|
||||
|
||||
if __name__ == "__main__":
|
||||
pass
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
import time
|
||||
from resource_management import *
|
||||
|
||||
from dolphin_env import dolphin_env
|
||||
|
||||
|
||||
class DolphinAlertService(Script):
|
||||
def install(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.install_packages(env)
|
||||
Execute(('chmod', '-R', '777', params.dolphin_home))
|
||||
Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
|
||||
|
||||
def configure(self, env):
|
||||
import params
|
||||
params.pika_slave = True
|
||||
env.set_params(params)
|
||||
|
||||
dolphin_env()
|
||||
|
||||
def start(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.configure(env)
|
||||
no_op_test = format("ls {dolphin_pidfile_dir}/alert-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/alert-server.pid` | grep `cat {dolphin_pidfile_dir}/alert-server.pid` >/dev/null 2>&1")
|
||||
|
||||
start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start alert-server")
|
||||
Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
|
||||
|
||||
def stop(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop alert-server")
|
||||
Execute(stop_cmd, user=params.dolphin_user)
|
||||
time.sleep(5)
|
||||
|
||||
def status(self, env):
|
||||
import status_params
|
||||
env.set_params(status_params)
|
||||
check_process_status(status_params.dolphin_run_dir + "alert-server.pid")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
DolphinAlertService().execute()
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
import time
|
||||
from resource_management import *
|
||||
|
||||
from dolphin_env import dolphin_env
|
||||
|
||||
|
||||
class DolphinApiService(Script):
|
||||
def install(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.install_packages(env)
|
||||
Execute(('chmod', '-R', '777', params.dolphin_home))
|
||||
Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
|
||||
|
||||
def configure(self, env):
|
||||
import params
|
||||
params.pika_slave = True
|
||||
env.set_params(params)
|
||||
|
||||
dolphin_env()
|
||||
|
||||
def start(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.configure(env)
|
||||
|
||||
#init
|
||||
init_cmd=format("sh " + params.dolphin_home + "/script/create-dolphinscheduler.sh")
|
||||
Execute(init_cmd, user=params.dolphin_user)
|
||||
|
||||
#upgrade
|
||||
upgrade_cmd=format("sh " + params.dolphin_home + "/script/upgrade-dolphinscheduler.sh")
|
||||
Execute(upgrade_cmd, user=params.dolphin_user)
|
||||
|
||||
no_op_test = format("ls {dolphin_pidfile_dir}/api-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/api-server.pid` | grep `cat {dolphin_pidfile_dir}/api-server.pid` >/dev/null 2>&1")
|
||||
|
||||
start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start api-server")
|
||||
Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
|
||||
|
||||
def stop(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop api-server")
|
||||
Execute(stop_cmd, user=params.dolphin_user)
|
||||
time.sleep(5)
|
||||
|
||||
def status(self, env):
|
||||
import status_params
|
||||
env.set_params(status_params)
|
||||
check_process_status(status_params.dolphin_run_dir + "api-server.pid")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
DolphinApiService().execute()
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
"""
|
||||
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 resource_management import *
|
||||
|
||||
|
||||
def dolphin_env():
|
||||
import params
|
||||
|
||||
Directory(params.dolphin_pidfile_dir,
|
||||
mode=0777,
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group,
|
||||
create_parents=True
|
||||
)
|
||||
Directory(params.dolphin_log_dir,
|
||||
mode=0777,
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group,
|
||||
create_parents=True
|
||||
)
|
||||
Directory(params.dolphin_conf_dir,
|
||||
mode=0777,
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group,
|
||||
create_parents=True
|
||||
)
|
||||
|
||||
Directory(params.dolphin_common_map['data.basedir.path'],
|
||||
mode=0777,
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group,
|
||||
create_parents=True
|
||||
)
|
||||
|
||||
|
||||
File(format(params.dolphin_env_path),
|
||||
mode=0777,
|
||||
content=InlineTemplate(params.dolphin_env_content),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
|
||||
File(format(params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh"),
|
||||
mode=0755,
|
||||
content=Template("dolphin-daemon.sh.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/master.properties"),
|
||||
mode=0755,
|
||||
content=Template("master.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/worker.properties"),
|
||||
mode=0755,
|
||||
content=Template("worker.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/alert.properties"),
|
||||
mode=0755,
|
||||
content=Template("alert.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/datasource.properties"),
|
||||
mode=0755,
|
||||
content=Template("datasource.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/application-api.properties"),
|
||||
mode=0755,
|
||||
content=Template("application-api.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/common.properties"),
|
||||
mode=0755,
|
||||
content=Template("common.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/quartz.properties"),
|
||||
mode=0755,
|
||||
content=Template("quartz.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/zookeeper.properties"),
|
||||
mode=0755,
|
||||
content=Template("zookeeper.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
import time
|
||||
from resource_management import *
|
||||
|
||||
from dolphin_env import dolphin_env
|
||||
|
||||
|
||||
class DolphinLoggerService(Script):
|
||||
def install(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.install_packages(env)
|
||||
Execute(('chmod', '-R', '777', params.dolphin_home))
|
||||
Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
|
||||
def configure(self, env):
|
||||
import params
|
||||
params.pika_slave = True
|
||||
env.set_params(params)
|
||||
|
||||
dolphin_env()
|
||||
|
||||
def start(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.configure(env)
|
||||
no_op_test = format("ls {dolphin_pidfile_dir}/logger-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/logger-server.pid` | grep `cat {dolphin_pidfile_dir}/logger-server.pid` >/dev/null 2>&1")
|
||||
|
||||
start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start logger-server")
|
||||
Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
|
||||
|
||||
def stop(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop logger-server")
|
||||
Execute(stop_cmd, user=params.dolphin_user)
|
||||
time.sleep(5)
|
||||
|
||||
def status(self, env):
|
||||
import status_params
|
||||
env.set_params(status_params)
|
||||
check_process_status(status_params.dolphin_run_dir + "logger-server.pid")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
DolphinLoggerService().execute()
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
import time
|
||||
from resource_management import *
|
||||
|
||||
from dolphin_env import dolphin_env
|
||||
|
||||
|
||||
class DolphinMasterService(Script):
|
||||
def install(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.install_packages(env)
|
||||
Execute(('chmod', '-R', '777', params.dolphin_home))
|
||||
Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
|
||||
|
||||
def configure(self, env):
|
||||
import params
|
||||
params.pika_slave = True
|
||||
env.set_params(params)
|
||||
|
||||
dolphin_env()
|
||||
|
||||
def start(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.configure(env)
|
||||
no_op_test = format("ls {dolphin_pidfile_dir}/master-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/master-server.pid` | grep `cat {dolphin_pidfile_dir}/master-server.pid` >/dev/null 2>&1")
|
||||
start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start master-server")
|
||||
Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
|
||||
|
||||
def stop(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop master-server")
|
||||
Execute(stop_cmd, user=params.dolphin_user)
|
||||
time.sleep(5)
|
||||
|
||||
def status(self, env):
|
||||
import status_params
|
||||
env.set_params(status_params)
|
||||
check_process_status(status_params.dolphin_run_dir + "master-server.pid")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
DolphinMasterService().execute()
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
import time
|
||||
from resource_management import *
|
||||
|
||||
from dolphin_env import dolphin_env
|
||||
|
||||
|
||||
class DolphinWorkerService(Script):
|
||||
def install(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.install_packages(env)
|
||||
Execute(('chmod', '-R', '777', params.dolphin_home))
|
||||
Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
|
||||
|
||||
def configure(self, env):
|
||||
import params
|
||||
params.pika_slave = True
|
||||
env.set_params(params)
|
||||
|
||||
dolphin_env()
|
||||
|
||||
def start(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.configure(env)
|
||||
no_op_test = format("ls {dolphin_pidfile_dir}/worker-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/worker-server.pid` | grep `cat {dolphin_pidfile_dir}/worker-server.pid` >/dev/null 2>&1")
|
||||
start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start worker-server")
|
||||
Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
|
||||
|
||||
def stop(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop worker-server")
|
||||
Execute(stop_cmd, user=params.dolphin_user)
|
||||
time.sleep(5)
|
||||
|
||||
def status(self, env):
|
||||
import status_params
|
||||
env.set_params(status_params)
|
||||
check_process_status(status_params.dolphin_run_dir + "worker-server.pid")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
DolphinWorkerService().execute()
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
|
||||
import sys
|
||||
from resource_management import *
|
||||
from resource_management.core.logger import Logger
|
||||
from resource_management.libraries.functions import default
|
||||
|
||||
Logger.initialize_logger()
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('utf-8')
|
||||
|
||||
# server configurations
|
||||
config = Script.get_config()
|
||||
|
||||
# conf_dir = "/etc/"
|
||||
dolphin_home = "/opt/soft/dolphinscheduler"
|
||||
dolphin_conf_dir = dolphin_home + "/conf"
|
||||
dolphin_log_dir = dolphin_home + "/logs"
|
||||
dolphin_bin_dir = dolphin_home + "/bin"
|
||||
dolphin_lib_jars = dolphin_home + "/lib/*"
|
||||
dolphin_pidfile_dir = "/opt/soft/run/dolphinscheduler"
|
||||
|
||||
rmHosts = default("/clusterHostInfo/rm_host", [])
|
||||
|
||||
# dolphin-env
|
||||
dolphin_env_map = {}
|
||||
dolphin_env_map.update(config['configurations']['dolphin-env'])
|
||||
|
||||
# which user to install and admin dolphin scheduler
|
||||
dolphin_user = dolphin_env_map['dolphin.user']
|
||||
dolphin_group = dolphin_env_map['dolphin.group']
|
||||
|
||||
# .dolphinscheduler_env.sh
|
||||
dolphin_env_path = dolphin_conf_dir + '/env/dolphinscheduler_env.sh'
|
||||
dolphin_env_content = dolphin_env_map['dolphinscheduler-env-content']
|
||||
|
||||
# database config
|
||||
dolphin_database_config = {}
|
||||
dolphin_database_config['dolphin_database_type'] = dolphin_env_map['dolphin.database.type']
|
||||
dolphin_database_config['dolphin_database_username'] = dolphin_env_map['dolphin.database.username']
|
||||
dolphin_database_config['dolphin_database_password'] = dolphin_env_map['dolphin.database.password']
|
||||
if 'mysql' == dolphin_database_config['dolphin_database_type']:
|
||||
dolphin_database_config['dolphin_database_driver'] = 'com.mysql.jdbc.Driver'
|
||||
dolphin_database_config['driverDelegateClass'] = 'org.quartz.impl.jdbcjobstore.StdJDBCDelegate'
|
||||
dolphin_database_config['dolphin_database_url'] = 'jdbc:mysql://' + dolphin_env_map['dolphin.database.host'] \
|
||||
+ ':' + dolphin_env_map['dolphin.database.port'] \
|
||||
+ '/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8'
|
||||
else:
|
||||
dolphin_database_config['dolphin_database_driver'] = 'org.postgresql.Driver'
|
||||
dolphin_database_config['driverDelegateClass'] = 'org.quartz.impl.jdbcjobstore.PostgreSQLDelegate'
|
||||
dolphin_database_config['dolphin_database_url'] = 'jdbc:postgresql://' + dolphin_env_map['dolphin.database.host'] \
|
||||
+ ':' + dolphin_env_map['dolphin.database.port'] \
|
||||
+ '/dolphinscheduler'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# application-alert.properties
|
||||
dolphin_alert_map = {}
|
||||
wechat_push_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=$token'
|
||||
wechat_token_url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=$corpId&corpsecret=$secret'
|
||||
wechat_team_send_msg = '{\"toparty\":\"{toParty}\",\"agentid\":\"{agentId}\",\"msgtype\":\"text\",\"text\":{\"content\":\"{msg}\"},\"safe\":\"0\"}'
|
||||
wechat_user_send_msg = '{\"touser\":\"{toUser}\",\"agentid\":\"{agentId}\",\"msgtype\":\"markdown\",\"markdown\":{\"content\":\"{msg}\"}}'
|
||||
|
||||
dolphin_alert_config_map = config['configurations']['dolphin-alert']
|
||||
|
||||
if dolphin_alert_config_map['enterprise.wechat.enable']:
|
||||
dolphin_alert_map['enterprise.wechat.push.ur'] = wechat_push_url
|
||||
dolphin_alert_map['enterprise.wechat.token.url'] = wechat_token_url
|
||||
dolphin_alert_map['enterprise.wechat.team.send.msg'] = wechat_team_send_msg
|
||||
dolphin_alert_map['enterprise.wechat.user.send.msg'] = wechat_user_send_msg
|
||||
|
||||
dolphin_alert_map.update(dolphin_alert_config_map)
|
||||
|
||||
|
||||
|
||||
# application-api.properties
|
||||
dolphin_app_api_map = {}
|
||||
dolphin_app_api_map.update(config['configurations']['dolphin-application-api'])
|
||||
|
||||
|
||||
# common.properties
|
||||
dolphin_common_map = {}
|
||||
|
||||
if 'yarn-site' in config['configurations'] and \
|
||||
'yarn.resourcemanager.webapp.address' in config['configurations']['yarn-site']:
|
||||
yarn_resourcemanager_webapp_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address']
|
||||
yarn_application_status_address = 'http://' + yarn_resourcemanager_webapp_address + '/ws/v1/cluster/apps/%s'
|
||||
dolphin_common_map['yarn.application.status.address'] = yarn_application_status_address
|
||||
|
||||
rmHosts = default("/clusterHostInfo/rm_host", [])
|
||||
if len(rmHosts) > 1:
|
||||
dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ','.join(rmHosts)
|
||||
else:
|
||||
dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ''
|
||||
|
||||
dolphin_common_map_tmp = config['configurations']['dolphin-common']
|
||||
data_basedir_path = dolphin_common_map_tmp['data.basedir.path']
|
||||
dolphin_common_map['dolphinscheduler.env.path'] = dolphin_env_path
|
||||
dolphin_common_map.update(config['configurations']['dolphin-common'])
|
||||
|
||||
# datasource.properties
|
||||
dolphin_datasource_map = {}
|
||||
dolphin_datasource_map['spring.datasource.type'] = 'com.alibaba.druid.pool.DruidDataSource'
|
||||
dolphin_datasource_map['spring.datasource.driver-class-name'] = dolphin_database_config['dolphin_database_driver']
|
||||
dolphin_datasource_map['spring.datasource.url'] = dolphin_database_config['dolphin_database_url']
|
||||
dolphin_datasource_map['spring.datasource.username'] = dolphin_database_config['dolphin_database_username']
|
||||
dolphin_datasource_map['spring.datasource.password'] = dolphin_database_config['dolphin_database_password']
|
||||
dolphin_datasource_map.update(config['configurations']['dolphin-datasource'])
|
||||
|
||||
# master.properties
|
||||
dolphin_master_map = config['configurations']['dolphin-master']
|
||||
|
||||
# quartz.properties
|
||||
dolphin_quartz_map = {}
|
||||
dolphin_quartz_map['org.quartz.jobStore.driverDelegateClass'] = dolphin_database_config['driverDelegateClass']
|
||||
dolphin_quartz_map.update(config['configurations']['dolphin-quartz'])
|
||||
|
||||
# worker.properties
|
||||
dolphin_worker_map = config['configurations']['dolphin-worker']
|
||||
|
||||
# zookeeper.properties
|
||||
dolphin_zookeeper_map={}
|
||||
zookeeperHosts = default("/clusterHostInfo/zookeeper_hosts", [])
|
||||
if len(zookeeperHosts) > 0 and "clientPort" in config['configurations']['zoo.cfg']:
|
||||
clientPort = config['configurations']['zoo.cfg']['clientPort']
|
||||
zookeeperPort = ":" + clientPort + ","
|
||||
dolphin_zookeeper_map['zookeeper.quorum'] = zookeeperPort.join(zookeeperHosts) + ":" + clientPort
|
||||
dolphin_zookeeper_map.update(config['configurations']['dolphin-zookeeper'])
|
||||
if 'spring.servlet.multipart.max-file-size' in dolphin_app_api_map:
|
||||
file_size = dolphin_app_api_map['spring.servlet.multipart.max-file-size']
|
||||
dolphin_app_api_map['spring.servlet.multipart.max-file-size'] = file_size + "MB"
|
||||
if 'spring.servlet.multipart.max-request-size' in dolphin_app_api_map:
|
||||
request_size = dolphin_app_api_map['spring.servlet.multipart.max-request-size']
|
||||
dolphin_app_api_map['spring.servlet.multipart.max-request-size'] = request_size + "MB"
|
||||
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
"""
|
||||
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 resource_management import *
|
||||
from resource_management.libraries.functions import get_unique_id_and_date
|
||||
|
||||
class ServiceCheck(Script):
|
||||
def service_check(self, env):
|
||||
import params
|
||||
#env.set_params(params)
|
||||
|
||||
# Execute(format("which pika_server"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
ServiceCheck().execute()
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
"""
|
||||
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 resource_management import *
|
||||
|
||||
config = Script.get_config()
|
||||
|
||||
dolphin_run_dir = "/opt/soft/run/dolphinscheduler/"
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_app_api_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
usage="Usage: dolphinscheduler-daemon.sh (start|stop) <command> "
|
||||
|
||||
# if no args specified, show usage
|
||||
if [ $# -le 1 ]; then
|
||||
echo $usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
startStop=$1
|
||||
shift
|
||||
command=$1
|
||||
shift
|
||||
|
||||
echo "Begin $startStop $command......"
|
||||
|
||||
BIN_DIR=`dirname $0`
|
||||
BIN_DIR=`cd "$BIN_DIR"; pwd`
|
||||
DOLPHINSCHEDULER_HOME=$BIN_DIR/..
|
||||
|
||||
export HOSTNAME=`hostname`
|
||||
|
||||
DOLPHINSCHEDULER_LIB_JARS={{dolphin_lib_jars}}
|
||||
|
||||
DOLPHINSCHEDULER_OPTS="-server -Xmx16g -Xms1g -Xss512k -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=10m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70"
|
||||
STOP_TIMEOUT=5
|
||||
|
||||
log={{dolphin_log_dir}}/dolphinscheduler-$command-$HOSTNAME.out
|
||||
pid={{dolphin_pidfile_dir}}/$command.pid
|
||||
|
||||
cd $DOLPHINSCHEDULER_HOME
|
||||
|
||||
if [ "$command" = "api-server" ]; then
|
||||
LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-api.xml -Dspring.profiles.active=api"
|
||||
CLASS=org.apache.dolphinscheduler.api.ApiApplicationServer
|
||||
elif [ "$command" = "master-server" ]; then
|
||||
LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-master.xml -Ddruid.mysql.usePingMethod=false"
|
||||
CLASS=org.apache.dolphinscheduler.server.master.MasterServer
|
||||
elif [ "$command" = "worker-server" ]; then
|
||||
LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-worker.xml -Ddruid.mysql.usePingMethod=false"
|
||||
CLASS=org.apache.dolphinscheduler.server.worker.WorkerServer
|
||||
elif [ "$command" = "alert-server" ]; then
|
||||
LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-alert.xml"
|
||||
CLASS=org.apache.dolphinscheduler.alert.AlertServer
|
||||
elif [ "$command" = "logger-server" ]; then
|
||||
CLASS=org.apache.dolphinscheduler.server.log.LoggerServer
|
||||
else
|
||||
echo "Error: No command named \`$command' was found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $startStop in
|
||||
(start)
|
||||
|
||||
if [ -f $pid ]; then
|
||||
if kill -0 `cat $pid` > /dev/null 2>&1; then
|
||||
echo $command running as process `cat $pid`. Stop it first.
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo starting $command, logging to $log
|
||||
|
||||
exec_command="$LOG_FILE $DOLPHINSCHEDULER_OPTS -classpath {{dolphin_conf_dir}}:{{dolphin_lib_jars}} $CLASS"
|
||||
|
||||
echo "nohup java $exec_command > $log 2>&1 < /dev/null &"
|
||||
nohup java $exec_command > $log 2>&1 < /dev/null &
|
||||
echo $! > $pid
|
||||
;;
|
||||
|
||||
(stop)
|
||||
|
||||
if [ -f $pid ]; then
|
||||
TARGET_PID=`cat $pid`
|
||||
if kill -0 $TARGET_PID > /dev/null 2>&1; then
|
||||
echo stopping $command
|
||||
kill $TARGET_PID
|
||||
sleep $STOP_TIMEOUT
|
||||
if kill -0 $TARGET_PID > /dev/null 2>&1; then
|
||||
echo "$command did not stop gracefully after $STOP_TIMEOUT seconds: killing with kill -9"
|
||||
kill -9 $TARGET_PID
|
||||
fi
|
||||
else
|
||||
echo no $command to stop
|
||||
fi
|
||||
rm -f $pid
|
||||
else
|
||||
echo no $command to stop
|
||||
fi
|
||||
;;
|
||||
|
||||
(*)
|
||||
echo $usage
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
echo "End $startStop $command."
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_master_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_quartz_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_worker_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_zookeeper_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"name": "default",
|
||||
"description": "default quick links configuration",
|
||||
"configuration": {
|
||||
"protocol":
|
||||
{
|
||||
"type":"http"
|
||||
},
|
||||
|
||||
"links": [
|
||||
{
|
||||
"name": "dolphin-application-ui",
|
||||
"label": "DolphinApplication UI",
|
||||
"requires_user_name": "false",
|
||||
"component_name": "DOLPHIN_API",
|
||||
"url": "%@://%@:%@/dolphinscheduler/ui/view/login/index.html",
|
||||
"port":{
|
||||
"http_property": "server.port",
|
||||
"http_default_port": "12345",
|
||||
"regex": "^(\\d+)$",
|
||||
"site": "dolphin-application-api"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,661 +0,0 @@
|
|||
{
|
||||
"name": "default",
|
||||
"description": "Default theme for Dolphin Scheduler service",
|
||||
"configuration": {
|
||||
"layouts": [
|
||||
{
|
||||
"name": "default",
|
||||
"tabs": [
|
||||
{
|
||||
"name": "settings",
|
||||
"display-name": "Settings",
|
||||
"layout": {
|
||||
"tab-rows": "3",
|
||||
"tab-columns": "3",
|
||||
"sections": [
|
||||
{
|
||||
"name": "dolphin-env-config",
|
||||
"display-name": "Dolphin Env Config",
|
||||
"row-index": "0",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "2",
|
||||
"section-rows": "1",
|
||||
"section-columns": "2",
|
||||
"subsections": [
|
||||
{
|
||||
"name": "env-row1-col1",
|
||||
"display-name": "Deploy User Info",
|
||||
"row-index": "0",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
},
|
||||
{
|
||||
"name": "env-row1-col2",
|
||||
"display-name": "System Env Optimization",
|
||||
"row-index": "0",
|
||||
"column-index": "1",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dolphin-database-config",
|
||||
"display-name": "Database Config",
|
||||
"row-index": "1",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "2",
|
||||
"section-rows": "1",
|
||||
"section-columns": "3",
|
||||
"subsections": [
|
||||
{
|
||||
"name": "database-row1-col1",
|
||||
"row-index": "0",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
},
|
||||
{
|
||||
"name": "database-row1-col2",
|
||||
"row-index": "0",
|
||||
"column-index": "1",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
},
|
||||
{
|
||||
"name": "database-row1-col3",
|
||||
"row-index": "0",
|
||||
"column-index": "2",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dynamic-config",
|
||||
"row-index": "2",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "2",
|
||||
"section-rows": "1",
|
||||
"section-columns": "3",
|
||||
"subsections": [
|
||||
{
|
||||
"name": "dynamic-row1-col1",
|
||||
"display-name": "Resource FS Config",
|
||||
"row-index": "0",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
},
|
||||
{
|
||||
"name": "dynamic-row1-col2",
|
||||
"display-name": "Kerberos Info",
|
||||
"row-index": "0",
|
||||
"column-index": "1",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
},
|
||||
{
|
||||
"name": "dynamic-row1-col3",
|
||||
"display-name": "Wechat Info",
|
||||
"row-index": "0",
|
||||
"column-index": "1",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"placement": {
|
||||
"configuration-layout": "default",
|
||||
"configs": [
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.type",
|
||||
"subsection-name": "database-row1-col1"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.host",
|
||||
"subsection-name": "database-row1-col2"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.port",
|
||||
"subsection-name": "database-row1-col2"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.username",
|
||||
"subsection-name": "database-row1-col3"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.password",
|
||||
"subsection-name": "database-row1-col3"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.user",
|
||||
"subsection-name": "env-row1-col1"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.group",
|
||||
"subsection-name": "env-row1-col1"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphinscheduler-env-content",
|
||||
"subsection-name": "env-row1-col2"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/resource.storage.type",
|
||||
"subsection-name": "dynamic-row1-col1"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/resource.upload.path",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === HDFS || ${dolphin-common/resource.storage.type} === S3",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/hdfs.root.user",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === HDFS",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/data.store2hdfs.basepath",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === HDFS",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.defaultFS",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === HDFS",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.endpoint",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === S3",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.access.key",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === S3",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.secret.key",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === S3",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/hadoop.security.authentication.startup.state",
|
||||
"subsection-name": "dynamic-row1-col2"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/java.security.krb5.conf.path",
|
||||
"subsection-name": "dynamic-row1-col2",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/hadoop.security.authentication.startup.state"
|
||||
],
|
||||
"if": "${dolphin-common/hadoop.security.authentication.startup.state}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/login.user.keytab.username",
|
||||
"subsection-name": "dynamic-row1-col2",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/hadoop.security.authentication.startup.state"
|
||||
],
|
||||
"if": "${dolphin-common/hadoop.security.authentication.startup.state}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/login.user.keytab.path",
|
||||
"subsection-name": "dynamic-row1-col2",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/hadoop.security.authentication.startup.state"
|
||||
],
|
||||
"if": "${dolphin-common/hadoop.security.authentication.startup.state}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/kerberos.expire.time",
|
||||
"subsection-name": "dynamic-row1-col2",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/hadoop.security.authentication.startup.state"
|
||||
],
|
||||
"if": "${dolphin-common/hadoop.security.authentication.startup.state}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.enable",
|
||||
"subsection-name": "dynamic-row1-col3"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.corp.id",
|
||||
"subsection-name": "dynamic-row1-col3",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-alert/enterprise.wechat.enable"
|
||||
],
|
||||
"if": "${dolphin-alert/enterprise.wechat.enable}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.secret",
|
||||
"subsection-name": "dynamic-row1-col3",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-alert/enterprise.wechat.enable"
|
||||
],
|
||||
"if": "${dolphin-alert/enterprise.wechat.enable}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.agent.id",
|
||||
"subsection-name": "dynamic-row1-col3",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-alert/enterprise.wechat.enable"
|
||||
],
|
||||
"if": "${dolphin-alert/enterprise.wechat.enable}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.users",
|
||||
"subsection-name": "dynamic-row1-col3",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-alert/enterprise.wechat.enable"
|
||||
],
|
||||
"if": "${dolphin-alert/enterprise.wechat.enable}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"widgets": [
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.type",
|
||||
"widget": {
|
||||
"type": "combo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.host",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.port",
|
||||
"widget": {
|
||||
"type": "text-field",
|
||||
"units": [
|
||||
{
|
||||
"unit-name": "int"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.username",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.password",
|
||||
"widget": {
|
||||
"type": "password"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.user",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.group",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphinscheduler-env-content",
|
||||
"widget": {
|
||||
"type": "text-area"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/resource.storage.type",
|
||||
"widget": {
|
||||
"type": "combo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/resource.upload.path",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/hdfs.root.user",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/data.store2hdfs.basepath",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.defaultFS",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.endpoint",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.access.key",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.secret.key",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/hadoop.security.authentication.startup.state",
|
||||
"widget": {
|
||||
"type": "toggle"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/java.security.krb5.conf.path",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/login.user.keytab.username",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/login.user.keytab.path",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/kerberos.expire.time",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.enable",
|
||||
"widget": {
|
||||
"type": "toggle"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.corp.id",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.secret",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.agent.id",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.users",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,158 +0,0 @@
|
|||
{
|
||||
"DOLPHIN": {
|
||||
"service": [],
|
||||
"DOLPHIN_API": [
|
||||
{
|
||||
"name": "dolphin_api_port_check",
|
||||
"label": "dolphin_api_port_check",
|
||||
"description": "dolphin_api_port_check.",
|
||||
"interval": 10,
|
||||
"scope": "ANY",
|
||||
"source": {
|
||||
"type": "PORT",
|
||||
"uri": "{{dolphin-application-api/server.port}}",
|
||||
"default_port": 12345,
|
||||
"reporting": {
|
||||
"ok": {
|
||||
"text": "TCP OK - {0:.3f}s response on port {1}"
|
||||
},
|
||||
"warning": {
|
||||
"text": "TCP OK - {0:.3f}s response on port {1}",
|
||||
"value": 1.5
|
||||
},
|
||||
"critical": {
|
||||
"text": "Connection failed: {0} to {1}:{2}",
|
||||
"value": 5.0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"DOLPHIN_LOGGER": [
|
||||
{
|
||||
"name": "dolphin_logger_port_check",
|
||||
"label": "dolphin_logger_port_check",
|
||||
"description": "dolphin_logger_port_check.",
|
||||
"interval": 10,
|
||||
"scope": "ANY",
|
||||
"source": {
|
||||
"type": "PORT",
|
||||
"uri": "{{dolphin-common/loggerserver.rpc.port}}",
|
||||
"default_port": 50051,
|
||||
"reporting": {
|
||||
"ok": {
|
||||
"text": "TCP OK - {0:.3f}s response on port {1}"
|
||||
},
|
||||
"warning": {
|
||||
"text": "TCP OK - {0:.3f}s response on port {1}",
|
||||
"value": 1.5
|
||||
},
|
||||
"critical": {
|
||||
"text": "Connection failed: {0} to {1}:{2}",
|
||||
"value": 5.0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"DOLPHIN_MASTER": [
|
||||
{
|
||||
"name": "DOLPHIN_MASTER_CHECK",
|
||||
"label": "check dolphin scheduler master status",
|
||||
"description": "",
|
||||
"interval":10,
|
||||
"scope": "HOST",
|
||||
"enabled": true,
|
||||
"source": {
|
||||
"type": "SCRIPT",
|
||||
"path": "DOLPHIN/1.3.3/package/alerts/alert_dolphin_scheduler_status.py",
|
||||
"parameters": [
|
||||
|
||||
{
|
||||
"name": "connection.timeout",
|
||||
"display_name": "Connection Timeout",
|
||||
"value": 5.0,
|
||||
"type": "NUMERIC",
|
||||
"description": "The maximum time before this alert is considered to be CRITICAL",
|
||||
"units": "seconds",
|
||||
"threshold": "CRITICAL"
|
||||
},
|
||||
{
|
||||
"name": "alertName",
|
||||
"display_name": "alertName",
|
||||
"value": "DOLPHIN_MASTER",
|
||||
"type": "STRING",
|
||||
"description": "alert name"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"DOLPHIN_WORKER": [
|
||||
{
|
||||
"name": "DOLPHIN_WORKER_CHECK",
|
||||
"label": "check dolphin scheduler worker status",
|
||||
"description": "",
|
||||
"interval":10,
|
||||
"scope": "HOST",
|
||||
"enabled": true,
|
||||
"source": {
|
||||
"type": "SCRIPT",
|
||||
"path": "DOLPHIN/1.3.3/package/alerts/alert_dolphin_scheduler_status.py",
|
||||
"parameters": [
|
||||
|
||||
{
|
||||
"name": "connection.timeout",
|
||||
"display_name": "Connection Timeout",
|
||||
"value": 5.0,
|
||||
"type": "NUMERIC",
|
||||
"description": "The maximum time before this alert is considered to be CRITICAL",
|
||||
"units": "seconds",
|
||||
"threshold": "CRITICAL"
|
||||
},
|
||||
{
|
||||
"name": "alertName",
|
||||
"display_name": "alertName",
|
||||
"value": "DOLPHIN_WORKER",
|
||||
"type": "STRING",
|
||||
"description": "alert name"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"DOLPHIN_ALERT": [
|
||||
{
|
||||
"name": "DOLPHIN_DOLPHIN_ALERT_CHECK",
|
||||
"label": "check dolphin scheduler alert status",
|
||||
"description": "",
|
||||
"interval":10,
|
||||
"scope": "HOST",
|
||||
"enabled": true,
|
||||
"source": {
|
||||
"type": "SCRIPT",
|
||||
"path": "DOLPHIN/1.3.3/package/alerts/alert_dolphin_scheduler_status.py",
|
||||
"parameters": [
|
||||
|
||||
{
|
||||
"name": "connection.timeout",
|
||||
"display_name": "Connection Timeout",
|
||||
"value": 5.0,
|
||||
"type": "NUMERIC",
|
||||
"description": "The maximum time before this alert is considered to be CRITICAL",
|
||||
"units": "seconds",
|
||||
"threshold": "CRITICAL"
|
||||
},
|
||||
{
|
||||
"name": "alertName",
|
||||
"display_name": "alertName",
|
||||
"value": "DOLPHIN_ALERT",
|
||||
"type": "STRING",
|
||||
"description": "alert name"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>alert.type</name>
|
||||
<value>EMAIL</value>
|
||||
<description>alert type is EMAIL/SMS</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.protocol</name>
|
||||
<value>SMTP</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.server.host</name>
|
||||
<value>xxx.xxx.com</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.server.port</name>
|
||||
<value>25</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.sender</name>
|
||||
<value>admin</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.user</name>
|
||||
<value>admin</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.passwd</name>
|
||||
<value>000000</value>
|
||||
<description></description>
|
||||
<property-type>PASSWORD</property-type>
|
||||
<value-attributes>
|
||||
<type>password</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>mail.smtp.starttls.enable</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.smtp.ssl.enable</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>mail.smtp.ssl.trust</name>
|
||||
<value>xxx.xxx.com</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>enterprise.wechat.enable</name>
|
||||
<value>false</value>
|
||||
<description></description>
|
||||
<value-attributes>
|
||||
<type>value-list</type>
|
||||
<entries>
|
||||
<entry>
|
||||
<value>true</value>
|
||||
<label>Enabled</label>
|
||||
</entry>
|
||||
<entry>
|
||||
<value>false</value>
|
||||
<label>Disabled</label>
|
||||
</entry>
|
||||
</entries>
|
||||
<selection-cardinality>1</selection-cardinality>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>enterprise.wechat.corp.id</name>
|
||||
<value>wechatId</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>enterprise.wechat.secret</name>
|
||||
<value>secret</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>enterprise.wechat.agent.id</name>
|
||||
<value>agentId</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>enterprise.wechat.users</name>
|
||||
<value>wechatUsers</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>server.port</name>
|
||||
<value>12345</value>
|
||||
<description>
|
||||
server port
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
</property>
|
||||
<property>
|
||||
<name>server.servlet.session.timeout</name>
|
||||
<value>7200</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>server.servlet.context-path</name>
|
||||
<value>/dolphinscheduler/</value>
|
||||
<description>
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.servlet.multipart.max-file-size</name>
|
||||
<value>1024</value>
|
||||
<value-attributes>
|
||||
<unit>MB</unit>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.servlet.multipart.max-request-size</name>
|
||||
<value>1024</value>
|
||||
<value-attributes>
|
||||
<unit>MB</unit>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>server.jetty.max-http-post-size</name>
|
||||
<value>5000000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.messages.encoding</name>
|
||||
<value>UTF-8</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.messages.basename</name>
|
||||
<value>i18n/messages</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>security.authentication.type</name>
|
||||
<value>PASSWORD</value>
|
||||
<description></description>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,232 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>dolphinscheduler.queue.impl</name>
|
||||
<value>zookeeper</value>
|
||||
<description>
|
||||
Task queue implementation, default "zookeeper"
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.dolphinscheduler.root</name>
|
||||
<value>/dolphinscheduler</value>
|
||||
<description>
|
||||
dolphinscheduler root directory
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.session.timeout</name>
|
||||
<value>300</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.connection.timeout</name>
|
||||
<value>30000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.retry.base.sleep</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.retry.max.sleep</name>
|
||||
<value>30000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.retry.maxtime</name>
|
||||
<value>10</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>res.upload.startup.type</name>
|
||||
<display-name>Choose Resource Upload Startup Type</display-name>
|
||||
<description>
|
||||
Resource upload startup type : HDFS,S3,NONE
|
||||
</description>
|
||||
<value>NONE</value>
|
||||
<value-attributes>
|
||||
<type>value-list</type>
|
||||
<entries>
|
||||
<entry>
|
||||
<value>HDFS</value>
|
||||
<label>HDFS</label>
|
||||
</entry>
|
||||
<entry>
|
||||
<value>S3</value>
|
||||
<label>S3</label>
|
||||
</entry>
|
||||
<entry>
|
||||
<value>NONE</value>
|
||||
<label>NONE</label>
|
||||
</entry>
|
||||
</entries>
|
||||
<selection-cardinality>1</selection-cardinality>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>hdfs.root.user</name>
|
||||
<value>hdfs</value>
|
||||
<description>
|
||||
Users who have permission to create directories under the HDFS root path
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>data.store2hdfs.basepath</name>
|
||||
<value>/dolphinscheduler</value>
|
||||
<description>
|
||||
Data base dir, resource file will store to this hadoop hdfs path, self configuration,
|
||||
please make sure the directory exists on hdfs and have read write permissions。
|
||||
"/dolphinscheduler" is recommended
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>data.basedir.path</name>
|
||||
<value>/tmp/dolphinscheduler</value>
|
||||
<description>
|
||||
User data directory path, self configuration,
|
||||
please make sure the directory exists and have read write permissions
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>hadoop.security.authentication.startup.state</name>
|
||||
<value>false</value>
|
||||
<value-attributes>
|
||||
<type>value-list</type>
|
||||
<entries>
|
||||
<entry>
|
||||
<value>true</value>
|
||||
<label>Enabled</label>
|
||||
</entry>
|
||||
<entry>
|
||||
<value>false</value>
|
||||
<label>Disabled</label>
|
||||
</entry>
|
||||
</entries>
|
||||
<selection-cardinality>1</selection-cardinality>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>java.security.krb5.conf.path</name>
|
||||
<value>/opt/krb5.conf</value>
|
||||
<description>
|
||||
java.security.krb5.conf path
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>login.user.keytab.username</name>
|
||||
<value>hdfs-mycluster@ESZ.COM</value>
|
||||
<description>
|
||||
LoginUserFromKeytab user
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>login.user.keytab.path</name>
|
||||
<value>/opt/hdfs.headless.keytab</value>
|
||||
<description>
|
||||
LoginUserFromKeytab path
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>resource.view.suffixs</name>
|
||||
<value>txt,log,sh,conf,cfg,py,java,sql,hql,xml,properties</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>fs.defaultFS</name>
|
||||
<value>hdfs://mycluster:8020</value>
|
||||
<description>
|
||||
HA or single namenode,
|
||||
If namenode ha needs to copy core-site.xml and hdfs-site.xml to the conf directory,
|
||||
support s3,for example : s3a://dolphinscheduler
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>fs.s3a.endpoint</name>
|
||||
<value>http://host:9010</value>
|
||||
<description>
|
||||
s3 need,s3 endpoint
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>fs.s3a.access.key</name>
|
||||
<value>A3DXS30FO22544RE</value>
|
||||
<description>
|
||||
s3 need,s3 access key
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>fs.s3a.secret.key</name>
|
||||
<value>OloCLq3n+8+sdPHUhJ21XrSxTC+JK</value>
|
||||
<description>
|
||||
s3 need,s3 secret key
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>loggerserver.rpc.port</name>
|
||||
<value>50051</value>
|
||||
<value-attributes>
|
||||
<type>int</type>F
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,206 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>spring.datasource.initialSize</name>
|
||||
<value>5</value>
|
||||
<description>
|
||||
Init connection number
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.minIdle</name>
|
||||
<value>5</value>
|
||||
<description>
|
||||
Min connection number
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.maxActive</name>
|
||||
<value>50</value>
|
||||
<description>
|
||||
Max connection number
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.maxWait</name>
|
||||
<value>60000</value>
|
||||
<description>
|
||||
Max wait time for get a connection in milliseconds.
|
||||
If configuring maxWait, fair locks are enabled by default and concurrency efficiency decreases.
|
||||
If necessary, unfair locks can be used by configuring the useUnfairLock attribute to true.
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.timeBetweenEvictionRunsMillis</name>
|
||||
<value>60000</value>
|
||||
<description>
|
||||
Milliseconds for check to close free connections
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.timeBetweenConnectErrorMillis</name>
|
||||
<value>60000</value>
|
||||
<description>
|
||||
The Destroy thread detects the connection interval and closes the physical connection in milliseconds
|
||||
if the connection idle time is greater than or equal to minEvictableIdleTimeMillis.
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.minEvictableIdleTimeMillis</name>
|
||||
<value>300000</value>
|
||||
<description>
|
||||
The longest time a connection remains idle without being evicted, in milliseconds
|
||||
</description>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.validationQuery</name>
|
||||
<value>SELECT 1</value>
|
||||
<description>
|
||||
The SQL used to check whether the connection is valid requires a query statement.
|
||||
If validation Query is null, testOnBorrow, testOnReturn, and testWhileIdle will not work.
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.validationQueryTimeout</name>
|
||||
<value>3</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
Check whether the connection is valid for timeout, in seconds
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.testWhileIdle</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
When applying for a connection,
|
||||
if it is detected that the connection is idle longer than time Between Eviction Runs Millis,
|
||||
validation Query is performed to check whether the connection is valid
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.testOnBorrow</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
Execute validation to check if the connection is valid when applying for a connection
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.testOnReturn</name>
|
||||
<value>false</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
Execute validation to check if the connection is valid when the connection is returned
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.defaultAutoCommit</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.keepAlive</name>
|
||||
<value>false</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>spring.datasource.poolPreparedStatements</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
Open PSCache, specify count PSCache for every connection
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.maxPoolPreparedStatementPerConnectionSize</name>
|
||||
<value>20</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.spring.datasource.filters</name>
|
||||
<value>stat,wall,log4j</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>spring.datasource.connectionProperties</name>
|
||||
<value>druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000</value>
|
||||
<description></description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>dolphin.database.type</name>
|
||||
<value>mysql</value>
|
||||
<description>Dolphin Scheduler DataBase Type Which Is Select</description>
|
||||
<display-name>Dolphin Database Type</display-name>
|
||||
<value-attributes>
|
||||
<type>value-list</type>
|
||||
<entries>
|
||||
<entry>
|
||||
<value>mysql</value>
|
||||
<label>Mysql</label>
|
||||
</entry>
|
||||
<entry>
|
||||
<value>postgresql</value>
|
||||
<label>Postgresql</label>
|
||||
</entry>
|
||||
</entries>
|
||||
<selection-cardinality>1</selection-cardinality>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphin.database.host</name>
|
||||
<value></value>
|
||||
<display-name>Dolphin Database Host</display-name>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphin.database.port</name>
|
||||
<value></value>
|
||||
<display-name>Dolphin Database Port</display-name>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphin.database.username</name>
|
||||
<value></value>
|
||||
<display-name>Dolphin Database Username</display-name>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphin.database.password</name>
|
||||
<value></value>
|
||||
<display-name>Dolphin Database Password</display-name>
|
||||
<property-type>PASSWORD</property-type>
|
||||
<value-attributes>
|
||||
<type>password</type>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphin.user</name>
|
||||
<value></value>
|
||||
<description>Which user to install and admin dolphin scheduler</description>
|
||||
<display-name>Deploy User</display-name>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>dolphin.group</name>
|
||||
<value></value>
|
||||
<description>Which user to install and admin dolphin scheduler</description>
|
||||
<display-name>Deploy Group</display-name>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>dolphinscheduler-env-content</name>
|
||||
<display-name>Dolphinscheduler Env template</display-name>
|
||||
<description>This is the jinja template for dolphinscheduler.env.sh file</description>
|
||||
<value>#
|
||||
# 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.
|
||||
#
|
||||
|
||||
export HADOOP_HOME=/opt/soft/hadoop
|
||||
export HADOOP_CONF_DIR=/opt/soft/hadoop/etc/hadoop
|
||||
export SPARK_HOME1=/opt/soft/spark1
|
||||
export SPARK_HOME2=/opt/soft/spark2
|
||||
export PYTHON_HOME=/opt/soft/python
|
||||
export JAVA_HOME=/opt/soft/java
|
||||
export HIVE_HOME=/opt/soft/hive
|
||||
export FLINK_HOME=/opt/soft/flink
|
||||
export DATAX_HOME=/opt/soft/datax</value>
|
||||
<value-attributes>
|
||||
<type>content</type>
|
||||
<empty-value-valid>false</empty-value-valid>
|
||||
<show-property-name>false</show-property-name>
|
||||
</value-attributes>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>master.exec.threads</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master execute thread num</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.exec.task.num</name>
|
||||
<value>20</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master execute task number in parallel</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.heartbeat.interval</name>
|
||||
<value>10</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master heartbeat interval</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.task.commit.retryTimes</name>
|
||||
<value>5</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master commit task retry times</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.task.commit.interval</name>
|
||||
<value>1000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master commit task interval</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.max.cpuload.avg</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>only less than cpu avg load, master server can work. default value : the number of cpu cores * 2</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>master.reserved.memory</name>
|
||||
<value>0.3</value>
|
||||
<description>only larger than reserved memory, master server can work. default value : physical memory * 1/10, unit is G.</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
|
||||
<property>
|
||||
<name>master.listen.port</name>
|
||||
<value>5678</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>master listen port</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>org.quartz.scheduler.instanceName</name>
|
||||
<value>DolphinScheduler</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<!-- 列举枚举值 -->
|
||||
<name>org.quartz.scheduler.instanceId</name>
|
||||
<value>AUTO</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.scheduler.makeSchedulerThreadDaemon</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.useProperties</name>
|
||||
<value>false</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.threadPool.class</name>
|
||||
<value>org.quartz.simpl.SimpleThreadPool</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.threadPool.makeThreadsDaemons</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.threadPool.threadCount</name>
|
||||
<value>25</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.threadPool.threadPriority</name>
|
||||
<value>5</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.class</name>
|
||||
<value>org.quartz.impl.jdbcjobstore.JobStoreTX</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.tablePrefix</name>
|
||||
<value>QRTZ_</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.isClustered</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.misfireThreshold</name>
|
||||
<value>60000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.clusterCheckinInterval</name>
|
||||
<value>5000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.acquireTriggersWithinLock</name>
|
||||
<value>true</value>
|
||||
<value-attributes>
|
||||
<type>boolean</type>
|
||||
</value-attributes>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.jobStore.dataSource</name>
|
||||
<value>myDs</value>
|
||||
<description></description>
|
||||
</property>
|
||||
<property>
|
||||
<name>org.quartz.dataSource.myDs.connectionProvider.class</name>
|
||||
<value>org.apache.dolphinscheduler.service.quartz.DruidConnectionProvider</value>
|
||||
<description></description>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>worker.exec.threads</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>worker execute thread num</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>worker.heartbeat.interval</name>
|
||||
<value>10</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>worker heartbeat interval</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>worker.max.cpuload.avg</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>only less than cpu avg load, worker server can work. default value : the number of cpu cores * 2
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>worker.reserved.memory</name>
|
||||
<value>0.3</value>
|
||||
<description>only larger than reserved memory, worker server can work. default value : physical memory * 1/10,
|
||||
unit is G.
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>worker.listen.port</name>
|
||||
<value>1234</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>worker listen port</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>worker.groups</name>
|
||||
<value>default</value>
|
||||
<description>default worker group</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>worker.host.weigth</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>worker host weight</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<configuration>
|
||||
<property>
|
||||
<name>zookeeper.dolphinscheduler.root</name>
|
||||
<value>/dolphinscheduler</value>
|
||||
<description>
|
||||
dolphinscheduler root directory
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.session.timeout</name>
|
||||
<value>300</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.connection.timeout</name>
|
||||
<value>300</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.retry.base.sleep</name>
|
||||
<value>100</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.retry.max.sleep</name>
|
||||
<value>30000</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
<property>
|
||||
<name>zookeeper.retry.maxtime</name>
|
||||
<value>5</value>
|
||||
<value-attributes>
|
||||
<type>int</type>
|
||||
</value-attributes>
|
||||
<description>
|
||||
</description>
|
||||
<on-ambari-upgrade add="true"/>
|
||||
</property>
|
||||
</configuration>
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<metainfo>
|
||||
<schemaVersion>2.0</schemaVersion>
|
||||
<services>
|
||||
<service>
|
||||
<name>DOLPHIN</name>
|
||||
<displayName>Dolphin Scheduler</displayName>
|
||||
<comment>分布式易扩展的可视化DAG工作流任务调度系统</comment>
|
||||
<version>1.3.3</version>
|
||||
<components>
|
||||
<component>
|
||||
<name>DOLPHIN_MASTER</name>
|
||||
<displayName>DS Master</displayName>
|
||||
<category>MASTER</category>
|
||||
<cardinality>1+</cardinality>
|
||||
<commandScript>
|
||||
<script>scripts/dolphin_master_service.py</script>
|
||||
<scriptType>PYTHON</scriptType>
|
||||
<timeout>600</timeout>
|
||||
</commandScript>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<name>DOLPHIN_LOGGER</name>
|
||||
<displayName>DS Logger</displayName>
|
||||
<category>SLAVE</category>
|
||||
<cardinality>1+</cardinality>
|
||||
<commandScript>
|
||||
<script>scripts/dolphin_logger_service.py</script>
|
||||
<scriptType>PYTHON</scriptType>
|
||||
<timeout>600</timeout>
|
||||
</commandScript>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<name>DOLPHIN_WORKER</name>
|
||||
<displayName>DS Worker</displayName>
|
||||
<category>SLAVE</category>
|
||||
<cardinality>1+</cardinality>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<name>DOLPHIN/DOLPHIN_LOGGER</name>
|
||||
<scope>host</scope>
|
||||
<auto-deploy>
|
||||
<enabled>true</enabled>
|
||||
</auto-deploy>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<commandScript>
|
||||
<script>scripts/dolphin_worker_service.py</script>
|
||||
<scriptType>PYTHON</scriptType>
|
||||
<timeout>600</timeout>
|
||||
</commandScript>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<name>DOLPHIN_ALERT</name>
|
||||
<displayName>DS Alert</displayName>
|
||||
<category>SLAVE</category>
|
||||
<cardinality>1</cardinality>
|
||||
<commandScript>
|
||||
<script>scripts/dolphin_alert_service.py</script>
|
||||
<scriptType>PYTHON</scriptType>
|
||||
<timeout>600</timeout>
|
||||
</commandScript>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<name>DOLPHIN_API</name>
|
||||
<displayName>DS_Api</displayName>
|
||||
<category>SLAVE</category>
|
||||
<cardinality>1</cardinality>
|
||||
<commandScript>
|
||||
<script>scripts/dolphin_api_service.py</script>
|
||||
<scriptType>PYTHON</scriptType>
|
||||
<timeout>600</timeout>
|
||||
</commandScript>
|
||||
</component>
|
||||
</components>
|
||||
|
||||
<requiredServices>
|
||||
<service>ZOOKEEPER</service>
|
||||
</requiredServices>
|
||||
|
||||
<osSpecifics>
|
||||
<osSpecific>
|
||||
<osFamily>any</osFamily>
|
||||
<packages>
|
||||
<package>
|
||||
<name>apache-dolphinscheduler*</name>
|
||||
</package>
|
||||
</packages>
|
||||
</osSpecific>
|
||||
</osSpecifics>
|
||||
|
||||
<configuration-dependencies>
|
||||
<config-type>dolphin-alert</config-type>
|
||||
<config-type>dolphin-app-api</config-type>
|
||||
<config-type>dolphin-app-dao</config-type>
|
||||
<config-type>dolphin-common</config-type>
|
||||
<config-type>dolphin-env</config-type>
|
||||
<config-type>dolphin-quartz</config-type>
|
||||
</configuration-dependencies>
|
||||
|
||||
<themes>
|
||||
<theme>
|
||||
<fileName>theme.json</fileName>
|
||||
<default>true</default>
|
||||
</theme>
|
||||
</themes>
|
||||
|
||||
<quickLinksConfigurations-dir>quicklinks</quickLinksConfigurations-dir>
|
||||
<quickLinksConfigurations>
|
||||
<quickLinksConfiguration>
|
||||
<fileName>quicklinks.json</fileName>
|
||||
<default>true</default>
|
||||
</quickLinksConfiguration>
|
||||
</quickLinksConfigurations>
|
||||
</service>
|
||||
</services>
|
||||
</metainfo>
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
import socket
|
||||
import urllib2
|
||||
import os
|
||||
import logging
|
||||
import ambari_simplejson as json
|
||||
from resource_management.libraries.script.script import Script
|
||||
import sys
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('utf-8')
|
||||
|
||||
logger = logging.getLogger('ambari_alerts')
|
||||
|
||||
config = Script.get_config()
|
||||
|
||||
|
||||
def get_tokens():
|
||||
"""
|
||||
Returns a tuple of tokens in the format {{site/property}} that will be used
|
||||
to build the dictionary passed into execute
|
||||
|
||||
:rtype tuple
|
||||
"""
|
||||
|
||||
def get_info(url, connection_timeout):
|
||||
response = None
|
||||
|
||||
try:
|
||||
response = urllib2.urlopen(url, timeout=connection_timeout)
|
||||
json_data = response.read()
|
||||
return json_data
|
||||
finally:
|
||||
if response is not None:
|
||||
try:
|
||||
response.close()
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def execute(configurations={}, parameters={}, host_name=None):
|
||||
"""
|
||||
Returns a tuple containing the result code and a pre-formatted result label
|
||||
|
||||
Keyword arguments:
|
||||
configurations : a mapping of configuration key to value
|
||||
parameters : a mapping of script parameter key to value
|
||||
host_name : the name of this host where the alert is running
|
||||
|
||||
:type configurations dict
|
||||
:type parameters dict
|
||||
:type host_name str
|
||||
"""
|
||||
|
||||
alert_name = parameters['alertName']
|
||||
|
||||
dolphin_pidfile_dir = "/opt/soft/run/dolphinscheduler"
|
||||
|
||||
pid = "0"
|
||||
|
||||
|
||||
from resource_management.core import sudo
|
||||
|
||||
is_running = True
|
||||
pid_file_path = ""
|
||||
if alert_name == 'DOLPHIN_MASTER':
|
||||
pid_file_path = dolphin_pidfile_dir + "/master-server.pid"
|
||||
elif alert_name == 'DOLPHIN_WORKER':
|
||||
pid_file_path = dolphin_pidfile_dir + "/worker-server.pid"
|
||||
elif alert_name == 'DOLPHIN_ALERT':
|
||||
pid_file_path = dolphin_pidfile_dir + "/alert-server.pid"
|
||||
elif alert_name == 'DOLPHIN_LOGGER':
|
||||
pid_file_path = dolphin_pidfile_dir + "/logger-server.pid"
|
||||
elif alert_name == 'DOLPHIN_API':
|
||||
pid_file_path = dolphin_pidfile_dir + "/api-server.pid"
|
||||
|
||||
if not pid_file_path or not os.path.isfile(pid_file_path):
|
||||
is_running = False
|
||||
|
||||
try:
|
||||
pid = int(sudo.read_file(pid_file_path))
|
||||
except:
|
||||
is_running = False
|
||||
|
||||
try:
|
||||
# Kill will not actually kill the process
|
||||
# From the doc:
|
||||
# If sig is 0, then no signal is sent, but error checking is still
|
||||
# performed; this can be used to check for the existence of a
|
||||
# process ID or process group ID.
|
||||
sudo.kill(pid, 0)
|
||||
except OSError:
|
||||
is_running = False
|
||||
|
||||
if host_name is None:
|
||||
host_name = socket.getfqdn()
|
||||
|
||||
if not is_running:
|
||||
result_code = "CRITICAL"
|
||||
else:
|
||||
result_code = "OK"
|
||||
|
||||
label = "The comment {0} of DOLPHIN_SCHEDULER on {1} is {2}".format(alert_name, host_name, result_code)
|
||||
|
||||
return ((result_code, [label]))
|
||||
|
||||
if __name__ == "__main__":
|
||||
pass
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
import time
|
||||
from resource_management import *
|
||||
|
||||
from dolphin_env import dolphin_env
|
||||
|
||||
|
||||
class DolphinAlertService(Script):
|
||||
def install(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.install_packages(env)
|
||||
Execute(('chmod', '-R', '777', params.dolphin_home))
|
||||
Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
|
||||
|
||||
def configure(self, env):
|
||||
import params
|
||||
params.pika_slave = True
|
||||
env.set_params(params)
|
||||
|
||||
dolphin_env()
|
||||
|
||||
def start(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.configure(env)
|
||||
no_op_test = format("ls {dolphin_pidfile_dir}/alert-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/alert-server.pid` | grep `cat {dolphin_pidfile_dir}/alert-server.pid` >/dev/null 2>&1")
|
||||
|
||||
start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start alert-server")
|
||||
Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
|
||||
|
||||
def stop(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop alert-server")
|
||||
Execute(stop_cmd, user=params.dolphin_user)
|
||||
time.sleep(5)
|
||||
|
||||
def status(self, env):
|
||||
import status_params
|
||||
env.set_params(status_params)
|
||||
check_process_status(status_params.dolphin_run_dir + "alert-server.pid")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
DolphinAlertService().execute()
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
import time
|
||||
from resource_management import *
|
||||
|
||||
from dolphin_env import dolphin_env
|
||||
|
||||
|
||||
class DolphinApiService(Script):
|
||||
def install(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.install_packages(env)
|
||||
Execute(('chmod', '-R', '777', params.dolphin_home))
|
||||
Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
|
||||
|
||||
def configure(self, env):
|
||||
import params
|
||||
params.pika_slave = True
|
||||
env.set_params(params)
|
||||
|
||||
dolphin_env()
|
||||
|
||||
def start(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.configure(env)
|
||||
|
||||
#init
|
||||
init_cmd=format("sh " + params.dolphin_home + "/script/create-dolphinscheduler.sh")
|
||||
Execute(init_cmd, user=params.dolphin_user)
|
||||
|
||||
#upgrade
|
||||
upgrade_cmd=format("sh " + params.dolphin_home + "/script/upgrade-dolphinscheduler.sh")
|
||||
Execute(upgrade_cmd, user=params.dolphin_user)
|
||||
|
||||
no_op_test = format("ls {dolphin_pidfile_dir}/api-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/api-server.pid` | grep `cat {dolphin_pidfile_dir}/api-server.pid` >/dev/null 2>&1")
|
||||
|
||||
start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start api-server")
|
||||
Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
|
||||
|
||||
def stop(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop api-server")
|
||||
Execute(stop_cmd, user=params.dolphin_user)
|
||||
time.sleep(5)
|
||||
|
||||
def status(self, env):
|
||||
import status_params
|
||||
env.set_params(status_params)
|
||||
check_process_status(status_params.dolphin_run_dir + "api-server.pid")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
DolphinApiService().execute()
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
"""
|
||||
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 resource_management import *
|
||||
|
||||
|
||||
def dolphin_env():
|
||||
import params
|
||||
|
||||
Directory(params.dolphin_pidfile_dir,
|
||||
mode=0777,
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group,
|
||||
create_parents=True
|
||||
)
|
||||
Directory(params.dolphin_log_dir,
|
||||
mode=0777,
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group,
|
||||
create_parents=True
|
||||
)
|
||||
Directory(params.dolphin_conf_dir,
|
||||
mode=0777,
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group,
|
||||
create_parents=True
|
||||
)
|
||||
|
||||
Directory(params.dolphin_common_map['data.basedir.path'],
|
||||
mode=0777,
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group,
|
||||
create_parents=True
|
||||
)
|
||||
|
||||
|
||||
File(format(params.dolphin_env_path),
|
||||
mode=0777,
|
||||
content=InlineTemplate(params.dolphin_env_content),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
|
||||
File(format(params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh"),
|
||||
mode=0755,
|
||||
content=Template("dolphin-daemon.sh.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/master.properties"),
|
||||
mode=0755,
|
||||
content=Template("master.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/worker.properties"),
|
||||
mode=0755,
|
||||
content=Template("worker.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/alert.properties"),
|
||||
mode=0755,
|
||||
content=Template("alert.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/datasource.properties"),
|
||||
mode=0755,
|
||||
content=Template("datasource.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/application-api.properties"),
|
||||
mode=0755,
|
||||
content=Template("application-api.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/common.properties"),
|
||||
mode=0755,
|
||||
content=Template("common.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/quartz.properties"),
|
||||
mode=0755,
|
||||
content=Template("quartz.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
||||
File(format(params.dolphin_conf_dir + "/zookeeper.properties"),
|
||||
mode=0755,
|
||||
content=Template("zookeeper.properties.j2"),
|
||||
owner=params.dolphin_user,
|
||||
group=params.dolphin_group
|
||||
)
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
import time
|
||||
from resource_management import *
|
||||
|
||||
from dolphin_env import dolphin_env
|
||||
|
||||
|
||||
class DolphinLoggerService(Script):
|
||||
def install(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.install_packages(env)
|
||||
Execute(('chmod', '-R', '777', params.dolphin_home))
|
||||
Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
|
||||
def configure(self, env):
|
||||
import params
|
||||
params.pika_slave = True
|
||||
env.set_params(params)
|
||||
|
||||
dolphin_env()
|
||||
|
||||
def start(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.configure(env)
|
||||
no_op_test = format("ls {dolphin_pidfile_dir}/logger-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/logger-server.pid` | grep `cat {dolphin_pidfile_dir}/logger-server.pid` >/dev/null 2>&1")
|
||||
|
||||
start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start logger-server")
|
||||
Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
|
||||
|
||||
def stop(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop logger-server")
|
||||
Execute(stop_cmd, user=params.dolphin_user)
|
||||
time.sleep(5)
|
||||
|
||||
def status(self, env):
|
||||
import status_params
|
||||
env.set_params(status_params)
|
||||
check_process_status(status_params.dolphin_run_dir + "logger-server.pid")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
DolphinLoggerService().execute()
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
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.
|
||||
"""
|
||||
import time
|
||||
from resource_management import *
|
||||
|
||||
from dolphin_env import dolphin_env
|
||||
|
||||
|
||||
class DolphinMasterService(Script):
|
||||
def install(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.install_packages(env)
|
||||
Execute(('chmod', '-R', '777', params.dolphin_home))
|
||||
Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
|
||||
|
||||
def configure(self, env):
|
||||
import params
|
||||
params.pika_slave = True
|
||||
env.set_params(params)
|
||||
|
||||
dolphin_env()
|
||||
|
||||
def start(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.configure(env)
|
||||
no_op_test = format("ls {dolphin_pidfile_dir}/master-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/master-server.pid` | grep `cat {dolphin_pidfile_dir}/master-server.pid` >/dev/null 2>&1")
|
||||
start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start master-server")
|
||||
Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
|
||||
|
||||
def stop(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop master-server")
|
||||
Execute(stop_cmd, user=params.dolphin_user)
|
||||
time.sleep(5)
|
||||
|
||||
def status(self, env):
|
||||
import status_params
|
||||
env.set_params(status_params)
|
||||
check_process_status(status_params.dolphin_run_dir + "master-server.pid")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
DolphinMasterService().execute()
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
import time
|
||||
from resource_management import *
|
||||
|
||||
from dolphin_env import dolphin_env
|
||||
|
||||
|
||||
class DolphinWorkerService(Script):
|
||||
def install(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.install_packages(env)
|
||||
Execute(('chmod', '-R', '777', params.dolphin_home))
|
||||
Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
|
||||
|
||||
def configure(self, env):
|
||||
import params
|
||||
params.pika_slave = True
|
||||
env.set_params(params)
|
||||
|
||||
dolphin_env()
|
||||
|
||||
def start(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
self.configure(env)
|
||||
no_op_test = format("ls {dolphin_pidfile_dir}/worker-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/worker-server.pid` | grep `cat {dolphin_pidfile_dir}/worker-server.pid` >/dev/null 2>&1")
|
||||
start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start worker-server")
|
||||
Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
|
||||
|
||||
def stop(self, env):
|
||||
import params
|
||||
env.set_params(params)
|
||||
stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop worker-server")
|
||||
Execute(stop_cmd, user=params.dolphin_user)
|
||||
time.sleep(5)
|
||||
|
||||
def status(self, env):
|
||||
import status_params
|
||||
env.set_params(status_params)
|
||||
check_process_status(status_params.dolphin_run_dir + "worker-server.pid")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
DolphinWorkerService().execute()
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
"""
|
||||
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.
|
||||
"""
|
||||
|
||||
|
||||
import sys
|
||||
from resource_management import *
|
||||
from resource_management.core.logger import Logger
|
||||
from resource_management.libraries.functions import default
|
||||
|
||||
Logger.initialize_logger()
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('utf-8')
|
||||
|
||||
# server configurations
|
||||
config = Script.get_config()
|
||||
|
||||
# conf_dir = "/etc/"
|
||||
dolphin_home = "/opt/soft/dolphinscheduler"
|
||||
dolphin_conf_dir = dolphin_home + "/conf"
|
||||
dolphin_log_dir = dolphin_home + "/logs"
|
||||
dolphin_bin_dir = dolphin_home + "/bin"
|
||||
dolphin_lib_jars = dolphin_home + "/lib/*"
|
||||
dolphin_pidfile_dir = "/opt/soft/run/dolphinscheduler"
|
||||
|
||||
rmHosts = default("/clusterHostInfo/rm_host", [])
|
||||
|
||||
# dolphin-env
|
||||
dolphin_env_map = {}
|
||||
dolphin_env_map.update(config['configurations']['dolphin-env'])
|
||||
|
||||
# which user to install and admin dolphin scheduler
|
||||
dolphin_user = dolphin_env_map['dolphin.user']
|
||||
dolphin_group = dolphin_env_map['dolphin.group']
|
||||
|
||||
# .dolphinscheduler_env.sh
|
||||
dolphin_env_path = dolphin_conf_dir + '/env/dolphinscheduler_env.sh'
|
||||
dolphin_env_content = dolphin_env_map['dolphinscheduler-env-content']
|
||||
|
||||
# database config
|
||||
dolphin_database_config = {}
|
||||
dolphin_database_config['dolphin_database_type'] = dolphin_env_map['dolphin.database.type']
|
||||
dolphin_database_config['dolphin_database_username'] = dolphin_env_map['dolphin.database.username']
|
||||
dolphin_database_config['dolphin_database_password'] = dolphin_env_map['dolphin.database.password']
|
||||
if 'mysql' == dolphin_database_config['dolphin_database_type']:
|
||||
dolphin_database_config['dolphin_database_driver'] = 'com.mysql.jdbc.Driver'
|
||||
dolphin_database_config['driverDelegateClass'] = 'org.quartz.impl.jdbcjobstore.StdJDBCDelegate'
|
||||
dolphin_database_config['dolphin_database_url'] = 'jdbc:mysql://' + dolphin_env_map['dolphin.database.host'] \
|
||||
+ ':' + dolphin_env_map['dolphin.database.port'] \
|
||||
+ '/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8'
|
||||
else:
|
||||
dolphin_database_config['dolphin_database_driver'] = 'org.postgresql.Driver'
|
||||
dolphin_database_config['driverDelegateClass'] = 'org.quartz.impl.jdbcjobstore.PostgreSQLDelegate'
|
||||
dolphin_database_config['dolphin_database_url'] = 'jdbc:postgresql://' + dolphin_env_map['dolphin.database.host'] \
|
||||
+ ':' + dolphin_env_map['dolphin.database.port'] \
|
||||
+ '/dolphinscheduler'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# application-alert.properties
|
||||
dolphin_alert_map = {}
|
||||
wechat_push_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=$token'
|
||||
wechat_token_url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=$corpId&corpsecret=$secret'
|
||||
wechat_team_send_msg = '{\"toparty\":\"{toParty}\",\"agentid\":\"{agentId}\",\"msgtype\":\"text\",\"text\":{\"content\":\"{msg}\"},\"safe\":\"0\"}'
|
||||
wechat_user_send_msg = '{\"touser\":\"{toUser}\",\"agentid\":\"{agentId}\",\"msgtype\":\"markdown\",\"markdown\":{\"content\":\"{msg}\"}}'
|
||||
|
||||
dolphin_alert_config_map = config['configurations']['dolphin-alert']
|
||||
|
||||
if dolphin_alert_config_map['enterprise.wechat.enable']:
|
||||
dolphin_alert_map['enterprise.wechat.push.ur'] = wechat_push_url
|
||||
dolphin_alert_map['enterprise.wechat.token.url'] = wechat_token_url
|
||||
dolphin_alert_map['enterprise.wechat.team.send.msg'] = wechat_team_send_msg
|
||||
dolphin_alert_map['enterprise.wechat.user.send.msg'] = wechat_user_send_msg
|
||||
|
||||
dolphin_alert_map.update(dolphin_alert_config_map)
|
||||
|
||||
|
||||
|
||||
# application-api.properties
|
||||
dolphin_app_api_map = {}
|
||||
dolphin_app_api_map.update(config['configurations']['dolphin-application-api'])
|
||||
|
||||
|
||||
# common.properties
|
||||
dolphin_common_map = {}
|
||||
|
||||
if 'yarn-site' in config['configurations'] and \
|
||||
'yarn.resourcemanager.webapp.address' in config['configurations']['yarn-site']:
|
||||
yarn_resourcemanager_webapp_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address']
|
||||
yarn_application_status_address = 'http://' + yarn_resourcemanager_webapp_address + '/ws/v1/cluster/apps/%s'
|
||||
dolphin_common_map['yarn.application.status.address'] = yarn_application_status_address
|
||||
|
||||
rmHosts = default("/clusterHostInfo/rm_host", [])
|
||||
if len(rmHosts) > 1:
|
||||
dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ','.join(rmHosts)
|
||||
else:
|
||||
dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ''
|
||||
|
||||
dolphin_common_map_tmp = config['configurations']['dolphin-common']
|
||||
data_basedir_path = dolphin_common_map_tmp['data.basedir.path']
|
||||
dolphin_common_map['dolphinscheduler.env.path'] = dolphin_env_path
|
||||
dolphin_common_map.update(config['configurations']['dolphin-common'])
|
||||
|
||||
# datasource.properties
|
||||
dolphin_datasource_map = {}
|
||||
dolphin_datasource_map['spring.datasource.type'] = 'com.alibaba.druid.pool.DruidDataSource'
|
||||
dolphin_datasource_map['spring.datasource.driver-class-name'] = dolphin_database_config['dolphin_database_driver']
|
||||
dolphin_datasource_map['spring.datasource.url'] = dolphin_database_config['dolphin_database_url']
|
||||
dolphin_datasource_map['spring.datasource.username'] = dolphin_database_config['dolphin_database_username']
|
||||
dolphin_datasource_map['spring.datasource.password'] = dolphin_database_config['dolphin_database_password']
|
||||
dolphin_datasource_map.update(config['configurations']['dolphin-datasource'])
|
||||
|
||||
# master.properties
|
||||
dolphin_master_map = config['configurations']['dolphin-master']
|
||||
|
||||
# quartz.properties
|
||||
dolphin_quartz_map = {}
|
||||
dolphin_quartz_map['org.quartz.jobStore.driverDelegateClass'] = dolphin_database_config['driverDelegateClass']
|
||||
dolphin_quartz_map.update(config['configurations']['dolphin-quartz'])
|
||||
|
||||
# worker.properties
|
||||
dolphin_worker_map = config['configurations']['dolphin-worker']
|
||||
|
||||
# zookeeper.properties
|
||||
dolphin_zookeeper_map={}
|
||||
zookeeperHosts = default("/clusterHostInfo/zookeeper_hosts", [])
|
||||
if len(zookeeperHosts) > 0 and "clientPort" in config['configurations']['zoo.cfg']:
|
||||
clientPort = config['configurations']['zoo.cfg']['clientPort']
|
||||
zookeeperPort = ":" + clientPort + ","
|
||||
dolphin_zookeeper_map['zookeeper.quorum'] = zookeeperPort.join(zookeeperHosts) + ":" + clientPort
|
||||
dolphin_zookeeper_map.update(config['configurations']['dolphin-zookeeper'])
|
||||
if 'spring.servlet.multipart.max-file-size' in dolphin_app_api_map:
|
||||
file_size = dolphin_app_api_map['spring.servlet.multipart.max-file-size']
|
||||
dolphin_app_api_map['spring.servlet.multipart.max-file-size'] = file_size + "MB"
|
||||
if 'spring.servlet.multipart.max-request-size' in dolphin_app_api_map:
|
||||
request_size = dolphin_app_api_map['spring.servlet.multipart.max-request-size']
|
||||
dolphin_app_api_map['spring.servlet.multipart.max-request-size'] = request_size + "MB"
|
||||
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
"""
|
||||
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 resource_management import *
|
||||
from resource_management.libraries.functions import get_unique_id_and_date
|
||||
|
||||
class ServiceCheck(Script):
|
||||
def service_check(self, env):
|
||||
import params
|
||||
#env.set_params(params)
|
||||
|
||||
# Execute(format("which pika_server"))
|
||||
|
||||
if __name__ == "__main__":
|
||||
ServiceCheck().execute()
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
"""
|
||||
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 resource_management import *
|
||||
|
||||
config = Script.get_config()
|
||||
|
||||
dolphin_run_dir = "/opt/soft/run/dolphinscheduler/"
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_alert_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_app_api_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_common_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_datasource_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
usage="Usage: dolphinscheduler-daemon.sh (start|stop) <command> "
|
||||
|
||||
# if no args specified, show usage
|
||||
if [ $# -le 1 ]; then
|
||||
echo $usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
startStop=$1
|
||||
shift
|
||||
command=$1
|
||||
shift
|
||||
|
||||
echo "Begin $startStop $command......"
|
||||
|
||||
BIN_DIR=`dirname $0`
|
||||
BIN_DIR=`cd "$BIN_DIR"; pwd`
|
||||
DOLPHINSCHEDULER_HOME=$BIN_DIR/..
|
||||
|
||||
export HOSTNAME=`hostname`
|
||||
|
||||
DOLPHINSCHEDULER_LIB_JARS={{dolphin_lib_jars}}
|
||||
|
||||
DOLPHINSCHEDULER_OPTS="-server -Xmx16g -Xms1g -Xss512k -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=10m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70"
|
||||
STOP_TIMEOUT=5
|
||||
|
||||
log={{dolphin_log_dir}}/dolphinscheduler-$command-$HOSTNAME.out
|
||||
pid={{dolphin_pidfile_dir}}/$command.pid
|
||||
|
||||
cd $DOLPHINSCHEDULER_HOME
|
||||
|
||||
if [ "$command" = "api-server" ]; then
|
||||
LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-api.xml -Dspring.profiles.active=api"
|
||||
CLASS=org.apache.dolphinscheduler.api.ApiApplicationServer
|
||||
elif [ "$command" = "master-server" ]; then
|
||||
LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-master.xml -Ddruid.mysql.usePingMethod=false"
|
||||
CLASS=org.apache.dolphinscheduler.server.master.MasterServer
|
||||
elif [ "$command" = "worker-server" ]; then
|
||||
LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-worker.xml -Ddruid.mysql.usePingMethod=false"
|
||||
CLASS=org.apache.dolphinscheduler.server.worker.WorkerServer
|
||||
elif [ "$command" = "alert-server" ]; then
|
||||
LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-alert.xml"
|
||||
CLASS=org.apache.dolphinscheduler.alert.AlertServer
|
||||
elif [ "$command" = "logger-server" ]; then
|
||||
CLASS=org.apache.dolphinscheduler.server.log.LoggerServer
|
||||
else
|
||||
echo "Error: No command named \`$command' was found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $startStop in
|
||||
(start)
|
||||
|
||||
if [ -f $pid ]; then
|
||||
if kill -0 `cat $pid` > /dev/null 2>&1; then
|
||||
echo $command running as process `cat $pid`. Stop it first.
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo starting $command, logging to $log
|
||||
|
||||
exec_command="$LOG_FILE $DOLPHINSCHEDULER_OPTS -classpath {{dolphin_conf_dir}}:{{dolphin_lib_jars}} $CLASS"
|
||||
|
||||
echo "nohup java $exec_command > $log 2>&1 < /dev/null &"
|
||||
nohup java $exec_command > $log 2>&1 < /dev/null &
|
||||
echo $! > $pid
|
||||
;;
|
||||
|
||||
(stop)
|
||||
|
||||
if [ -f $pid ]; then
|
||||
TARGET_PID=`cat $pid`
|
||||
if kill -0 $TARGET_PID > /dev/null 2>&1; then
|
||||
echo stopping $command
|
||||
kill $TARGET_PID
|
||||
sleep $STOP_TIMEOUT
|
||||
if kill -0 $TARGET_PID > /dev/null 2>&1; then
|
||||
echo "$command did not stop gracefully after $STOP_TIMEOUT seconds: killing with kill -9"
|
||||
kill -9 $TARGET_PID
|
||||
fi
|
||||
else
|
||||
echo no $command to stop
|
||||
fi
|
||||
rm -f $pid
|
||||
else
|
||||
echo no $command to stop
|
||||
fi
|
||||
;;
|
||||
|
||||
(*)
|
||||
echo $usage
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
echo "End $startStop $command."
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_master_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_quartz_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_worker_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
{% for key, value in dolphin_zookeeper_map.iteritems() -%}
|
||||
{{key}}={{value}}
|
||||
{% endfor %}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"name": "default",
|
||||
"description": "default quick links configuration",
|
||||
"configuration": {
|
||||
"protocol":
|
||||
{
|
||||
"type":"http"
|
||||
},
|
||||
|
||||
"links": [
|
||||
{
|
||||
"name": "dolphin-application-ui",
|
||||
"label": "DolphinApplication UI",
|
||||
"requires_user_name": "false",
|
||||
"component_name": "DOLPHIN_API",
|
||||
"url": "%@://%@:%@/dolphinscheduler/ui/view/login/index.html",
|
||||
"port":{
|
||||
"http_property": "server.port",
|
||||
"http_default_port": "12345",
|
||||
"regex": "^(\\d+)$",
|
||||
"site": "dolphin-application-api"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,661 +0,0 @@
|
|||
{
|
||||
"name": "default",
|
||||
"description": "Default theme for Dolphin Scheduler service",
|
||||
"configuration": {
|
||||
"layouts": [
|
||||
{
|
||||
"name": "default",
|
||||
"tabs": [
|
||||
{
|
||||
"name": "settings",
|
||||
"display-name": "Settings",
|
||||
"layout": {
|
||||
"tab-rows": "3",
|
||||
"tab-columns": "3",
|
||||
"sections": [
|
||||
{
|
||||
"name": "dolphin-env-config",
|
||||
"display-name": "Dolphin Env Config",
|
||||
"row-index": "0",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "2",
|
||||
"section-rows": "1",
|
||||
"section-columns": "2",
|
||||
"subsections": [
|
||||
{
|
||||
"name": "env-row1-col1",
|
||||
"display-name": "Deploy User Info",
|
||||
"row-index": "0",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
},
|
||||
{
|
||||
"name": "env-row1-col2",
|
||||
"display-name": "System Env Optimization",
|
||||
"row-index": "0",
|
||||
"column-index": "1",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dolphin-database-config",
|
||||
"display-name": "Database Config",
|
||||
"row-index": "1",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "2",
|
||||
"section-rows": "1",
|
||||
"section-columns": "3",
|
||||
"subsections": [
|
||||
{
|
||||
"name": "database-row1-col1",
|
||||
"row-index": "0",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
},
|
||||
{
|
||||
"name": "database-row1-col2",
|
||||
"row-index": "0",
|
||||
"column-index": "1",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
},
|
||||
{
|
||||
"name": "database-row1-col3",
|
||||
"row-index": "0",
|
||||
"column-index": "2",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dynamic-config",
|
||||
"row-index": "2",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "2",
|
||||
"section-rows": "1",
|
||||
"section-columns": "3",
|
||||
"subsections": [
|
||||
{
|
||||
"name": "dynamic-row1-col1",
|
||||
"display-name": "Resource FS Config",
|
||||
"row-index": "0",
|
||||
"column-index": "0",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
},
|
||||
{
|
||||
"name": "dynamic-row1-col2",
|
||||
"display-name": "Kerberos Info",
|
||||
"row-index": "0",
|
||||
"column-index": "1",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
},
|
||||
{
|
||||
"name": "dynamic-row1-col3",
|
||||
"display-name": "Wechat Info",
|
||||
"row-index": "0",
|
||||
"column-index": "1",
|
||||
"row-span": "1",
|
||||
"column-span": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"placement": {
|
||||
"configuration-layout": "default",
|
||||
"configs": [
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.type",
|
||||
"subsection-name": "database-row1-col1"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.host",
|
||||
"subsection-name": "database-row1-col2"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.port",
|
||||
"subsection-name": "database-row1-col2"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.username",
|
||||
"subsection-name": "database-row1-col3"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.password",
|
||||
"subsection-name": "database-row1-col3"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.user",
|
||||
"subsection-name": "env-row1-col1"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.group",
|
||||
"subsection-name": "env-row1-col1"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphinscheduler-env-content",
|
||||
"subsection-name": "env-row1-col2"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/resource.storage.type",
|
||||
"subsection-name": "dynamic-row1-col1"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/resource.upload.path",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === HDFS || ${dolphin-common/resource.storage.type} === S3",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/hdfs.root.user",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === HDFS",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/data.store2hdfs.basepath",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === HDFS",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.defaultFS",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === HDFS",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.endpoint",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === S3",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.access.key",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === S3",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.secret.key",
|
||||
"subsection-name": "dynamic-row1-col1",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/resource.storage.type"
|
||||
],
|
||||
"if": "${dolphin-common/resource.storage.type} === S3",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/hadoop.security.authentication.startup.state",
|
||||
"subsection-name": "dynamic-row1-col2"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/java.security.krb5.conf.path",
|
||||
"subsection-name": "dynamic-row1-col2",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/hadoop.security.authentication.startup.state"
|
||||
],
|
||||
"if": "${dolphin-common/hadoop.security.authentication.startup.state}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/login.user.keytab.username",
|
||||
"subsection-name": "dynamic-row1-col2",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/hadoop.security.authentication.startup.state"
|
||||
],
|
||||
"if": "${dolphin-common/hadoop.security.authentication.startup.state}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/login.user.keytab.path",
|
||||
"subsection-name": "dynamic-row1-col2",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/hadoop.security.authentication.startup.state"
|
||||
],
|
||||
"if": "${dolphin-common/hadoop.security.authentication.startup.state}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/kerberos.expire.time",
|
||||
"subsection-name": "dynamic-row1-col2",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-common/hadoop.security.authentication.startup.state"
|
||||
],
|
||||
"if": "${dolphin-common/hadoop.security.authentication.startup.state}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.enable",
|
||||
"subsection-name": "dynamic-row1-col3"
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.corp.id",
|
||||
"subsection-name": "dynamic-row1-col3",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-alert/enterprise.wechat.enable"
|
||||
],
|
||||
"if": "${dolphin-alert/enterprise.wechat.enable}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.secret",
|
||||
"subsection-name": "dynamic-row1-col3",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-alert/enterprise.wechat.enable"
|
||||
],
|
||||
"if": "${dolphin-alert/enterprise.wechat.enable}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.agent.id",
|
||||
"subsection-name": "dynamic-row1-col3",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-alert/enterprise.wechat.enable"
|
||||
],
|
||||
"if": "${dolphin-alert/enterprise.wechat.enable}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.users",
|
||||
"subsection-name": "dynamic-row1-col3",
|
||||
"depends-on": [
|
||||
{
|
||||
"configs":[
|
||||
"dolphin-alert/enterprise.wechat.enable"
|
||||
],
|
||||
"if": "${dolphin-alert/enterprise.wechat.enable}",
|
||||
"then": {
|
||||
"property_value_attributes": {
|
||||
"visible": true
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"property_value_attributes": {
|
||||
"visible": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"widgets": [
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.type",
|
||||
"widget": {
|
||||
"type": "combo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.host",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.port",
|
||||
"widget": {
|
||||
"type": "text-field",
|
||||
"units": [
|
||||
{
|
||||
"unit-name": "int"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.username",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.database.password",
|
||||
"widget": {
|
||||
"type": "password"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.user",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphin.group",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-env/dolphinscheduler-env-content",
|
||||
"widget": {
|
||||
"type": "text-area"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/resource.storage.type",
|
||||
"widget": {
|
||||
"type": "combo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/resource.upload.path",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/hdfs.root.user",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/data.store2hdfs.basepath",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.defaultFS",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.endpoint",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.access.key",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/fs.s3a.secret.key",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/hadoop.security.authentication.startup.state",
|
||||
"widget": {
|
||||
"type": "toggle"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/java.security.krb5.conf.path",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/login.user.keytab.username",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/login.user.keytab.path",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-common/kerberos.expire.time",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.enable",
|
||||
"widget": {
|
||||
"type": "toggle"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.corp.id",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.secret",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.agent.id",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
},
|
||||
{
|
||||
"config": "dolphin-alert/enterprise.wechat.users",
|
||||
"widget": {
|
||||
"type": "text-field"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<metainfo>
|
||||
<schemaVersion>2.0</schemaVersion>
|
||||
<services>
|
||||
<service>
|
||||
<name>DOLPHIN</name>
|
||||
<extends>common-services/DOLPHIN/1.3.0</extends>
|
||||
</service>
|
||||
</services>
|
||||
</metainfo>
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
#This configuration file configures the configuration parameters related to the AlertServer.
|
||||
#These parameters are only related to the AlertServer, and it has nothing to do with the specific Alert Plugin.
|
||||
#eg : max retry num.
|
||||
#eg : Alert Server Listener port
|
||||
|
||||
#alert.plugin.dir config the Alert Plugin dir . AlertServer while find and load the Alert Plugin Jar from this dir when deploy and start AlertServer on the server .
|
||||
alert.plugin.dir=${ALERT_PLUGIN_DIR}
|
||||
|
||||
#maven.local.repository=/Users/gaojun/Documents/jianguoyun/localRepository
|
||||
|
||||
#alert.plugin.binding config the Alert Plugin need be load when development and run in IDE
|
||||
#alert.plugin.binding=\
|
||||
# ./dolphinscheduler-alert-plugin/dolphinscheduler-alert-email/pom.xml
|
||||
|
|
@ -38,6 +38,9 @@ server.compression.mime-types=text/html,text/xml,text/plain,text/css,text/javasc
|
|||
# max http post size
|
||||
server.jetty.max-http-form-post-size=5000000
|
||||
|
||||
# max http header size
|
||||
server.max-http-header-size=81920
|
||||
|
||||
# messages encoding
|
||||
spring.messages.encoding=UTF-8
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ spring.datasource.url=jdbc:${DATABASE_TYPE}://${DATABASE_HOST}:${DATABASE_PORT}/
|
|||
spring.datasource.username=${DATABASE_USERNAME}
|
||||
spring.datasource.password=${DATABASE_PASSWORD}
|
||||
|
||||
# hikari configuration
|
||||
spring.datasource.hikari.maximum-pool-size=${HIKARI_MAXIMUM_POOL_SIZE}
|
||||
|
||||
# mysql example
|
||||
#spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
#spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<file>${log.base}/${taskAppId}.log</file>
|
||||
<encoder>
|
||||
<pattern>
|
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %messsage%n
|
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} [%thread] - %messsage%n
|
||||
</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>
|
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n
|
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{96}:[%line] - %msg%n
|
||||
</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<file>${log.base}/${taskAppId}.log</file>
|
||||
<encoder>
|
||||
<pattern>
|
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %messsage%n
|
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} [%thread] - %messsage%n
|
||||
</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>
|
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %messsage%n
|
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{96}:[%line] - %messsage%n
|
||||
</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
|
|
|
|||
|
|
@ -44,3 +44,9 @@ master.max.cpuload.avg=${MASTER_MAX_CPULOAD_AVG}
|
|||
|
||||
# master reserved memory, only lower than system available memory, master server can schedule. default value 0.3, the unit is G
|
||||
master.reserved.memory=${MASTER_RESERVED_MEMORY}
|
||||
# master failover interval minutes
|
||||
master.failover.interval=${MASTER_FAILOVER_INTERVAL}
|
||||
# master kill yarn job when handle failover
|
||||
master.kill.yarn.job.when.handle.failover=${MASTER_KILL_YARN_JOB_WHEN_HANDLE_FAILOVER}
|
||||
# master.persist.event.state.threads
|
||||
master.persist.event.state.threads=${MASTER_PERSIST_EVENT_STATE_THREADS}
|
||||
|
|
@ -32,7 +32,8 @@
|
|||
|
||||
#org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
|
||||
#org.quartz.threadPool.makeThreadsDaemons = true
|
||||
#org.quartz.threadPool.threadCount = 25
|
||||
org.quartz.threadPool.threadCount = ${ORG_QUARTZ_THREADPOOL_THREADCOUNT}
|
||||
org.quartz.scheduler.batchTriggerAcquisitionMaxCount = ${ORG_QUARTZ_SCHEDULER_BATCHTRIGGERACQUISTITIONMAXCOUNT}
|
||||
#org.quartz.threadPool.threadPriority = 5
|
||||
|
||||
#============================================================================
|
||||
|
|
@ -51,4 +52,4 @@
|
|||
#============================================================================
|
||||
# Configure Datasources
|
||||
#============================================================================
|
||||
#org.quartz.dataSource.myDs.connectionProvider.class = org.apache.dolphinscheduler.service.quartz.DruidConnectionProvider
|
||||
#org.quartz.dataSource.myDs.connectionProvider.class = org.apache.dolphinscheduler.service.quartz.HikariConnectionProvider
|
||||
|
|
|
|||
|
|
@ -15,13 +15,6 @@
|
|||
# limitations under the License.
|
||||
#
|
||||
|
||||
#registry.plugin.dir config the Registry Plugin dir.
|
||||
registry.plugin.dir=${REGISTRY_PLUGIN_DIR}
|
||||
|
||||
registry.plugin.name=${REGISTRY_PLUGIN_NAME}
|
||||
registry.servers=${REGISTRY_SERVERS}
|
||||
|
||||
#maven.local.repository=/usr/local/localRepository
|
||||
|
||||
#registry.plugin.binding config the Registry Plugin need be load when development and run in IDE
|
||||
#registry.plugin.binding=./dolphinscheduler-registry-plugin/dolphinscheduler-registry-zookeeper/pom.xml
|
||||
session.timeout.ms=${SESSION_TIMEOUT_MS}
|
||||
|
|
@ -105,3 +105,18 @@ killasgroup=true
|
|||
redirect_stderr=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
|
||||
[program:python-gateway]
|
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start python-gateway
|
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s
|
||||
priority=999
|
||||
autostart=%(ENV_STANDALONE_START_ENABLED)s
|
||||
autorestart=true
|
||||
startsecs=5
|
||||
stopwaitsecs=3
|
||||
exitcodes=0
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
|
|
|
|||
|
|
@ -41,3 +41,6 @@ worker.groups=${WORKER_GROUPS}
|
|||
|
||||
# alert server listen host
|
||||
alert.listen.host=${ALERT_LISTEN_HOST}
|
||||
|
||||
# worker retry report task statues interval seconds
|
||||
worker.retry.report.task.statues.interval=${WORKER_RETRY_REPORT_TASK_STATUS_INTERVAL}
|
||||
|
|
@ -18,41 +18,17 @@
|
|||
|
||||
set -e
|
||||
|
||||
echo "------ dolphinscheduler start - build -------"
|
||||
printenv
|
||||
ROOT_DIR=$(dirname "$0")/../../..
|
||||
MVN="$ROOT_DIR"/mvnw
|
||||
VERSION=$("$MVN" -q -DforceStdout -N org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version)
|
||||
|
||||
if [ -z "${VERSION}" ]
|
||||
then
|
||||
echo "set default environment variable [VERSION]"
|
||||
export VERSION=$(cat $(pwd)/pom.xml | grep '<version>' -m 1 | awk '{print $1}' | sed 's/<version>//' | sed 's/<\/version>//')
|
||||
fi
|
||||
DOCKER_REPO=${DOCKER_REPO:-"apache/dolphinscheduler"}
|
||||
TAG=${TAG:-"$VERSION"}
|
||||
|
||||
if [ "${DOCKER_REPO}x" = "x" ]
|
||||
then
|
||||
echo "set default environment variable [DOCKER_REPO]"
|
||||
export DOCKER_REPO='apache/dolphinscheduler'
|
||||
fi
|
||||
echo "Building Docker image as: $DOCKER_REPO:$TAG"
|
||||
|
||||
echo "Version: $VERSION"
|
||||
echo "Repo: $DOCKER_REPO"
|
||||
"$MVN" -B clean package -Prelease -Dmaven.test.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
||||
|
||||
echo -e "Current Directory is $(pwd)\n"
|
||||
cp "$ROOT_DIR"/dolphinscheduler-dist/target/apache-dolphinscheduler-$VERSION-bin.tar.gz "$ROOT_DIR"/docker/build/
|
||||
|
||||
# maven package(Project Directory)
|
||||
echo -e "./mvnw -B clean package -Prelease -Dmaven.test.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120"
|
||||
./mvnw -B clean package -Prelease -Dmaven.test.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
||||
|
||||
# mv dolphinscheduler-bin.tar.gz file to docker/build directory
|
||||
echo -e "mv $(pwd)/dolphinscheduler-dist/target/apache-dolphinscheduler-${VERSION}-bin.tar.gz $(pwd)/docker/build/\n"
|
||||
mv $(pwd)/dolphinscheduler-dist/target/apache-dolphinscheduler-${VERSION}-bin.tar.gz $(pwd)/docker/build/
|
||||
|
||||
# docker build
|
||||
BUILD_COMMAND="docker build --build-arg VERSION=${VERSION} -t $DOCKER_REPO:${VERSION} $(pwd)/docker/build/"
|
||||
echo -e "$BUILD_COMMAND\n"
|
||||
if (docker info 2> /dev/null | grep -i "ERROR"); then
|
||||
sudo $BUILD_COMMAND
|
||||
else
|
||||
$BUILD_COMMAND
|
||||
fi
|
||||
|
||||
echo "------ dolphinscheduler end - build -------"
|
||||
docker build --build-arg VERSION=$VERSION -t $DOCKER_REPO:$TAG "$ROOT_DIR"/docker/build/
|
||||
|
|
|
|||
|
|
@ -25,22 +25,33 @@ echo "init env variables"
|
|||
#============================================================================
|
||||
# Database
|
||||
#============================================================================
|
||||
export DATABASE_TYPE=${DATABASE_TYPE:-"postgresql"}
|
||||
export DATABASE_DRIVER=${DATABASE_DRIVER:-"org.postgresql.Driver"}
|
||||
export DATABASE_HOST=${DATABASE_HOST:-"127.0.0.1"}
|
||||
export DATABASE_PORT=${DATABASE_PORT:-"5432"}
|
||||
export DATABASE_USERNAME=${DATABASE_USERNAME:-"root"}
|
||||
export DATABASE_PASSWORD=${DATABASE_PASSWORD:-"root"}
|
||||
export DATABASE_DATABASE=${DATABASE_DATABASE:-"dolphinscheduler"}
|
||||
export DATABASE_PARAMS=${DATABASE_PARAMS:-"characterEncoding=utf8"}
|
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_TYPE=${DATABASE_TYPE:-"postgresql"}
|
||||
# export DATABASE_DRIVER=${DATABASE_DRIVER:-"org.postgresql.Driver"}
|
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_HOST=${DATABASE_HOST:-"127.0.0.1"}
|
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_PORT=${DATABASE_PORT:-"5432"}
|
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_USERNAME=${DATABASE_USERNAME:-"root"}
|
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_PASSWORD=${DATABASE_PASSWORD:-"root"}
|
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_DATABASE=${DATABASE_DATABASE:-"dolphinscheduler"}
|
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_PARAMS=${DATABASE_PARAMS:-"characterEncoding=utf8"}
|
||||
# transform params to SPRING_DATASOURCE_XXX
|
||||
[ "h2" == ${DATABASE_TYPE} ] || export SPRING_DATASOURCE_URL="jdbc:${DATABASE_TYPE}://${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DATABASE}?${DATABASE_PARAMS}"
|
||||
[ "h2" == ${DATABASE_TYPE} ] || export SPRING_DATASOURCE_USERNAME=${DATABASE_USERNAME}
|
||||
[ "h2" == ${DATABASE_TYPE} ] || export SPRING_DATASOURCE_PASSWORD=${DATABASE_PASSWORD}
|
||||
# export SPRING_DATASOURCE_DRIVER_CLASS_NAME=${DATABASE_DRIVER}
|
||||
export SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE=${HIKARI_MAXIMUM_POOL_SIZE:-"50"}
|
||||
|
||||
#============================================================================
|
||||
# Quartz
|
||||
#============================================================================
|
||||
export ORG_QUARTZ_THREADPOOL_THREADCOUNT=${ORG_QUARTZ_THREADPOOL_THREADCOUNT:-"25"}
|
||||
export ORG_QUARTZ_SCHEDULER_BATCHTRIGGERACQUISTITIONMAXCOUNT=${ORG_QUARTZ_SCHEDULER_BATCHTRIGGERACQUISTITIONMAXCOUNT:-"1"}
|
||||
|
||||
#============================================================================
|
||||
# Registry
|
||||
#============================================================================
|
||||
export REGISTRY_PLUGIN_DIR=${REGISTRY_PLUGIN_DIR:-"lib/plugin/registry"}
|
||||
export REGISTRY_PLUGIN_NAME=${REGISTRY_PLUGIN_NAME:-"zookeeper"}
|
||||
export REGISTRY_SERVERS=${REGISTRY_SERVERS:-"127.0.0.1:2181"}
|
||||
|
||||
export SESSION_TIMEOUT_MS=${SESSION_TIMEOUT_MS:-"30000"}
|
||||
#============================================================================
|
||||
# Common
|
||||
#============================================================================
|
||||
|
|
@ -108,7 +119,6 @@ export ALERT_LISTEN_HOST=${ALERT_LISTEN_HOST:-"localhost"}
|
|||
# Alert Server
|
||||
#============================================================================
|
||||
export ALERT_SERVER_OPTS=${ALERT_SERVER_OPTS:-"-Xms512m -Xmx512m -Xmn256m"}
|
||||
export ALERT_PLUGIN_DIR=${ALERT_PLUGIN_DIR:-"lib/plugin/alert"}
|
||||
|
||||
#============================================================================
|
||||
# Api Server
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ export API_START_ENABLED=false
|
|||
export ALERT_START_ENABLED=false
|
||||
export LOGGER_START_ENABLED=false
|
||||
export STANDALONE_START_ENABLED=false
|
||||
export PYTHON_GATEWAY_START_ENABLED=false
|
||||
|
||||
# wait database
|
||||
waitDatabase() {
|
||||
|
|
@ -68,13 +69,14 @@ waitZK() {
|
|||
printUsage() {
|
||||
echo -e "Dolphin Scheduler is a distributed and easy-to-expand visual DAG workflow scheduling system,"
|
||||
echo -e "dedicated to solving the complex dependencies in data processing, making the scheduling system out of the box for data processing.\n"
|
||||
echo -e "Usage: [ all | master-server | worker-server | api-server | alert-server | standalone-server ]\n"
|
||||
printf "%-13s: %s\n" "all" "Run master-server, worker-server, api-server and alert-server"
|
||||
printf "%-13s: %s\n" "master-server" "MasterServer is mainly responsible for DAG task split, task submission monitoring."
|
||||
printf "%-13s: %s\n" "worker-server" "WorkerServer is mainly responsible for task execution and providing log services."
|
||||
printf "%-13s: %s\n" "api-server" "ApiServer is mainly responsible for processing requests and providing the front-end UI layer."
|
||||
printf "%-13s: %s\n" "alert-server" "AlertServer mainly include Alarms."
|
||||
printf "%-13s: %s\n" "standalone-server" "Standalone server that uses embedded zookeeper and database, only for testing and demostration."
|
||||
echo -e "Usage: [ all | master-server | worker-server | api-server | alert-server | standalone-server | python-gateway-server]\n"
|
||||
printf "%-13s: %s\n" "all" "Run master-server, worker-server, api-server, alert-server, python-gateway-server"
|
||||
printf "%-13s: %s\n" "master-server" "MasterServer is mainly responsible for DAG task split, task submission monitoring."
|
||||
printf "%-13s: %s\n" "worker-server" "WorkerServer is mainly responsible for task execution and providing log services."
|
||||
printf "%-13s: %s\n" "api-server" "ApiServer is mainly responsible for processing requests and providing the front-end UI layer."
|
||||
printf "%-13s: %s\n" "alert-server" "AlertServer mainly include Alarms."
|
||||
printf "%-13s: %s\n" "standalone-server" "Standalone server that uses embedded zookeeper and database, only for testing and demostration."
|
||||
printf "%-13s: %s\n" "python-gateway-server" "Python gateway is a backend server for python API."
|
||||
}
|
||||
|
||||
# init config file
|
||||
|
|
@ -95,6 +97,7 @@ case "$1" in
|
|||
waitZK
|
||||
waitDatabase
|
||||
export MASTER_START_ENABLED=true
|
||||
export LOGGER_START_ENABLED=true
|
||||
;;
|
||||
(worker-server)
|
||||
waitZK
|
||||
|
|
@ -115,6 +118,9 @@ case "$1" in
|
|||
(standalone-server)
|
||||
export STANDALONE_START_ENABLED=true
|
||||
;;
|
||||
(python-gateway-server)
|
||||
export PYTHON_GATEWAY_START_ENABLED=true
|
||||
;;
|
||||
(help)
|
||||
printUsage
|
||||
exit 1
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ DATABASE_PARAMS=characterEncoding=utf8
|
|||
#============================================================================
|
||||
# Registry
|
||||
#============================================================================
|
||||
REGISTRY_PLUGIN_DIR=lib/plugin/registry
|
||||
REGISTRY_PLUGIN_NAME=zookeeper
|
||||
REGISTRY_SERVERS=dolphinscheduler-zookeeper:2181
|
||||
|
||||
|
|
@ -93,6 +92,9 @@ MASTER_TASK_COMMIT_RETRYTIMES=5
|
|||
MASTER_TASK_COMMIT_INTERVAL=1000
|
||||
MASTER_MAX_CPULOAD_AVG=-1
|
||||
MASTER_RESERVED_MEMORY=0.3
|
||||
MASTER_FAILOVER_INTERVAL=10
|
||||
MASTER_KILL_YARN_JOB_WHEN_HANDLE_FAILOVER=true
|
||||
MASTER_PERSIST_EVENT_STATE_THREADS=10
|
||||
|
||||
#============================================================================
|
||||
# Worker Server
|
||||
|
|
@ -104,13 +106,13 @@ WORKER_HOST_WEIGHT=100
|
|||
WORKER_MAX_CPULOAD_AVG=-1
|
||||
WORKER_RESERVED_MEMORY=0.3
|
||||
WORKER_GROUPS=default
|
||||
WORKER_RETRY_REPORT_TASK_STATUES_INTERVAL=10
|
||||
ALERT_LISTEN_HOST=dolphinscheduler-alert
|
||||
|
||||
#============================================================================
|
||||
# Alert Server
|
||||
#============================================================================
|
||||
ALERT_SERVER_OPTS=-Xms512m -Xmx512m -Xmn256m
|
||||
ALERT_PLUGIN_DIR=lib/plugin/alert
|
||||
|
||||
#============================================================================
|
||||
# Api Server
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ services:
|
|||
- dolphinscheduler
|
||||
|
||||
dolphinscheduler-api:
|
||||
image: apache/dolphinscheduler:2.0.0-SNAPSHOT
|
||||
image: apache/dolphinscheduler:2.0.4
|
||||
command: api-server
|
||||
ports:
|
||||
- 12345:12345
|
||||
|
|
@ -68,7 +68,7 @@ services:
|
|||
- dolphinscheduler
|
||||
|
||||
dolphinscheduler-alert:
|
||||
image: apache/dolphinscheduler:2.0.0-SNAPSHOT
|
||||
image: apache/dolphinscheduler:2.0.4
|
||||
command: alert-server
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
|
|
@ -87,7 +87,7 @@ services:
|
|||
- dolphinscheduler
|
||||
|
||||
dolphinscheduler-master:
|
||||
image: apache/dolphinscheduler:2.0.0-SNAPSHOT
|
||||
image: apache/dolphinscheduler:2.0.4
|
||||
command: master-server
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
|
|
@ -108,7 +108,7 @@ services:
|
|||
- dolphinscheduler
|
||||
|
||||
dolphinscheduler-worker:
|
||||
image: apache/dolphinscheduler:2.0.0-SNAPSHOT
|
||||
image: apache/dolphinscheduler:2.0.5
|
||||
command: worker-server
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
|
|
@ -140,4 +140,4 @@ volumes:
|
|||
dolphinscheduler-worker-data:
|
||||
dolphinscheduler-logs:
|
||||
dolphinscheduler-shared-local:
|
||||
dolphinscheduler-resource-local:
|
||||
dolphinscheduler-resource-local:
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ services:
|
|||
replicas: 1
|
||||
|
||||
dolphinscheduler-api:
|
||||
image: apache/dolphinscheduler:2.0.0-SNAPSHOT
|
||||
image: apache/dolphinscheduler:2.0.4
|
||||
command: api-server
|
||||
ports:
|
||||
- 12345:12345
|
||||
|
|
@ -71,7 +71,7 @@ services:
|
|||
replicas: 1
|
||||
|
||||
dolphinscheduler-alert:
|
||||
image: apache/dolphinscheduler:2.0.0-SNAPSHOT
|
||||
image: apache/dolphinscheduler:2.0.4
|
||||
command: alert-server
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
|
|
@ -90,7 +90,7 @@ services:
|
|||
replicas: 1
|
||||
|
||||
dolphinscheduler-master:
|
||||
image: apache/dolphinscheduler:2.0.0-SNAPSHOT
|
||||
image: apache/dolphinscheduler:2.0.4
|
||||
command: master-server
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
|
|
@ -110,7 +110,7 @@ services:
|
|||
replicas: 1
|
||||
|
||||
dolphinscheduler-worker:
|
||||
image: apache/dolphinscheduler:2.0.0-SNAPSHOT
|
||||
image: apache/dolphinscheduler:2.0.5
|
||||
command: worker-server
|
||||
environment:
|
||||
TZ: Asia/Shanghai
|
||||
|
|
@ -141,4 +141,4 @@ volumes:
|
|||
dolphinscheduler-worker-data:
|
||||
dolphinscheduler-logs:
|
||||
dolphinscheduler-shared-local:
|
||||
dolphinscheduler-resource-local:
|
||||
dolphinscheduler-resource-local:
|
||||
|
|
|
|||
|
|
@ -35,11 +35,11 @@ type: application
|
|||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
version: 2.0.0
|
||||
version: 2.0.3
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application.
|
||||
appVersion: 2.0.0-SNAPSHOT
|
||||
appVersion: 2.0.5
|
||||
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
|
|
|
|||
|
|
@ -166,12 +166,6 @@ Create a database environment variables.
|
|||
Create a registry environment variables.
|
||||
*/}}
|
||||
{{- define "dolphinscheduler.registry.env_vars" -}}
|
||||
- name: REGISTRY_PLUGIN_DIR
|
||||
{{- if .Values.zookeeper.enabled }}
|
||||
value: "lib/plugin/registry"
|
||||
{{- else }}
|
||||
value: {{ .Values.externalRegistry.registryPluginDir }}
|
||||
{{- end }}
|
||||
- name: REGISTRY_PLUGIN_NAME
|
||||
{{- if .Values.zookeeper.enabled }}
|
||||
value: "zookeeper"
|
||||
|
|
@ -239,4 +233,4 @@ Create a fsFileResourcePersistence volumeMount.
|
|||
- mountPath: {{ default "/dolphinscheduler" .Values.common.configmap.RESOURCE_UPLOAD_PATH | quote }}
|
||||
name: {{ include "dolphinscheduler.fullname" . }}-fs-file
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ spec:
|
|||
- name: TZ
|
||||
value: {{ .Values.timezone }}
|
||||
{{- include "dolphinscheduler.database.env_vars" . | nindent 12 }}
|
||||
{{- include "dolphinscheduler.zookeeper.env_vars" . | nindent 12 }}
|
||||
{{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }}
|
||||
{{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ spec:
|
|||
- name: TZ
|
||||
value: {{ .Values.timezone }}
|
||||
{{- include "dolphinscheduler.database.env_vars" . | nindent 12 }}
|
||||
{{- include "dolphinscheduler.zookeeper.env_vars" . | nindent 12 }}
|
||||
{{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }}
|
||||
{{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ spec:
|
|||
- name: ALERT_LISTEN_HOST
|
||||
value: {{ include "dolphinscheduler.fullname" . }}-alert
|
||||
{{- include "dolphinscheduler.database.env_vars" . | nindent 12 }}
|
||||
{{- include "dolphinscheduler.zookeeper.env_vars" . | nindent 12 }}
|
||||
{{- include "dolphinscheduler.registry.env_vars" . | nindent 12 }}
|
||||
{{- include "dolphinscheduler.fs_s3a.env_vars" . | nindent 12 }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ timezone: "Asia/Shanghai"
|
|||
|
||||
image:
|
||||
repository: "apache/dolphinscheduler"
|
||||
tag: "2.0.0-SNAPSHOT"
|
||||
tag: "2.0.5"
|
||||
pullPolicy: "IfNotPresent"
|
||||
pullSecret: ""
|
||||
|
||||
|
|
@ -53,6 +53,10 @@ externalDatabase:
|
|||
## If not exists external zookeeper, by default, Dolphinscheduler's zookeeper will use it.
|
||||
zookeeper:
|
||||
enabled: true
|
||||
tickTime: 3000
|
||||
maxSessionTimeout: 60000
|
||||
initLimit: 300
|
||||
maxClientCnxns: 2000
|
||||
fourlwCommandsWhitelist: "srvr,ruok,wchs,cons"
|
||||
persistence:
|
||||
enabled: false
|
||||
|
|
@ -100,6 +104,9 @@ common:
|
|||
HIVE_HOME: "/opt/soft/hive"
|
||||
FLINK_HOME: "/opt/soft/flink"
|
||||
DATAX_HOME: "/opt/soft/datax"
|
||||
SESSION_TIMEOUT_MS: 60000
|
||||
ORG_QUARTZ_THREADPOOL_THREADCOUNT: "25"
|
||||
ORG_QUARTZ_SCHEDULER_BATCHTRIGGERACQUISTITIONMAXCOUNT: "1"
|
||||
## Shared storage persistence mounted into api, master and worker, such as Hadoop, Spark, Flink and DataX binary package
|
||||
sharedStoragePersistence:
|
||||
enabled: false
|
||||
|
|
@ -148,6 +155,7 @@ master:
|
|||
# cpu: "500m"
|
||||
## Configmap
|
||||
configmap:
|
||||
LOGGER_SERVER_OPTS: "-Xms512m -Xmx512m -Xmn256m"
|
||||
MASTER_SERVER_OPTS: "-Xms1g -Xmx1g -Xmn512m"
|
||||
MASTER_EXEC_THREADS: "100"
|
||||
MASTER_EXEC_TASK_NUM: "20"
|
||||
|
|
@ -158,6 +166,11 @@ master:
|
|||
MASTER_TASK_COMMIT_INTERVAL: "1000"
|
||||
MASTER_MAX_CPULOAD_AVG: "-1"
|
||||
MASTER_RESERVED_MEMORY: "0.3"
|
||||
MASTER_FAILOVER_INTERVAL: 10
|
||||
MASTER_KILL_YARN_JOB_WHEN_HANDLE_FAILOVER: "true"
|
||||
ORG_QUARTZ_THREADPOOL_THREADCOUNT: "25"
|
||||
ORG_QUARTZ_SCHEDULER_BATCHTRIGGERACQUISTITIONMAXCOUNT: "1"
|
||||
MASTER_PERSIST_EVENT_STATE_THREADS: 10
|
||||
## Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated.
|
||||
## More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
||||
livenessProbe:
|
||||
|
|
@ -225,6 +238,7 @@ worker:
|
|||
WORKER_MAX_CPULOAD_AVG: "-1"
|
||||
WORKER_RESERVED_MEMORY: "0.3"
|
||||
WORKER_GROUPS: "default"
|
||||
WORKER_RETRY_REPORT_TASK_STATUS_INTERVAL: 600
|
||||
## Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated.
|
||||
## More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
||||
livenessProbe:
|
||||
|
|
@ -299,7 +313,6 @@ alert:
|
|||
## Configmap
|
||||
configmap:
|
||||
ALERT_SERVER_OPTS: "-Xms512m -Xmx512m -Xmn256m"
|
||||
ALERT_PLUGIN_DIR: "lib/plugin/alert"
|
||||
## Periodic probe of container liveness. Container will be restarted if the probe fails. Cannot be updated.
|
||||
## More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
|
||||
livenessProbe:
|
||||
|
|
@ -411,4 +424,4 @@ ingress:
|
|||
path: "/dolphinscheduler"
|
||||
tls:
|
||||
enabled: false
|
||||
secretName: "dolphinscheduler-tls"
|
||||
secretName: "dolphinscheduler-tls"
|
||||
|
|
|
|||
|
|
@ -1,84 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>dolphinscheduler-alert-plugin</artifactId>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-alert-dingtalk</artifactId>
|
||||
<packaging>dolphinscheduler-plugin</packaging>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<type>jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>org.jacoco.agent</artifactId>
|
||||
<classifier>runtime</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>dolphinscheduler-alert-dingtalk-${project.version}</finalName>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.plugin.alert.dingtalk;
|
||||
|
||||
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_FALSE;
|
||||
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_NO;
|
||||
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_TRUE;
|
||||
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_YES;
|
||||
|
||||
import org.apache.dolphinscheduler.spi.alert.AlertChannel;
|
||||
import org.apache.dolphinscheduler.spi.alert.AlertChannelFactory;
|
||||
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
||||
import org.apache.dolphinscheduler.spi.params.PasswordParam;
|
||||
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
||||
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
||||
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
||||
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* DingTalkAlertChannelFactory
|
||||
*/
|
||||
public class DingTalkAlertChannelFactory implements AlertChannelFactory {
|
||||
@Override
|
||||
public String getName() {
|
||||
return "DingTalk";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PluginParams> getParams() {
|
||||
InputParam webHookParam = InputParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_WEB_HOOK, DingTalkParamsConstants.DING_TALK_WEB_HOOK)
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(true)
|
||||
.build())
|
||||
.build();
|
||||
InputParam keywordParam = InputParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_KEYWORD, DingTalkParamsConstants.DING_TALK_KEYWORD)
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(true)
|
||||
.build())
|
||||
.build();
|
||||
RadioParam isEnableProxy =
|
||||
RadioParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PROXY_ENABLE, DingTalkParamsConstants.NAME_DING_TALK_PROXY_ENABLE)
|
||||
.addParamsOptions(new ParamsOptions(STRING_YES, STRING_TRUE, false))
|
||||
.addParamsOptions(new ParamsOptions(STRING_NO, STRING_FALSE, false))
|
||||
.setValue(STRING_TRUE)
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(false)
|
||||
.build())
|
||||
.build();
|
||||
InputParam proxyParam =
|
||||
InputParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PROXY, DingTalkParamsConstants.DING_TALK_PROXY)
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(false).build())
|
||||
.build();
|
||||
|
||||
InputParam portParam = InputParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PORT, DingTalkParamsConstants.DING_TALK_PORT)
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(false).build())
|
||||
.build();
|
||||
|
||||
InputParam userParam =
|
||||
InputParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_USER, DingTalkParamsConstants.DING_TALK_USER)
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(false).build())
|
||||
.build();
|
||||
PasswordParam passwordParam = PasswordParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PASSWORD, DingTalkParamsConstants.DING_TALK_PASSWORD)
|
||||
.setPlaceholder("if enable use authentication, you need input password")
|
||||
.build();
|
||||
|
||||
return Arrays.asList(webHookParam, keywordParam, isEnableProxy, proxyParam, portParam, userParam, passwordParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AlertChannel create() {
|
||||
return new DingTalkAlertChannel();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,204 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.plugin.alert.dingtalk;
|
||||
|
||||
import org.apache.dolphinscheduler.spi.alert.AlertResult;
|
||||
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
|
||||
|
||||
import org.apache.commons.codec.binary.StringUtils;
|
||||
import org.apache.http.HttpEntity;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.auth.AuthScope;
|
||||
import org.apache.http.auth.UsernamePasswordCredentials;
|
||||
import org.apache.http.client.CredentialsProvider;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.entity.StringEntity;
|
||||
import org.apache.http.impl.client.BasicCredentialsProvider;
|
||||
import org.apache.http.impl.client.CloseableHttpClient;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.util.EntityUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Ding Talk Sender
|
||||
*/
|
||||
public class DingTalkSender {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DingTalkSender.class);
|
||||
|
||||
private String url;
|
||||
|
||||
private String keyword;
|
||||
|
||||
private Boolean enableProxy;
|
||||
|
||||
private String proxy;
|
||||
|
||||
private Integer port;
|
||||
|
||||
private String user;
|
||||
|
||||
private String password;
|
||||
|
||||
DingTalkSender(Map<String, String> config) {
|
||||
url = config.get(DingTalkParamsConstants.NAME_DING_TALK_WEB_HOOK);
|
||||
keyword = config.get(DingTalkParamsConstants.NAME_DING_TALK_KEYWORD);
|
||||
enableProxy = Boolean.valueOf(config.get(DingTalkParamsConstants.NAME_DING_TALK_PROXY_ENABLE));
|
||||
if (Boolean.TRUE.equals(enableProxy)) {
|
||||
port = Integer.parseInt(config.get(DingTalkParamsConstants.NAME_DING_TALK_PORT));
|
||||
proxy = config.get(DingTalkParamsConstants.NAME_DING_TALK_PROXY);
|
||||
user = config.get(DingTalkParamsConstants.DING_TALK_USER);
|
||||
password = config.get(DingTalkParamsConstants.NAME_DING_TALK_PASSWORD);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static HttpPost constructHttpPost(String url, String msg, String charset) {
|
||||
HttpPost post = new HttpPost(url);
|
||||
StringEntity entity = new StringEntity(msg, charset);
|
||||
post.setEntity(entity);
|
||||
post.addHeader("Content-Type", "application/json; charset=utf-8");
|
||||
return post;
|
||||
}
|
||||
|
||||
private static CloseableHttpClient getProxyClient(String proxy, int port, String user, String password) {
|
||||
HttpHost httpProxy = new HttpHost(proxy, port);
|
||||
CredentialsProvider provider = new BasicCredentialsProvider();
|
||||
provider.setCredentials(new AuthScope(httpProxy), new UsernamePasswordCredentials(user, password));
|
||||
return HttpClients.custom().setDefaultCredentialsProvider(provider).build();
|
||||
}
|
||||
|
||||
private static CloseableHttpClient getDefaultClient() {
|
||||
return HttpClients.createDefault();
|
||||
}
|
||||
|
||||
private static RequestConfig getProxyConfig(String proxy, int port) {
|
||||
HttpHost httpProxy = new HttpHost(proxy, port);
|
||||
return RequestConfig.custom().setProxy(httpProxy).build();
|
||||
}
|
||||
|
||||
private static String textToJsonString(String text) {
|
||||
Map<String, Object> items = new HashMap<>();
|
||||
items.put("msgtype", "text");
|
||||
Map<String, String> textContent = new HashMap<>();
|
||||
byte[] byt = StringUtils.getBytesUtf8(text);
|
||||
String txt = StringUtils.newStringUtf8(byt);
|
||||
textContent.put("content", txt);
|
||||
items.put("text", textContent);
|
||||
return JSONUtils.toJsonString(items);
|
||||
}
|
||||
|
||||
private static AlertResult checkSendDingTalkSendMsgResult(String result) {
|
||||
AlertResult alertResult = new AlertResult();
|
||||
alertResult.setStatus("false");
|
||||
|
||||
if (null == result) {
|
||||
alertResult.setMessage("send ding talk msg error");
|
||||
logger.info("send ding talk msg error,ding talk server resp is null");
|
||||
return alertResult;
|
||||
}
|
||||
DingTalkSendMsgResponse sendMsgResponse = JSONUtils.parseObject(result, DingTalkSendMsgResponse.class);
|
||||
if (null == sendMsgResponse) {
|
||||
alertResult.setMessage("send ding talk msg fail");
|
||||
logger.info("send ding talk msg error,resp error");
|
||||
return alertResult;
|
||||
}
|
||||
if (sendMsgResponse.errcode == 0) {
|
||||
alertResult.setStatus("true");
|
||||
alertResult.setMessage("send ding talk msg success");
|
||||
return alertResult;
|
||||
}
|
||||
alertResult.setMessage(String.format("alert send ding talk msg error : %s", sendMsgResponse.getErrmsg()));
|
||||
logger.info("alert send ding talk msg error : {}", sendMsgResponse.getErrmsg());
|
||||
return alertResult;
|
||||
}
|
||||
|
||||
public AlertResult sendDingTalkMsg(String title, String content) {
|
||||
AlertResult alertResult;
|
||||
try {
|
||||
String resp = sendMsg(title, content);
|
||||
return checkSendDingTalkSendMsgResult(resp);
|
||||
} catch (Exception e) {
|
||||
logger.info("send ding talk alert msg exception : {}", e.getMessage());
|
||||
alertResult = new AlertResult();
|
||||
alertResult.setStatus("false");
|
||||
alertResult.setMessage("send ding talk alert fail.");
|
||||
}
|
||||
return alertResult;
|
||||
}
|
||||
|
||||
private String sendMsg(String title, String content) throws IOException {
|
||||
|
||||
String msgToJson = textToJsonString(title + content + "#" + keyword);
|
||||
HttpPost httpPost = constructHttpPost(url, msgToJson, "UTF-8");
|
||||
|
||||
CloseableHttpClient httpClient;
|
||||
if (Boolean.TRUE.equals(enableProxy)) {
|
||||
httpClient = getProxyClient(proxy, port, user, password);
|
||||
RequestConfig rcf = getProxyConfig(proxy, port);
|
||||
httpPost.setConfig(rcf);
|
||||
} else {
|
||||
httpClient = getDefaultClient();
|
||||
}
|
||||
|
||||
try {
|
||||
CloseableHttpResponse response = httpClient.execute(httpPost);
|
||||
String resp;
|
||||
try {
|
||||
HttpEntity entity = response.getEntity();
|
||||
resp = EntityUtils.toString(entity, "UTF-8");
|
||||
EntityUtils.consume(entity);
|
||||
} finally {
|
||||
response.close();
|
||||
}
|
||||
logger.info("Ding Talk send title :{},content : {}, resp: {}", title, content, resp);
|
||||
return resp;
|
||||
} finally {
|
||||
httpClient.close();
|
||||
}
|
||||
}
|
||||
|
||||
public static class DingTalkSendMsgResponse {
|
||||
private Integer errcode;
|
||||
private String errmsg;
|
||||
|
||||
public Integer getErrcode() {
|
||||
return errcode;
|
||||
}
|
||||
|
||||
public void setErrcode(Integer errcode) {
|
||||
this.errcode = errcode;
|
||||
}
|
||||
|
||||
public String getErrmsg() {
|
||||
return errmsg;
|
||||
}
|
||||
|
||||
public void setErrmsg(String errmsg) {
|
||||
this.errmsg = errmsg;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>dolphinscheduler-alert-plugin</artifactId>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-alert-email</artifactId>
|
||||
<!-- can be load as a Alert Plugin when development and run server in IDE -->
|
||||
<packaging>dolphinscheduler-plugin</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-email</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<type>jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-module-junit4</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.powermock</groupId>
|
||||
<artifactId>powermock-api-mockito2</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>org.jacoco.agent</artifactId>
|
||||
<classifier>runtime</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>dolphinscheduler-alert-email-${project.version}</finalName>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -1,140 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.plugin.alert.email;
|
||||
|
||||
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_FALSE;
|
||||
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_NO;
|
||||
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_TRUE;
|
||||
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_YES;
|
||||
|
||||
import org.apache.dolphinscheduler.spi.alert.AlertChannel;
|
||||
import org.apache.dolphinscheduler.spi.alert.AlertChannelFactory;
|
||||
import org.apache.dolphinscheduler.spi.alert.AlertConstants;
|
||||
import org.apache.dolphinscheduler.spi.alert.ShowType;
|
||||
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
||||
import org.apache.dolphinscheduler.spi.params.PasswordParam;
|
||||
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
||||
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
||||
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
||||
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* email alert factory
|
||||
*/
|
||||
public class EmailAlertChannelFactory implements AlertChannelFactory {
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Email";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PluginParams> getParams() {
|
||||
|
||||
List<PluginParams> paramsList = new ArrayList<>();
|
||||
InputParam receivesParam = InputParam.newBuilder(MailParamsConstants.NAME_PLUGIN_DEFAULT_EMAIL_RECEIVERS, MailParamsConstants.PLUGIN_DEFAULT_EMAIL_RECEIVERS)
|
||||
.setPlaceholder("please input receives")
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(true)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
InputParam receiveCcsParam = InputParam.newBuilder(MailParamsConstants.NAME_PLUGIN_DEFAULT_EMAIL_RECEIVERCCS, MailParamsConstants.PLUGIN_DEFAULT_EMAIL_RECEIVERCCS)
|
||||
.build();
|
||||
|
||||
InputParam mailSmtpHost = InputParam.newBuilder(MailParamsConstants.NAME_MAIL_SMTP_HOST, MailParamsConstants.MAIL_SMTP_HOST)
|
||||
.addValidate(Validate.newBuilder().setRequired(true).build())
|
||||
.build();
|
||||
|
||||
InputParam mailSmtpPort = InputParam.newBuilder(MailParamsConstants.NAME_MAIL_SMTP_PORT, MailParamsConstants.MAIL_SMTP_PORT)
|
||||
.setValue("25")
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(true)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
InputParam mailSender = InputParam.newBuilder(MailParamsConstants.NAME_MAIL_SENDER, MailParamsConstants.MAIL_SENDER)
|
||||
.addValidate(Validate.newBuilder().setRequired(true).build())
|
||||
.build();
|
||||
|
||||
RadioParam enableSmtpAuth = RadioParam.newBuilder(MailParamsConstants.NAME_MAIL_SMTP_AUTH, MailParamsConstants.MAIL_SMTP_AUTH)
|
||||
.addParamsOptions(new ParamsOptions(STRING_YES, STRING_TRUE, false))
|
||||
.addParamsOptions(new ParamsOptions(STRING_NO, STRING_FALSE, false))
|
||||
.setValue(STRING_TRUE)
|
||||
.addValidate(Validate.newBuilder().setRequired(true).build())
|
||||
.build();
|
||||
|
||||
InputParam mailUser = InputParam.newBuilder(MailParamsConstants.NAME_MAIL_USER, MailParamsConstants.MAIL_USER)
|
||||
.setPlaceholder("if enable use authentication, you need input user")
|
||||
.build();
|
||||
|
||||
PasswordParam mailPassword = PasswordParam.newBuilder(MailParamsConstants.NAME_MAIL_PASSWD, MailParamsConstants.MAIL_PASSWD)
|
||||
.setPlaceholder("if enable use authentication, you need input password")
|
||||
.build();
|
||||
|
||||
RadioParam enableTls = RadioParam.newBuilder(MailParamsConstants.NAME_MAIL_SMTP_STARTTLS_ENABLE, MailParamsConstants.MAIL_SMTP_STARTTLS_ENABLE)
|
||||
.addParamsOptions(new ParamsOptions(STRING_YES, STRING_TRUE, false))
|
||||
.addParamsOptions(new ParamsOptions(STRING_NO, STRING_FALSE, false))
|
||||
.setValue(STRING_FALSE)
|
||||
.addValidate(Validate.newBuilder().setRequired(true).build())
|
||||
.build();
|
||||
|
||||
RadioParam enableSsl = RadioParam.newBuilder(MailParamsConstants.NAME_MAIL_SMTP_SSL_ENABLE, MailParamsConstants.MAIL_SMTP_SSL_ENABLE)
|
||||
.addParamsOptions(new ParamsOptions(STRING_YES, STRING_TRUE, false))
|
||||
.addParamsOptions(new ParamsOptions(STRING_NO, STRING_FALSE, false))
|
||||
.setValue(STRING_FALSE)
|
||||
.addValidate(Validate.newBuilder().setRequired(true).build())
|
||||
.build();
|
||||
|
||||
InputParam sslTrust = InputParam.newBuilder(MailParamsConstants.NAME_MAIL_SMTP_SSL_TRUST, MailParamsConstants.MAIL_SMTP_SSL_TRUST)
|
||||
.setValue("*")
|
||||
.addValidate(Validate.newBuilder().setRequired(true).build())
|
||||
.build();
|
||||
|
||||
RadioParam showType = RadioParam.newBuilder(AlertConstants.SHOW_TYPE, AlertConstants.SHOW_TYPE)
|
||||
.addParamsOptions(new ParamsOptions(ShowType.TABLE.getDescp(), ShowType.TABLE.getDescp(), false))
|
||||
.addParamsOptions(new ParamsOptions(ShowType.TEXT.getDescp(), ShowType.TEXT.getDescp(), false))
|
||||
.addParamsOptions(new ParamsOptions(ShowType.ATTACHMENT.getDescp(), ShowType.ATTACHMENT.getDescp(), false))
|
||||
.addParamsOptions(new ParamsOptions(ShowType.TABLEATTACHMENT.getDescp(), ShowType.TABLEATTACHMENT.getDescp(), false))
|
||||
.setValue(ShowType.TABLE.getDescp())
|
||||
.addValidate(Validate.newBuilder().setRequired(true).build())
|
||||
.build();
|
||||
|
||||
paramsList.add(receivesParam);
|
||||
paramsList.add(receiveCcsParam);
|
||||
paramsList.add(mailSmtpHost);
|
||||
paramsList.add(mailSmtpPort);
|
||||
paramsList.add(mailSender);
|
||||
paramsList.add(enableSmtpAuth);
|
||||
paramsList.add(mailUser);
|
||||
paramsList.add(mailPassword);
|
||||
paramsList.add(enableTls);
|
||||
paramsList.add(enableSsl);
|
||||
paramsList.add(sslTrust);
|
||||
paramsList.add(showType);
|
||||
|
||||
return paramsList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AlertChannel create() {
|
||||
return new EmailAlertChannel();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ 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.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>dolphinscheduler-alert-plugin</artifactId>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-alert-wechat</artifactId>
|
||||
<packaging>dolphinscheduler-plugin</packaging>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<type>jar</type>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>org.jacoco.agent</artifactId>
|
||||
<classifier>runtime</classifier>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>dolphinscheduler-alert-wechat-${project.version}</finalName>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.plugin.alert.wechat;
|
||||
|
||||
import org.apache.dolphinscheduler.spi.alert.AlertChannel;
|
||||
import org.apache.dolphinscheduler.spi.alert.AlertChannelFactory;
|
||||
import org.apache.dolphinscheduler.spi.alert.AlertConstants;
|
||||
import org.apache.dolphinscheduler.spi.alert.ShowType;
|
||||
import org.apache.dolphinscheduler.spi.params.input.InputParam;
|
||||
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
|
||||
import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
|
||||
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
|
||||
import org.apache.dolphinscheduler.spi.params.base.Validate;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* WeChatAlertChannelFactory
|
||||
*/
|
||||
public class WeChatAlertChannelFactory implements AlertChannelFactory {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "WeChat";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PluginParams> getParams() {
|
||||
InputParam corpIdParam = InputParam.newBuilder(WeChatAlertParamsConstants.NAME_ENTERPRISE_WE_CHAT_CORP_ID, WeChatAlertParamsConstants.ENTERPRISE_WE_CHAT_CORP_ID)
|
||||
.setPlaceholder("please input corp id ")
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(true)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
InputParam secretParam = InputParam.newBuilder(WeChatAlertParamsConstants.NAME_ENTERPRISE_WE_CHAT_SECRET, WeChatAlertParamsConstants.ENTERPRISE_WE_CHAT_SECRET)
|
||||
.setPlaceholder("please input secret ")
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(true)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
InputParam usersParam = InputParam.newBuilder(WeChatAlertParamsConstants.NAME_ENTERPRISE_WE_CHAT_USERS, WeChatAlertParamsConstants.ENTERPRISE_WE_CHAT_USERS)
|
||||
.setPlaceholder("please input users ")
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(true)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
InputParam userSendMsgParam = InputParam.newBuilder(WeChatAlertParamsConstants.NAME_ENTERPRISE_WE_CHAT_USER_SEND_MSG, WeChatAlertParamsConstants.ENTERPRISE_WE_CHAT_USER_SEND_MSG)
|
||||
.setPlaceholder("please input corp id ")
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(true)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
InputParam agentIdParam = InputParam.newBuilder(WeChatAlertParamsConstants.NAME_ENTERPRISE_WE_CHAT_AGENT_ID, WeChatAlertParamsConstants.ENTERPRISE_WE_CHAT_AGENT_ID)
|
||||
.setPlaceholder("please input agent id ")
|
||||
.addValidate(Validate.newBuilder()
|
||||
.setRequired(true)
|
||||
.build())
|
||||
.build();
|
||||
|
||||
RadioParam showType = RadioParam.newBuilder(AlertConstants.SHOW_TYPE, AlertConstants.SHOW_TYPE)
|
||||
.addParamsOptions(new ParamsOptions(ShowType.TABLE.getDescp(), ShowType.TABLE.getDescp(), false))
|
||||
.addParamsOptions(new ParamsOptions(ShowType.TEXT.getDescp(), ShowType.TEXT.getDescp(), false))
|
||||
.setValue(ShowType.TABLE.getDescp())
|
||||
.addValidate(Validate.newBuilder().setRequired(true).build())
|
||||
.build();
|
||||
|
||||
return Arrays.asList(corpIdParam, secretParam, usersParam, userSendMsgParam, agentIdParam, showType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AlertChannel create() {
|
||||
return new WeChatAlertChannel();
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue