Compare commits
60 Commits
dev
...
lgcareer-p
| Author | SHA1 | Date |
|---|---|---|
|
|
0300f0c849 | |
|
|
d621b48f84 | |
|
|
3dc474f29b | |
|
|
92b6c96d82 | |
|
|
0cf173f37b | |
|
|
d8f50479ca | |
|
|
1d779aad0b | |
|
|
3c59321629 | |
|
|
98c117e008 | |
|
|
f53272dd11 | |
|
|
d8b9725ec3 | |
|
|
839457962f | |
|
|
2896fc0640 | |
|
|
84a9f7e776 | |
|
|
6688c85a7e | |
|
|
825fe4ae44 | |
|
|
7b2cbee918 | |
|
|
b5cda4dd50 | |
|
|
4611d3541c | |
|
|
2ef65c53ee | |
|
|
620624417f | |
|
|
584ec70fb7 | |
|
|
f214a7cdcd | |
|
|
715b696d7e | |
|
|
91e1ba5b8d | |
|
|
c9bd2d7ec6 | |
|
|
c3be6749c1 | |
|
|
17e4925016 | |
|
|
f1b498ce25 | |
|
|
d1d44862ed | |
|
|
8142e364bb | |
|
|
244bdd9646 | |
|
|
7997f10b09 | |
|
|
e01b96d177 | |
|
|
c88e046412 | |
|
|
f1892a8774 | |
|
|
9cf447e223 | |
|
|
b01b01f5c3 | |
|
|
117f859eb0 | |
|
|
0ad0f7248e | |
|
|
269b1bf4fa | |
|
|
d6ace2b270 | |
|
|
d8f1360433 | |
|
|
599bdab200 | |
|
|
493ffdb704 | |
|
|
17c4c2b554 | |
|
|
9f37089bbc | |
|
|
a9ccc68079 | |
|
|
8b405e0602 | |
|
|
2f76cc3ef0 | |
|
|
5a545cf9fc | |
|
|
c131c58108 | |
|
|
29ff415caa | |
|
|
f95d78d034 | |
|
|
9660037256 | |
|
|
36f3c83ec7 | |
|
|
a0bb98dd1b | |
|
|
6759331c96 | |
|
|
992d158a79 | |
|
|
f90561c411 |
63
.asf.yaml
63
.asf.yaml
|
|
@ -1,50 +1,21 @@
|
|||
# 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
|
||||
#
|
||||
# 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.
|
||||
# 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.
|
||||
|
||||
# https://cwiki.apache.org/confluence/display/INFRA/git+-+.asf.yaml+features
|
||||
---
|
||||
github:
|
||||
description: Apache DolphinScheduler is a distributed and extensible workflow scheduler platform with powerful DAG visual interfaces, dedicated to solving complex job dependencies in the data pipeline and providing various types of jobs available out of box.
|
||||
homepage: https://dolphinscheduler.apache.org/
|
||||
labels:
|
||||
- airflow
|
||||
- schedule
|
||||
- job-scheduler
|
||||
- oozie
|
||||
- task-scheduler
|
||||
- azkaban
|
||||
- distributed-schedule-system
|
||||
- workflow-scheduling-system
|
||||
- etl-dependency
|
||||
- workflow-platform
|
||||
- cronjob-schedule
|
||||
- job-schedule
|
||||
- task-schedule
|
||||
- workflow-schedule
|
||||
- data-schedule
|
||||
enabled_merge_buttons:
|
||||
squash: true
|
||||
merge: false
|
||||
rebase: false
|
||||
protected_branches:
|
||||
dev:
|
||||
required_status_checks:
|
||||
contexts:
|
||||
- Build
|
||||
- Unit Test
|
||||
- E2E
|
||||
required_pull_request_reviews:
|
||||
dismiss_stale_reviews: true
|
||||
required_approving_review_count: 1
|
||||
description: "Apache DolphinScheduler is a distributed and extensible workflow scheduler platform with powerful DAG visual interfaces, dedicated to solving complex job dependencies in the data pipeline and providing various types of jobs available `out of the box`."
|
||||
|
|
|
|||
39
.dlc.json
39
.dlc.json
|
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
"ignorePatterns": [
|
||||
{
|
||||
"pattern": "^http://localhost"
|
||||
},
|
||||
{
|
||||
"pattern": "^https://hive.apache.org"
|
||||
},
|
||||
{
|
||||
"pattern": "^http://192"
|
||||
},
|
||||
{
|
||||
"pattern": "^https://img.shields.io/badge"
|
||||
}
|
||||
],
|
||||
"replacementPatterns": [
|
||||
{
|
||||
"pattern": "^/en-us/download/download.html$",
|
||||
"replacement": "https://dolphinscheduler.apache.org/en-us/download/download.html"
|
||||
},
|
||||
{
|
||||
"pattern": "^/zh-cn/download/download.html$",
|
||||
"replacement": "https://dolphinscheduler.apache.org/zh-cn/download/download.html"
|
||||
},
|
||||
{
|
||||
"pattern": "^/img",
|
||||
"replacement": "{{BASEURL}}/docs/img"
|
||||
}
|
||||
],
|
||||
"timeout": "10s",
|
||||
"retryOn429": true,
|
||||
"retryCount": 10,
|
||||
"fallbackRetryDelay": "1000s",
|
||||
"aliveStatusCodes": [
|
||||
200,
|
||||
401,
|
||||
0
|
||||
]
|
||||
}
|
||||
|
|
@ -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.
|
||||
#
|
||||
|
||||
dolphinscheduler/dolphinscheduler-alert @kezhenxu94
|
||||
dolphinscheduler/dolphinscheduler-e2e @kezhenxu94
|
||||
dolphinscheduler/dolphinscheduler-registry @kezhenxu94
|
||||
dolphinscheduler/dolphinscheduler-standalone-server @kezhenxu94
|
||||
dolphinscheduler/dolphinscheduler-python @zhongjiajie
|
||||
dolphinscheduler/docs @zhongjiajie @Tianqi-Dotes
|
||||
|
|
@ -1,135 +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.
|
||||
#
|
||||
|
||||
name: Bug report
|
||||
title: "[Bug] [Module Name] Bug title "
|
||||
description: Problems and issues with code of Apache Dolphinscheduler
|
||||
labels: [ "bug", "Waiting for reply" ]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
Please make sure what you are reporting is indeed a bug with reproducible steps, if you want to ask questions
|
||||
or share ideas, you can head to our
|
||||
[Discussions](https://github.com/apache/dolphinscheduler/discussions) tab, you can also
|
||||
[join our slack](https://join.slack.com/t/asf-dolphinscheduler/shared_invite/zt-omtdhuio-_JISsxYhiVsltmC5h38yfw)
|
||||
and send your question to channel `#troubleshooting`
|
||||
|
||||
For better global communication, Please write in English.
|
||||
|
||||
If you feel the description in English is not clear, then you can append description in Chinese, thanks!
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Search before asking
|
||||
description: >
|
||||
Please make sure to search in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue)
|
||||
first to see whether the same issue was reported already.
|
||||
options:
|
||||
- label: >
|
||||
I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found
|
||||
no similar issues.
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: What happened
|
||||
description: Describe what happened.
|
||||
placeholder: >
|
||||
Please provide the context in which the problem occurred and explain what happened
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: What you expected to happen
|
||||
description: What do you think went wrong?
|
||||
placeholder: >
|
||||
Please explain why you think the behaviour is erroneous. It is extremely helpful if you copy and paste
|
||||
the fragment of logs showing the exact error messages or wrong behaviour and screenshots for
|
||||
UI problems. You can include files by dragging and dropping them here.
|
||||
|
||||
**NOTE**: please copy and paste texts instead of taking screenshots of them for easy future search.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: How to reproduce
|
||||
description: >
|
||||
What should we do to reproduce the problem? If you are not able to provide a reproducible case,
|
||||
please open a [Discussion](https://github.com/apache/dolphinscheduler/discussions) instead.
|
||||
placeholder: >
|
||||
Please make sure you provide a reproducible step-by-step case of how to reproduce the problem
|
||||
as minimally and precisely as possible. Keep in mind we do not have access to your deployment.
|
||||
Remember that non-reproducible issues will be closed! Opening a discussion is recommended as a
|
||||
first step.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Anything else
|
||||
description: Anything else we need to know?
|
||||
placeholder: >
|
||||
How often does this problem occur? (Once? Every time? Only when certain conditions are met?)
|
||||
Any relevant logs to include? Put them here inside fenced
|
||||
``` ``` blocks or inside a collapsable details tag if it's too long:
|
||||
<details><summary>x.log</summary> lots of stuff </details>
|
||||
|
||||
- type: dropdown
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: >
|
||||
Which version of Apache DolphinScheduler are you running? We only accept bugs report from the LTS projects.
|
||||
options:
|
||||
- dev
|
||||
- 3.0.0-alpha
|
||||
- 2.0.5
|
||||
- 2.0.3
|
||||
- 2.0.2
|
||||
- 2.0.1
|
||||
- 1.3.9
|
||||
- 1.3.8
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Are you willing to submit PR?
|
||||
description: >
|
||||
This is absolutely not required, but we are happy to guide you in the contribution process
|
||||
especially if you already have a good understanding of how to implement the fix.
|
||||
Dolphinscheduler is a totally community-driven project and we love to bring new contributors in.
|
||||
options:
|
||||
- label: Yes I am willing to submit a PR!
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: |
|
||||
The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it.
|
||||
options:
|
||||
- label: >
|
||||
I agree to follow this project's
|
||||
[Code of Conduct](https://www.apache.org/foundation/policies/conduct)
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thanks for completing our form!"
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[BUG] bug title "
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
*For better global communication, please give priority to using English description, thx! *
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior, for example:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
|
||||
**Which version of Dolphin Scheduler:**
|
||||
-[1.1.0-preview]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
**Requirement or improvement
|
||||
- Please describe about your requirements or improvement suggestions.
|
||||
|
|
@ -1,22 +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.
|
||||
#
|
||||
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Ask a question or get support
|
||||
url: https://github.com/apache/dolphinscheduler/discussions/
|
||||
about: Ask a question or request support for using Apache DolphinScheduler
|
||||
|
|
@ -1,81 +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.
|
||||
#
|
||||
name: Feature request
|
||||
description: Suggest an idea for this project
|
||||
title: "[Feature][Module Name] Feature title"
|
||||
labels: [ "new feature", "Waiting for reply" ]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
For better global communication, Please write in English.
|
||||
|
||||
If you feel the description in English is not clear, then you can append description in Chinese, thanks!
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Search before asking
|
||||
description: >
|
||||
Please make sure to search in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) first
|
||||
to see whether the same feature was requested already.
|
||||
options:
|
||||
- label: >
|
||||
I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no
|
||||
similar feature requirement.
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: A short description of your feature
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Use case
|
||||
description: What do you want to happen?
|
||||
placeholder: >
|
||||
Rather than telling us how you might implement this feature, try to take a
|
||||
step back and describe what you are trying to achieve.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Related issues
|
||||
description: Is there currently another issue associated with this?
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Are you willing to submit a PR?
|
||||
description: >
|
||||
This is absolutely not required, but we are happy to guide you in the contribution process
|
||||
especially if you already have a good understanding of how to implement the feature.
|
||||
DolphinScheduler is a totally community-driven project and we love to bring new contributors in.
|
||||
options:
|
||||
- label: Yes I am willing to submit a PR!
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: |
|
||||
The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it.
|
||||
options:
|
||||
- label: |
|
||||
I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
|
||||
required: true
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "Thanks for completing our form!"
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: "[Feature]"
|
||||
labels: new feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
name: question
|
||||
about: have a question wanted to be help
|
||||
title: "[QUESTION] question title"
|
||||
labels: question
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
*For better global communication, please give priority to using English description, thx! *
|
||||
|
||||
**Describe the question**
|
||||
A clear and concise description of what the question is.
|
||||
|
||||
|
||||
**Which version of DolphinScheduler:**
|
||||
-[1.1.0-preview]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
**Requirement or improvement
|
||||
- Please describe about your requirements or improvement suggestions.
|
||||
|
|
@ -1,18 +1,19 @@
|
|||
<!--Thanks very much for contributing to Apache DolphinScheduler. Please review https://dolphinscheduler.apache.org/en-us/community/development/pull-request.html before opening a pull request.-->
|
||||
## *Tips*
|
||||
- *Thanks very much for contributing to Apache DolphinScheduler.*
|
||||
- *Please review https://dolphinscheduler.apache.org/en-us/community/index.html before opening a pull request.*
|
||||
|
||||
## What is the purpose of the pull request
|
||||
|
||||
## Purpose of the pull request
|
||||
|
||||
<!--(For example: This pull request adds checkstyle plugin).-->
|
||||
*(For example: This pull request adds checkstyle plugin.)*
|
||||
|
||||
## Brief change log
|
||||
|
||||
<!--*(for example:)*
|
||||
*(for example:)*
|
||||
- *Add maven-checkstyle-plugin to root pom.xml*
|
||||
-->
|
||||
|
||||
## Verify this pull request
|
||||
|
||||
<!--*(Please pick either of the following options)*-->
|
||||
*(Please pick either of the following options)*
|
||||
|
||||
This pull request is code cleanup without any test coverage.
|
||||
|
||||
|
|
@ -24,7 +25,8 @@ This pull request is already covered by existing tests, such as *(please describ
|
|||
|
||||
This change added tests and can be verified as follows:
|
||||
|
||||
<!--*(example:)*
|
||||
*(example:)*
|
||||
|
||||
- *Added dolphinscheduler-dao tests for end-to-end.*
|
||||
- *Added CronUtilsTest to verify the change.*
|
||||
- *Manually verified the change by testing locally.* -->
|
||||
- *Manually verified the change by testing locally.*
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 966bbbd2113de1f8008322fd1cc7674981a6b1ab
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit c2fa3e5a37b75a5819e2c8127caec1c2a0d088e8
|
||||
|
|
@ -1,53 +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.
|
||||
#
|
||||
|
||||
name: "Sanity Check"
|
||||
|
||||
description: |
|
||||
Action to perform some very basic lightweight checks, like code styles, license headers, etc.,
|
||||
and fail fast to avoid wasting resources running heavyweight checks, like unit tests, e2e tests.
|
||||
|
||||
inputs:
|
||||
token:
|
||||
description: 'The GitHub API token'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Check License Header
|
||||
uses: apache/skywalking-eyes@30367d8286e324d5efc58de4c70c37ea3648306d
|
||||
|
||||
- uses: ./.github/actions/reviewdog-setup
|
||||
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
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 8c4d3b8ead41812bbe837dc5dfb8fa047cd2b548
|
||||
|
|
@ -1,38 +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.
|
||||
---
|
||||
version: 2
|
||||
mergeable:
|
||||
- when: pull_request.*, pull_request_review.*
|
||||
name: synchronize change for sql files
|
||||
validate:
|
||||
# Sql files must change synchronize
|
||||
- do: dependent
|
||||
files: ['sql/dolphinscheduler_h2.sql', 'sql/dolphinscheduler_mysql.sql', 'sql/dolphinscheduler_postgre.sql']
|
||||
message: 'Sql files not change synchronize'
|
||||
# Add labels 'sql not sync' if Sql files not change synchronize
|
||||
fail:
|
||||
- do: checks
|
||||
status: 'failure'
|
||||
- do: labels
|
||||
add: 'sql not sync'
|
||||
# Remove labels 'sql not sync' if pass
|
||||
pass:
|
||||
- do: checks
|
||||
status: 'success'
|
||||
- do: labels
|
||||
delete: 'sql not sync'
|
||||
|
|
@ -1,97 +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.
|
||||
#
|
||||
|
||||
name: Backend
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
paths:
|
||||
- '.github/workflows/backend.yml'
|
||||
- 'package.xml'
|
||||
- 'pom.xml'
|
||||
- 'dolphinscheduler-alert/**'
|
||||
- 'dolphinscheduler-api/**'
|
||||
- 'dolphinscheduler-common/**'
|
||||
- 'dolphinscheduler-dao/**'
|
||||
- 'dolphinscheduler-rpc/**'
|
||||
- 'dolphinscheduler-server/**'
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: backend-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
paths-filter:
|
||||
name: Backend-Path-Filter
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
not-ignore:
|
||||
- '!(docs/**)'
|
||||
build:
|
||||
name: Backend-Build
|
||||
needs: paths-filter
|
||||
if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Sanity Check
|
||||
uses: ./.github/actions/sanity-check
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven
|
||||
- name: Build and Package
|
||||
run: |
|
||||
./mvnw -B clean install \
|
||||
-Prelease,docker \
|
||||
-Dmaven.test.skip=true \
|
||||
-Dcheckstyle.skip=true \
|
||||
-Dhttp.keepAlive=false \
|
||||
-Dmaven.wagon.http.pool=false \
|
||||
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
||||
- name: Check dependency license
|
||||
run: tools/dependencies/check-LICENSE.sh
|
||||
result:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
needs: [ build, paths-filter ]
|
||||
if: always()
|
||||
steps:
|
||||
- name: Status
|
||||
run: |
|
||||
if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then
|
||||
echo "Skip Build!"
|
||||
exit 0
|
||||
fi
|
||||
if [[ ${{ needs.build.result }} != 'success' ]]; then
|
||||
echo "Build Failed!"
|
||||
exit -1
|
||||
fi
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Backend
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/ci_backend.yml'
|
||||
- 'package.xml'
|
||||
- 'pom.xml'
|
||||
- 'dolphinscheduler-alert/**'
|
||||
- 'dolphinscheduler-api/**'
|
||||
- 'dolphinscheduler-common/**'
|
||||
- 'dolphinscheduler-dao/**'
|
||||
- 'dolphinscheduler-rpc/**'
|
||||
- 'dolphinscheduler-server/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/ci_backend.yml'
|
||||
- 'package.xml'
|
||||
- 'pom.xml'
|
||||
- 'dolphinscheduler-alert/**'
|
||||
- 'dolphinscheduler-api/**'
|
||||
- 'dolphinscheduler-common/**'
|
||||
- 'dolphinscheduler-dao/**'
|
||||
- 'dolphinscheduler-rpc/**'
|
||||
- 'dolphinscheduler-server/**'
|
||||
|
||||
jobs:
|
||||
Compile-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
# In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
|
||||
- name: checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
git submodule sync --recursive
|
||||
git -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Check license
|
||||
run: ./mvnw -B apache-rat:check
|
||||
- name: Compile
|
||||
run: mvn -B clean compile install -Prelease -Dmaven.test.skip=true
|
||||
- name: Check dependency license
|
||||
run: tools/dependencies/check-LICENSE.sh
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
on: ["pull_request"]
|
||||
env:
|
||||
DOCKER_DIR: ./docker
|
||||
LOG_DIR: /tmp/dolphinscheduler
|
||||
|
||||
name: e2e Test
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
# In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
|
||||
- name: checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
git submodule sync --recursive
|
||||
git -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: Build Image
|
||||
run: |
|
||||
sh ./docker/build/hooks/build
|
||||
- name: Docker Run
|
||||
run: |
|
||||
export VERSION=$(cat $(pwd)/pom.xml | grep '<version>' -m 1 | awk '{print $1}' | sed 's/<version>//' | sed 's/<\/version>//')
|
||||
sed -i "s/apache\/dolphinscheduler:latest/apache\/dolphinscheduler:${VERSION}/g" $(pwd)/docker/docker-swarm/docker-compose.yml
|
||||
docker-compose -f $(pwd)/docker/docker-swarm/docker-compose.yml up -d
|
||||
- name: Check Server Status
|
||||
run: sh $(pwd)/docker/docker-swarm/check
|
||||
- name: Prepare e2e env
|
||||
run: |
|
||||
sudo apt-get install -y libxss1 libappindicator1 libindicator7 xvfb unzip libgbm1
|
||||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
sudo dpkg -i google-chrome*.deb
|
||||
sudo apt-get install -f -y
|
||||
google-chrome -version
|
||||
googleVersion=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE)
|
||||
wget -N https://chromedriver.storage.googleapis.com/${googleVersion}/chromedriver_linux64.zip
|
||||
unzip chromedriver_linux64.zip
|
||||
sudo mv -f chromedriver /usr/local/share/chromedriver
|
||||
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
|
||||
- name: Run e2e Test
|
||||
run: cd ./e2e && mvn -B clean test
|
||||
- name: Collect logs
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: dslogs
|
||||
path: ${{ github.workspace }}/docker/docker-swarm/dolphinscheduler-logs
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Frontend
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '.github/workflows/ci_frontend.yml'
|
||||
- 'dolphinscheduler-ui/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/ci_frontend.yml'
|
||||
- 'dolphinscheduler-ui/**'
|
||||
|
||||
jobs:
|
||||
Compile-check:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
# In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
|
||||
- name: checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
git submodule sync --recursive
|
||||
git -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
version: 8
|
||||
- name: Compile
|
||||
run: |
|
||||
cd dolphinscheduler-ui
|
||||
npm install node-sass --unsafe-perm
|
||||
npm install
|
||||
npm run lint
|
||||
npm run build
|
||||
|
||||
License-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
# In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
|
||||
- name: checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
git submodule sync --recursive
|
||||
git -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Check
|
||||
run: mvn -B apache-rat:check
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
env:
|
||||
LOG_DIR: /tmp/dolphinscheduler
|
||||
|
||||
name: Unit Test
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
# In the checkout@v2, it doesn't support git submodule. Execute the commands manually.
|
||||
- name: checkout submodules
|
||||
shell: bash
|
||||
run: |
|
||||
git submodule sync --recursive
|
||||
git -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: Bootstrap database
|
||||
run: |
|
||||
sed -i "s/: root/: test/g" $(pwd)/docker/docker-swarm/docker-compose.yml
|
||||
docker-compose -f $(pwd)/docker/docker-swarm/docker-compose.yml create --force-recreate dolphinscheduler-zookeeper dolphinscheduler-postgresql
|
||||
sudo cp $(pwd)/sql/dolphinscheduler-postgre.sql $(docker volume inspect docker-swarm_dolphinscheduler-postgresql-initdb | grep "Mountpoint" | awk -F "\"" '{print $4}')
|
||||
docker-compose -f $(pwd)/docker/docker-swarm/docker-compose.yml up -d dolphinscheduler-zookeeper dolphinscheduler-postgresql
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Git fetch unshallow
|
||||
run: |
|
||||
git fetch --unshallow
|
||||
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
|
||||
git fetch origin
|
||||
- name: Compile
|
||||
run: |
|
||||
export MAVEN_OPTS='-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx5g'
|
||||
mvn test -B -Dmaven.test.skip=false
|
||||
- name: Upload coverage report to codecov
|
||||
run: |
|
||||
CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash)
|
||||
# Set up JDK 11 for SonarCloud.
|
||||
- name: Set up JDK 1.11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.11
|
||||
- name: Run SonarCloud Analysis
|
||||
run: >
|
||||
mvn --batch-mode verify sonar:sonar
|
||||
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
|
||||
-Dmaven.test.skip=true
|
||||
-Dsonar.host.url=https://sonarcloud.io
|
||||
-Dsonar.organization=apache
|
||||
-Dsonar.core.codeCoveragePlugin=jacoco
|
||||
-Dsonar.projectKey=apache-dolphinscheduler
|
||||
-Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682
|
||||
-Dsonar.exclusions=dolphinscheduler-ui/src/**/i18n/locale/*.js
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
- name: Collect logs
|
||||
run: |
|
||||
mkdir -p ${LOG_DIR}
|
||||
docker-compose -f $(pwd)/docker/docker-swarm/docker-compose.yml logs dolphinscheduler-postgresql > ${LOG_DIR}/db.txt
|
||||
continue-on-error: true
|
||||
|
|
@ -1,54 +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.
|
||||
|
||||
name: Docs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
|
||||
concurrency:
|
||||
group: doc-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
img-check:
|
||||
name: Image Check
|
||||
timeout-minutes: 15
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: docs
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Run Image Check
|
||||
run: python img_utils.py -v check
|
||||
dead-link:
|
||||
name: Dead Link
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: sudo npm install -g markdown-link-check@3.10.0
|
||||
- run: |
|
||||
for file in $(find ./docs -name "*.md"); do
|
||||
markdown-link-check -c .dlc.json -q "$file"
|
||||
done
|
||||
|
|
@ -1,171 +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.
|
||||
#
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
name: E2E
|
||||
|
||||
concurrency:
|
||||
group: e2e-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
jobs:
|
||||
paths-filter:
|
||||
name: E2E-Path-Filter
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
not-ignore:
|
||||
- '!(docs/**)'
|
||||
build:
|
||||
name: E2E-Build
|
||||
needs: paths-filter
|
||||
if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Sanity Check
|
||||
uses: ./.github/actions/sanity-check
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-maven-
|
||||
- name: Build Image
|
||||
run: |
|
||||
./mvnw -B clean install \
|
||||
-Dmaven.test.skip \
|
||||
-Dmaven.javadoc.skip \
|
||||
-Dmaven.checkstyle.skip \
|
||||
-Pdocker,release -Ddocker.tag=ci \
|
||||
-pl dolphinscheduler-standalone-server -am
|
||||
- name: Export Docker Images
|
||||
run: |
|
||||
docker save apache/dolphinscheduler-standalone-server:ci -o /tmp/standalone-image.tar \
|
||||
&& du -sh /tmp/standalone-image.tar
|
||||
- uses: actions/upload-artifact@v2
|
||||
name: Upload Docker Images
|
||||
with:
|
||||
name: standalone-image
|
||||
path: /tmp/standalone-image.tar
|
||||
retention-days: 1
|
||||
e2e:
|
||||
name: ${{ matrix.case.name }}
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
case:
|
||||
- name: Tenant
|
||||
class: org.apache.dolphinscheduler.e2e.cases.TenantE2ETest
|
||||
- name: User
|
||||
class: org.apache.dolphinscheduler.e2e.cases.UserE2ETest
|
||||
- name: WorkerGroup
|
||||
class: org.apache.dolphinscheduler.e2e.cases.WorkerGroupE2ETest
|
||||
- name: Project
|
||||
class: org.apache.dolphinscheduler.e2e.cases.ProjectE2ETest
|
||||
- name: Queue
|
||||
class: org.apache.dolphinscheduler.e2e.cases.QueueE2ETest
|
||||
- name: Environment
|
||||
class: org.apache.dolphinscheduler.e2e.cases.EnvironmentE2ETest
|
||||
- name: Token
|
||||
class: org.apache.dolphinscheduler.e2e.cases.TokenE2ETest
|
||||
- name: Workflow
|
||||
class: org.apache.dolphinscheduler.e2e.cases.WorkflowE2ETest
|
||||
# - name: WorkflowForSwitch
|
||||
# class: org.apache.dolphinscheduler.e2e.cases.WorkflowSwitchE2ETest
|
||||
- name: FileManage
|
||||
class: org.apache.dolphinscheduler.e2e.cases.FileManageE2ETest
|
||||
- name: UdfManage
|
||||
class: org.apache.dolphinscheduler.e2e.cases.UdfManageE2ETest
|
||||
- name: FunctionManage
|
||||
class: org.apache.dolphinscheduler.e2e.cases.FunctionManageE2ETest
|
||||
- name: MysqlDataSource
|
||||
class: org.apache.dolphinscheduler.e2e.cases.MysqlDataSourceE2ETest
|
||||
- name: ClickhouseDataSource
|
||||
class: org.apache.dolphinscheduler.e2e.cases.ClickhouseDataSourceE2ETest
|
||||
- name: PostgresDataSource
|
||||
class: org.apache.dolphinscheduler.e2e.cases.PostgresDataSourceE2ETest
|
||||
- name: SqlServerDataSource
|
||||
class: org.apache.dolphinscheduler.e2e.cases.SqlServerDataSourceE2ETest
|
||||
- name: HiveDataSource
|
||||
class: org.apache.dolphinscheduler.e2e.cases.HiveDataSourceE2ETest
|
||||
env:
|
||||
RECORDING_PATH: /tmp/recording-${{ matrix.case.name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-maven-
|
||||
- uses: actions/download-artifact@v2
|
||||
name: Download Docker Images
|
||||
with:
|
||||
name: standalone-image
|
||||
path: /tmp
|
||||
- name: Load Docker Images
|
||||
run: |
|
||||
docker load -i /tmp/standalone-image.tar
|
||||
- name: Run Test
|
||||
run: |
|
||||
./mvnw -B -f dolphinscheduler-e2e/pom.xml -am \
|
||||
-DfailIfNoTests=false \
|
||||
-Dtest=${{ matrix.case.class }} test
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
name: Upload Recording
|
||||
with:
|
||||
name: recording-${{ matrix.case.name }}
|
||||
path: ${{ env.RECORDING_PATH }}
|
||||
retention-days: 1
|
||||
result:
|
||||
name: E2E
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
needs: [ e2e, paths-filter ]
|
||||
if: always()
|
||||
steps:
|
||||
- name: Status
|
||||
run: |
|
||||
if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then
|
||||
echo "Skip E2E!"
|
||||
exit 0
|
||||
fi
|
||||
if [[ ${{ needs.e2e.result }} != 'success' ]]; then
|
||||
echo "E2E Failed!"
|
||||
exit -1
|
||||
fi
|
||||
|
|
@ -1,64 +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.
|
||||
#
|
||||
|
||||
name: Frontend
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
paths:
|
||||
- '.github/workflows/frontend.yml'
|
||||
- 'dolphinscheduler-ui-next/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/frontend.yml'
|
||||
- 'dolphinscheduler-ui-next/**'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: dolphinscheduler-ui-next
|
||||
|
||||
concurrency:
|
||||
group: frontend-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 20
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-latest ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- if: matrix.os == 'ubuntu-latest'
|
||||
name: Sanity Check
|
||||
uses: ./.github/actions/sanity-check
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Compile and Build
|
||||
run: |
|
||||
npm install pnpm -g
|
||||
pnpm install
|
||||
pnpm run lint
|
||||
pnpm run build:prod
|
||||
|
|
@ -1,47 +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.
|
||||
#
|
||||
|
||||
name: issue-robot
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
issueRobot:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout ${{ github.ref }}"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: true
|
||||
|
||||
- name: "Translation into English in issue"
|
||||
uses: ./.github/actions/translate-on-issue
|
||||
with:
|
||||
translate-title: true
|
||||
translate-body: true
|
||||
|
||||
- name: "Comment in issue"
|
||||
uses: ./.github/actions/comment-on-issue
|
||||
with:
|
||||
message: |
|
||||
Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
|
||||
* In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
|
||||
* If you haven't received a reply for a long time, you can [join our slack](https://join.slack.com/t/asf-dolphinscheduler/shared_invite/zt-omtdhuio-_JISsxYhiVsltmC5h38yfw) and send your question to channel `#troubleshooting`
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -1,63 +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.
|
||||
|
||||
name: publish-docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
env:
|
||||
HUB: ghcr.io/apache/dolphinscheduler
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository == 'apache/dolphinscheduler'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v1.10.0
|
||||
with:
|
||||
registry: ${{ env.HUB }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Build and push docker images
|
||||
run: |
|
||||
./mvnw -B clean deploy \
|
||||
-Dmaven.test.skip \
|
||||
-Dmaven.javadoc.skip \
|
||||
-Dmaven.checkstyle.skip \
|
||||
-Dmaven.deploy.skip \
|
||||
-Ddocker.tag=${{ github.sha }} \
|
||||
-Ddocker.hub=${{ env.HUB }} \
|
||||
-Pdocker,release
|
||||
|
|
@ -1,178 +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.
|
||||
|
||||
name: Python API
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
paths:
|
||||
- 'dolphinscheduler-python/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'dolphinscheduler-python/**'
|
||||
|
||||
concurrency:
|
||||
group: py-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: dolphinscheduler-python/pydolphinscheduler
|
||||
|
||||
# We have to update setuptools wheel to package with package_data, LICENSE, NOTICE
|
||||
env:
|
||||
DEPENDENCES: pip setuptools wheel tox
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
timeout-minutes: 15
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Dependences
|
||||
run: |
|
||||
python -m pip install --upgrade ${{ env.DEPENDENCES }}
|
||||
- name: Run All Lint Check
|
||||
run: |
|
||||
python -m tox -vv -e lint
|
||||
pytest:
|
||||
name: Pytest
|
||||
timeout-minutes: 15
|
||||
needs: lint
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||
os: [ubuntu-18.04, macOS-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install Dependences
|
||||
run: |
|
||||
python -m pip install --upgrade ${{ env.DEPENDENCES }}
|
||||
- name: Run All Tests
|
||||
run: |
|
||||
python -m tox -vv -e code-test
|
||||
doc-build:
|
||||
name: Docs Build Test
|
||||
timeout-minutes: 15
|
||||
needs: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Dependences
|
||||
run: |
|
||||
python -m pip install --upgrade ${{ env.DEPENDENCES }}
|
||||
- name: Run Tests Build Docs
|
||||
run: |
|
||||
python -m tox -vv -e doc-build-test
|
||||
local-ci:
|
||||
name: Local CI
|
||||
timeout-minutes: 15
|
||||
needs:
|
||||
- pytest
|
||||
- doc-build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Dependences
|
||||
run: |
|
||||
python -m pip install --upgrade ${{ env.DEPENDENCES }}
|
||||
- name: Run Tests Build Docs
|
||||
run: |
|
||||
python -m tox -vv -e local-ci
|
||||
build-image:
|
||||
name: Build Image
|
||||
runs-on: ubuntu-latest
|
||||
# Switch to project root directory to run mvnw command
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Sanity Check
|
||||
uses: ./.github/actions/sanity-check
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: ${{ runner.os }}-maven-
|
||||
- name: Build Image
|
||||
run: |
|
||||
./mvnw -B clean install \
|
||||
-Dmaven.test.skip \
|
||||
-Dmaven.javadoc.skip \
|
||||
-Dmaven.checkstyle.skip \
|
||||
-Pdocker,release -Ddocker.tag=ci \
|
||||
-pl dolphinscheduler-standalone-server -am
|
||||
- name: Export Docker Images
|
||||
run: |
|
||||
docker save apache/dolphinscheduler-standalone-server:ci -o /tmp/standalone-image.tar \
|
||||
&& du -sh /tmp/standalone-image.tar
|
||||
- uses: actions/upload-artifact@v2
|
||||
name: Upload Docker Images
|
||||
with:
|
||||
name: standalone-image
|
||||
path: /tmp/standalone-image.tar
|
||||
retention-days: 1
|
||||
integrate-test:
|
||||
name: Integrate Test
|
||||
timeout-minutes: 20
|
||||
needs:
|
||||
- build-image
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/download-artifact@v2
|
||||
name: Download Docker Images
|
||||
with:
|
||||
name: standalone-image
|
||||
path: /tmp
|
||||
- name: Load Docker Images
|
||||
run: |
|
||||
docker load -i /tmp/standalone-image.tar
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Dependences
|
||||
run: |
|
||||
python -m pip install --upgrade ${{ env.DEPENDENCES }}
|
||||
- name: Run Tests Build Docs
|
||||
run: |
|
||||
python -m tox -vv -e integrate-test
|
||||
|
|
@ -1,52 +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.
|
||||
|
||||
|
||||
# https://github.com/actions/stale
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
permissions:
|
||||
# Stale recommended permissions
|
||||
pull-requests: write
|
||||
issues: write
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v4
|
||||
with:
|
||||
# Stale Issues
|
||||
days-before-issue-stale: 30
|
||||
days-before-issue-close: 7
|
||||
# We do not stale Issues with label `Waiting for reply`, `new feature` and `DSIP`
|
||||
exempt-issue-labels: 'Waiting for reply,new feature,DSIP'
|
||||
stale-issue-message: >
|
||||
This issue has been automatically marked as stale because it has not had recent activity
|
||||
for 30 days. It will be closed in next 7 days if no further activity occurs.
|
||||
close-issue-message: >
|
||||
This issue has been closed because it has not received response for too long time. You could
|
||||
reopen it if you encountered similar problems in the future.
|
||||
# Stale PRs
|
||||
days-before-pr-stale: 120
|
||||
days-before-pr-close: 7
|
||||
stale-pr-message: >
|
||||
This pull request has been automatically marked as stale because it has not had recent
|
||||
activity for 120 days. It will be closed in 7 days if no further activity occurs.
|
||||
close-pr-message: >
|
||||
This pull request has been closed because it has not had recent activity. You could reopen it
|
||||
if you try to continue your work, and anyone who are interested in it are encouraged to continue
|
||||
work on this pull request.
|
||||
|
|
@ -1,130 +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.
|
||||
#
|
||||
|
||||
name: Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
- 'dolphinscheduler-ui'
|
||||
- 'dolphinscheduler-ui-next'
|
||||
- 'dolphinscheduler-python/pydolphinscheduler'
|
||||
branches:
|
||||
- dev
|
||||
|
||||
env:
|
||||
LOG_DIR: /tmp/dolphinscheduler
|
||||
|
||||
concurrency:
|
||||
group: unit-test-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
paths-filter:
|
||||
name: Unit-Test-Path-Filter
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
not-ignore: ${{ steps.filter.outputs.not-ignore }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: dorny/paths-filter@b2feaf19c27470162a626bd6fa8438ae5b263721
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
not-ignore:
|
||||
- '!(docs/**)'
|
||||
unit-test:
|
||||
name: Unit-Test
|
||||
needs: paths-filter
|
||||
if: ${{ (needs.paths-filter.outputs.not-ignore == 'true') || (github.event_name == 'push') }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- name: Sanity Check
|
||||
uses: ./.github/actions/sanity-check
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 8
|
||||
distribution: 'adopt'
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven
|
||||
|
||||
- name: Run Unit tests
|
||||
run: ./mvnw clean verify -B -Dmaven.test.skip=false
|
||||
- name: Upload coverage report to codecov
|
||||
run: CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
# Set up JDK 11 for SonarCloud.
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: 11
|
||||
distribution: 'adopt'
|
||||
- name: Run SonarCloud Analysis
|
||||
run: >
|
||||
./mvnw --batch-mode verify sonar:sonar
|
||||
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
|
||||
-Dmaven.test.skip=true
|
||||
-Dcheckstyle.skip=true
|
||||
-Dsonar.host.url=https://sonarcloud.io
|
||||
-Dsonar.organization=apache
|
||||
-Dsonar.core.codeCoveragePlugin=jacoco
|
||||
-Dsonar.projectKey=apache-dolphinscheduler
|
||||
-Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682
|
||||
-Dsonar.exclusions=dolphinscheduler-ui/src/**/i18n/locale/*.js,dolphinscheduler-ui-next/src/**/i18n/locale/*.js,dolphinscheduler-microbench/src/**/*
|
||||
-Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
- name: Collect logs
|
||||
continue-on-error: true
|
||||
run: |
|
||||
mkdir -p ${LOG_DIR}
|
||||
docker-compose -f $(pwd)/docker/docker-swarm/docker-compose.yml logs dolphinscheduler-postgresql > ${LOG_DIR}/db.txt
|
||||
|
||||
- name: Upload logs
|
||||
uses: actions/upload-artifact@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
name: unit-test-logs
|
||||
path: ${LOG_DIR}
|
||||
result:
|
||||
name: Unit Test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
needs: [ unit-test, paths-filter ]
|
||||
if: always()
|
||||
steps:
|
||||
- name: Status
|
||||
run: |
|
||||
if [[ ${{ needs.paths-filter.outputs.not-ignore }} == 'false' && ${{ github.event_name }} == 'pull_request' ]]; then
|
||||
echo "Skip Unit Test!"
|
||||
exit 0
|
||||
fi
|
||||
if [[ ${{ needs.unit-test.result }} != 'success' ]]; then
|
||||
echo "Unit Test Failed!"
|
||||
exit -1
|
||||
fi
|
||||
|
|
@ -4,63 +4,43 @@
|
|||
.zip
|
||||
.gz
|
||||
.DS_Store
|
||||
.target
|
||||
.idea/
|
||||
target/
|
||||
dist/
|
||||
all-dependencies.txt
|
||||
self-modules.txt
|
||||
third-party-dependencies.txt
|
||||
**/target/
|
||||
.settings
|
||||
.nbproject
|
||||
.classpath
|
||||
.project
|
||||
*.iml
|
||||
**/*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
*.tgz
|
||||
.*.swp
|
||||
.vim
|
||||
.tmp
|
||||
node_modules
|
||||
**/node_modules
|
||||
npm-debug.log
|
||||
.vscode
|
||||
logs/*
|
||||
.mvn/
|
||||
.www
|
||||
t.*
|
||||
.factorypath
|
||||
Chart.lock
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
config.gypi
|
||||
test/coverage
|
||||
/docs/zh_CN/介绍
|
||||
/docs/zh_CN/贡献代码.md
|
||||
dolphinscheduler-common/src/main/resources/zookeeper.properties
|
||||
dolphinscheduler-dao/src/main/resources/dao/data_source.properties
|
||||
/dolphinscheduler-common/src/main/resources/zookeeper.properties
|
||||
dolphinscheduler-alert/logs/
|
||||
dolphinscheduler-alert/src/main/resources/alert.properties_bak
|
||||
dolphinscheduler-alert/src/main/resources/logback.xml
|
||||
dolphinscheduler-server/src/main/resources/logback.xml
|
||||
dolphinscheduler-ui/dist
|
||||
dolphinscheduler-ui/dist/
|
||||
dolphinscheduler-ui/node
|
||||
dolphinscheduler-ui-next/node
|
||||
dolphinscheduler-common/sql
|
||||
dolphinscheduler-common/test
|
||||
dolphinscheduler-worker/logs
|
||||
dolphinscheduler-dao/src/main/resources/dao/data_source.properties
|
||||
|
||||
# ------------------
|
||||
# pydolphinscheduler
|
||||
# ------------------
|
||||
# Cache
|
||||
__pycache__/
|
||||
.tox/
|
||||
.mvn/wrapper/*.jar
|
||||
|
||||
# Build
|
||||
build/
|
||||
*egg-info/
|
||||
|
||||
# Test coverage
|
||||
.coverage
|
||||
htmlcov/
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
# Licensed to 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. Apache Software Foundation (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.
|
||||
|
||||
[submodule ".github/actions/comment-on-issue"]
|
||||
path = .github/actions/comment-on-issue
|
||||
url = https://github.com/xingchun-chen/actions-comment-on-issue
|
||||
[submodule ".github/actions/translate-on-issue"]
|
||||
path = .github/actions/translate-on-issue
|
||||
url = https://github.com/xingchun-chen/translation-helper
|
||||
[submodule ".github/actions/reviewdog-setup"]
|
||||
path = .github/actions/reviewdog-setup
|
||||
url = https://github.com/reviewdog/action-setup
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
# Licensed to 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. Apache Software Foundation (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.
|
||||
|
||||
header:
|
||||
license:
|
||||
spdx-id: Apache-2.0
|
||||
copyright-owner: Apache Software Foundation
|
||||
|
||||
paths-ignore:
|
||||
- dist
|
||||
- NOTICE
|
||||
- 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
|
||||
- dolphinscheduler-dao/src/main/resources/sql/soft_version
|
||||
- .mvn
|
||||
- .gitattributes
|
||||
- '**/licenses/**/LICENSE-*'
|
||||
- '**/*.md'
|
||||
- '**/*.svg'
|
||||
- '**/*.json'
|
||||
- '**/*.iml'
|
||||
- '**/*.ini'
|
||||
- '**/.babelrc'
|
||||
- '**/.eslintignore'
|
||||
- '**/.gitignore'
|
||||
- '**/LICENSE'
|
||||
- '**/NOTICE'
|
||||
- '**/node_modules/**'
|
||||
- '.github/actions/comment-on-issue/**'
|
||||
- '.github/actions/reviewdog-setup/**'
|
||||
- '.github/actions/translate-on-issue/**'
|
||||
- '**/.gitkeep'
|
||||
|
||||
comment: on-failure
|
||||
|
|
@ -0,0 +1 @@
|
|||
-Xmx1024m -XX:MaxMetaspaceSize=256m
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* Copyright 2007-present the original author or authors.
|
||||
*
|
||||
* Licensed 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 java.net.*;
|
||||
import java.io.*;
|
||||
import java.nio.channels.*;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MavenWrapperDownloader {
|
||||
|
||||
private static final String WRAPPER_VERSION = "0.5.6";
|
||||
/**
|
||||
* Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
|
||||
*/
|
||||
private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
|
||||
+ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
|
||||
|
||||
/**
|
||||
* Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
|
||||
* use instead of the default one.
|
||||
*/
|
||||
private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
|
||||
".mvn/wrapper/maven-wrapper.properties";
|
||||
|
||||
/**
|
||||
* Path where the maven-wrapper.jar will be saved to.
|
||||
*/
|
||||
private static final String MAVEN_WRAPPER_JAR_PATH =
|
||||
".mvn/wrapper/maven-wrapper.jar";
|
||||
|
||||
/**
|
||||
* Name of the property which should be used to override the default download url for the wrapper.
|
||||
*/
|
||||
private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
|
||||
|
||||
public static void main(String args[]) {
|
||||
System.out.println("- Downloader started");
|
||||
File baseDirectory = new File(args[0]);
|
||||
System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
|
||||
|
||||
// If the maven-wrapper.properties exists, read it and check if it contains a custom
|
||||
// wrapperUrl parameter.
|
||||
File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
|
||||
String url = DEFAULT_DOWNLOAD_URL;
|
||||
if(mavenWrapperPropertyFile.exists()) {
|
||||
FileInputStream mavenWrapperPropertyFileInputStream = null;
|
||||
try {
|
||||
mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
|
||||
Properties mavenWrapperProperties = new Properties();
|
||||
mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
|
||||
url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
|
||||
} catch (IOException e) {
|
||||
System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
|
||||
} finally {
|
||||
try {
|
||||
if(mavenWrapperPropertyFileInputStream != null) {
|
||||
mavenWrapperPropertyFileInputStream.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// Ignore ...
|
||||
}
|
||||
}
|
||||
}
|
||||
System.out.println("- Downloading from: " + url);
|
||||
|
||||
File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
|
||||
if(!outputFile.getParentFile().exists()) {
|
||||
if(!outputFile.getParentFile().mkdirs()) {
|
||||
System.out.println(
|
||||
"- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
|
||||
}
|
||||
}
|
||||
System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
|
||||
try {
|
||||
downloadFileFromURL(url, outputFile);
|
||||
System.out.println("Done");
|
||||
System.exit(0);
|
||||
} catch (Throwable e) {
|
||||
System.out.println("- Error downloading");
|
||||
e.printStackTrace();
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private static void downloadFileFromURL(String urlString, File destination) throws Exception {
|
||||
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
|
||||
String username = System.getenv("MVNW_USERNAME");
|
||||
char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
|
||||
Authenticator.setDefault(new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(username, password);
|
||||
}
|
||||
});
|
||||
}
|
||||
URL website = new URL(urlString);
|
||||
ReadableByteChannel rbc;
|
||||
rbc = Channels.newChannel(website.openStream());
|
||||
FileOutputStream fos = new FileOutputStream(destination);
|
||||
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
|
||||
fos.close();
|
||||
rbc.close();
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
|
@ -1,18 +1,2 @@
|
|||
# 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.
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
# How To Contribute
|
||||
|
||||
# Development
|
||||
|
||||
Start by forking the dolphinscheduler GitHub repository, make changes in a branch and then send a pull request.
|
||||
|
||||
## Set up your dolphinscheduler GitHub Repository
|
||||
|
||||
There are three branches in the remote repository currently:
|
||||
|
||||
- `master` : normal delivery branch. After the stable version is released, the code for the stable version branch is merged into the master branch.
|
||||
|
||||
- `dev` : daily development branch. The daily development branch, the newly submitted code can pull requests to this branch.
|
||||
|
|
@ -14,20 +14,20 @@ There are three branches in the remote repository currently:
|
|||
|
||||
So, you should fork the `dev` branch.
|
||||
|
||||
After forking the [dolphinscheduler upstream source repository](https://github.com/apache/dolphinscheduler/fork) to your personal repository, you can set your personal development environment.
|
||||
After forking the [dolphinscheduler upstream source repository](https://github.com/apache/incubator-dolphinscheduler/fork) to your personal repository, you can set your personal development environment.
|
||||
|
||||
```sh
|
||||
cd <your work direcotry>
|
||||
git clone <your personal forked dolphinscheduler repo>
|
||||
cd dolphinscheduler
|
||||
$ cd <your work direcotry>
|
||||
$ git clone < your personal forked dolphinscheduler repo>
|
||||
$ cd incubator-dolphinscheduler
|
||||
```
|
||||
|
||||
## Set git remote as `upstream`
|
||||
## Set git remote as ``upstream``
|
||||
|
||||
Add remote repository address, named upstream
|
||||
|
||||
```sh
|
||||
git remote add upstream https://github.com/apache/dolphinscheduler.git
|
||||
git remote add upstream https://github.com/apache/incubator-dolphinscheduler.git
|
||||
```
|
||||
|
||||
View repository:
|
||||
|
|
@ -52,35 +52,35 @@ git checkout origin/dev
|
|||
git merge --no-ff upstream/dev
|
||||
```
|
||||
|
||||
If remote branch has a new branch `dev-1.0`, you need to synchronize this branch to the local repository, then push to your own repository.
|
||||
If remote branch has a new branch `DEV-1.0`, you need to synchronize this branch to the local repository.
|
||||
|
||||
```sh
|
||||
```
|
||||
git checkout -b dev-1.0 upstream/dev-1.0
|
||||
git push --set-upstream origin dev-1.0
|
||||
git push --set-upstream origin dev1.0
|
||||
```
|
||||
|
||||
## Create your feature branch
|
||||
|
||||
Before making code changes, make sure you create a separate branch for them.
|
||||
|
||||
```sh
|
||||
git checkout -b <your-feature-branch> dev
|
||||
$ git checkout -b <your-feature>
|
||||
```
|
||||
|
||||
## Commit changes
|
||||
|
||||
After modifying the code locally, submit it to your own repository:
|
||||
|
||||
```sh
|
||||
|
||||
git commit -m 'information about your feature'
|
||||
```
|
||||
|
||||
## Push to the branch
|
||||
|
||||
|
||||
Push your locally committed changes to the remote origin (your fork).
|
||||
|
||||
```sh
|
||||
git push origin <your-feature-branch>
|
||||
```
|
||||
$ git push origin <your-feature>
|
||||
```
|
||||
|
||||
## Create a pull request
|
||||
|
|
@ -99,3 +99,14 @@ Select the modified local branch and the branch to merge past to create a pull r
|
|||
</p>
|
||||
|
||||
Next, the administrator is responsible for **merging** to complete the pull request.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
Apache DolphinScheduler (incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC.
|
||||
Incubation is required of all newly accepted projects until a further review indicates that the infrastructure,
|
||||
communications, and decision making process have stabilized in a manner consistent with other successful ASF projects.
|
||||
While incubation status is not necessarily a reflection of the completeness or stability of the code,
|
||||
it does indicate that the project has yet to be fully endorsed by the ASF.
|
||||
10
LICENSE
10
LICENSE
|
|
@ -200,9 +200,9 @@
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
=======================================================================
|
||||
Apache DolphinScheduler Subcomponents:
|
||||
Apache DolphinScheduler (incubating) Subcomponents:
|
||||
|
||||
The Apache DolphinScheduler project contains subcomponents with separate copyright
|
||||
The Apache DolphinScheduler (incubating) project contains subcomponents with separate copyright
|
||||
notices and license terms. Your use of the source code for the these
|
||||
subcomponents is subject to the terms and conditions of the following
|
||||
licenses.
|
||||
|
|
@ -214,9 +214,5 @@ Apache 2.0 licenses
|
|||
The following components are provided under the Apache License. See project link for details.
|
||||
The text of each license is the standard Apache 2.0 license.
|
||||
ScriptRunner from https://github.com/mybatis/mybatis-3 Apache 2.0
|
||||
mvnw files from https://github.com/apache/maven-wrapper Apache 2.0
|
||||
mvnw files from https://github.com/takari/maven-wrapper Apache 2.0
|
||||
PropertyPlaceholderHelper from https://github.com/spring-projects/spring-framework Apache 2.0
|
||||
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
|
||||
|
|
|
|||
36
NOTICE
36
NOTICE
|
|
@ -1,5 +1,5 @@
|
|||
Apache DolphinScheduler
|
||||
Copyright 2019-2022 The Apache Software Foundation
|
||||
Apache DolphinScheduler (incubating)
|
||||
Copyright 2019-2020 The Apache Software Foundation
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
|
@ -23,38 +23,6 @@ iBATIS
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
OGNL
|
||||
//--------------------------------------------------------------------------
|
||||
// Copyright (c) 2004, Drew Davidson and Luke Blanshard
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
// Neither the name of the Drew Davidson nor the names of its contributors
|
||||
// may be used to endorse or promote products derived from this software
|
||||
// without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||
// DAMAGE.
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
Refactored SqlBuilder class (SQL, AbstractSQL)
|
||||
|
||||
This product includes software developed by
|
||||
|
|
|
|||
115
README.md
115
README.md
|
|
@ -1,52 +1,51 @@
|
|||
Dolphin Scheduler Official Website
|
||||
[dolphinscheduler.apache.org](https://dolphinscheduler.apache.org)
|
||||
============
|
||||
|
||||
[](https://www.apache.org/licenses/LICENSE-2.0.html)
|
||||
[](https://github.com/apache/dolphinscheduler)
|
||||
[](https://codecov.io/gh/apache/dolphinscheduler/branch/dev)
|
||||
[](https://github.com/apache/Incubator-DolphinScheduler)
|
||||
[](https://codecov.io/gh/apache/incubator-dolphinscheduler/branch/dev)
|
||||
[](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler)
|
||||
[](https://twitter.com/dolphinschedule)
|
||||
[](https://join.slack.com/t/asf-dolphinscheduler/shared_invite/zt-omtdhuio-_JISsxYhiVsltmC5h38yfw)
|
||||
|
||||
|
||||
> Dolphin Scheduler for Big Data
|
||||
|
||||
|
||||
[](https://starchart.cc/apache/dolphinscheduler)
|
||||
[](https://starchart.cc/apache/incubator-dolphinscheduler)
|
||||
|
||||
[](README.md)
|
||||
[](README_zh_CN.md)
|
||||
|
||||
## Design Features
|
||||
|
||||
DolphinScheduler is a distributed and extensible workflow scheduler platform with powerful DAG visual interfaces, dedicated to solving complex job dependencies in the data pipeline and providing various types of jobs available `out of the box`.
|
||||
### Design features:
|
||||
|
||||
A distributed and easy-to-extend visual DAG workflow scheduling system. Dedicated to solving the complex dependencies in data processing, making the scheduling system `out of the box` for data processing.
|
||||
Its main objectives are as follows:
|
||||
|
||||
- Associate the tasks according to the dependencies of the tasks in a DAG graph, which can visualize the running state of the task in real-time.
|
||||
- Support various task types: Shell, MR, Spark, SQL (MySQL, PostgreSQL, hive, spark SQL), Python, Sub_Process, Procedure, etc.
|
||||
- Support scheduling of workflows and dependencies, manual scheduling to pause/stop/recover task, support failure task retry/alarm, recover specified nodes from failure, kill task, etc.
|
||||
- Support the priority of workflows & tasks, task failover, and task timeout alarm or failure.
|
||||
- Support workflow global parameters and node customized parameter settings.
|
||||
- Support online upload/download/management of resource files, etc. Support online file creation and editing.
|
||||
- Support task log online viewing and scrolling and downloading, etc.
|
||||
- Have implemented cluster HA, decentralize Master cluster and Worker cluster through Zookeeper.
|
||||
- Support the viewing of Master/Worker CPU load, memory, and CPU usage metrics.
|
||||
- Support displaying workflow history in tree/Gantt chart, as well as statistical analysis on the task status & process status in each workflow.
|
||||
- Support back-filling data.
|
||||
- Support multi-tenant.
|
||||
- Support internationalization.
|
||||
- More features waiting for partners to explore...
|
||||
- Associate the Tasks according to the dependencies of the tasks in a DAG graph, which can visualize the running state of task in real time.
|
||||
- Support for many task types: Shell, MR, Spark, SQL (mysql, postgresql, hive, sparksql), Python, Sub_Process, Procedure, etc.
|
||||
- Support process scheduling, dependency scheduling, manual scheduling, manual pause/stop/recovery, support for failed retry/alarm, recovery from specified nodes, Kill task, etc.
|
||||
- Support process priority, task priority and task failover and task timeout alarm/failure
|
||||
- Support process global parameters and node custom parameter settings
|
||||
- Support online upload/download of resource files, management, etc. Support online file creation and editing
|
||||
- Support task log online viewing and scrolling, online download log, etc.
|
||||
- Implement cluster HA, decentralize Master cluster and Worker cluster through Zookeeper
|
||||
- Support online viewing of `Master/Worker` cpu load, memory
|
||||
- Support process running history tree/gantt chart display, support task status statistics, process status statistics
|
||||
- Support backfilling data
|
||||
- Support multi-tenant
|
||||
- Support internationalization
|
||||
- There are more waiting partners to explore
|
||||
|
||||
## 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 | |
|
||||
### What's in Dolphin Scheduler
|
||||
|
||||
## User Interface Screenshots
|
||||
Stability | Easy to use | Features | Scalability |
|
||||
-- | -- | -- | --
|
||||
Decentralized multi-master and multi-worker | Visualization process defines key information such as task status, task type, retry times, task running machine, visual variables and so on at a glance. | Support pause, recover operation | support custom task types
|
||||
HA is supported by itself | All process definition operations are visualized, dragging tasks to draw DAGs, configuring data sources and resources. At the same time, for third-party systems, the api mode operation is provided. | 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 uses distributed scheduling, and the overall scheduling capability will increase linearly with the scale of the cluster. Master and Worker support dynamic online and offline.
|
||||
Overload processing: Task queue mechanism, the number of schedulable tasks on a single machine can be flexibly configured, when too many tasks will be cached in the task queue, will not cause machine jam. | One-click deployment | Supports traditional shell tasks, and also support big data platform task scheduling: MR, Spark, SQL (mysql, postgresql, hive, sparksql), Python, Procedure, Sub_Process | |
|
||||
|
||||
|
||||
### System partial screenshot
|
||||
|
||||

|
||||

|
||||
|
|
@ -57,15 +56,16 @@ Overload processing: By using the task queue mechanism, the number of schedulabl
|
|||

|
||||

|
||||
|
||||
## QuickStart in Docker
|
||||
|
||||
Please refer the official website document: [QuickStart in Docker](https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/guide/installation/docker.html)
|
||||
### Recent R&D plan
|
||||
Work plan of Dolphin Scheduler: [R&D plan](https://github.com/apache/incubator-dolphinscheduler/projects/1), Under the `In Develop` card is what is currently being developed, TODO card is to be done (including feature ideas)
|
||||
|
||||
## QuickStart in Kubernetes
|
||||
### How to contribute
|
||||
|
||||
Please refer to the official website document: [QuickStart in Kubernetes](https://dolphinscheduler.apache.org/en-us/docs/latest/user_doc/guide/installation/kubernetes.html)
|
||||
Welcome to participate in contributing, please refer to the process of submitting the code:
|
||||
[[How to contribute](https://dolphinscheduler.apache.org/en-us/docs/development/contribute.html)]
|
||||
|
||||
## How to Build
|
||||
### How to Build
|
||||
|
||||
```bash
|
||||
./mvnw clean install -Prelease
|
||||
|
|
@ -74,44 +74,21 @@ Please refer to the official website document: [QuickStart in Kubernetes](https:
|
|||
Artifact:
|
||||
|
||||
```
|
||||
dolphinscheduler-dist/target/apache-dolphinscheduler-${latest.release.version}-bin.tar.gz: Binary package of DolphinScheduler
|
||||
dolphinscheduler-dist/target/apache-dolphinscheduler-${latest.release.version}-src.tar.gz: Source code package of DolphinScheduler
|
||||
dolphinscheduler-dist/target/apache-dolphinscheduler-incubating-${latest.release.version}-dolphinscheduler-bin.tar.gz: Binary package of DolphinScheduler
|
||||
dolphinscheduler-dist/target/apache-dolphinscheduler-incubating-${latest.release.version}-src.zip: Source code package of DolphinScheduler
|
||||
```
|
||||
|
||||
## Thanks
|
||||
### Thanks
|
||||
|
||||
DolphinScheduler is based on a lot of excellent open-source projects, such as Google guava, guice, grpc, netty, quartz, and many open-source projects of Apache and so on.
|
||||
We would like to express our deep gratitude to all the open-source projects used in Dolphin Scheduler. We hope that we are not only the beneficiaries of open-source, but also give back to the community. Besides, we hope everyone who have the same enthusiasm and passion for open source could join in and contribute to the open-source community!
|
||||
Dolphin Scheduler uses a lot of excellent open source projects, such as google guava, guice, grpc, netty, ali bonecp, quartz, and many open source projects of apache, etc.
|
||||
It is because of the shoulders of these open source projects that the birth of the Dolphin Scheduler is possible. We are very grateful for all the open source software used! We also hope that we will not only be the beneficiaries of open source, but also be open source contributors. We also hope that partners who have the same passion and conviction for open source will join in and contribute to open source!
|
||||
|
||||
## Get Help
|
||||
### Get Help
|
||||
1. Submit an issue
|
||||
1. Subscribe the mail list : https://dolphinscheduler.apache.org/en-us/docs/development/subscribe.html. then send mail to dev@dolphinscheduler.apache.org
|
||||
1. Slack channel: [](https://join.slack.com/share/zt-do3gvfhj-UUhrAX2GxkVX_~JJt1jpKA)
|
||||
|
||||
1. Submit an [issue](https://github.com/apache/dolphinscheduler/issues/new/choose)
|
||||
2. [Join our slack](https://join.slack.com/t/asf-dolphinscheduler/shared_invite/zt-omtdhuio-_JISsxYhiVsltmC5h38yfw) and send your question to channel `#troubleshooting`
|
||||
|
||||
## Community
|
||||
### License
|
||||
Please refer to [LICENSE](https://github.com/apache/incubator-dolphinscheduler/blob/dev/LICENSE) file.
|
||||
|
||||
You are very welcome to communicate with the developers and users of Dolphin Scheduler. There are two ways to find them:
|
||||
1. Join the Slack channel by [this invitation link](https://join.slack.com/t/asf-dolphinscheduler/shared_invite/zt-omtdhuio-_JISsxYhiVsltmC5h38yfw).
|
||||
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)
|
||||
|
||||
## How to Contribute
|
||||
|
||||
The community welcomes everyone to contribute, please refer to this page to find out more: [How to contribute](https://dolphinscheduler.apache.org/en-us/community/development/contribute.html).
|
||||
|
||||
# Landscapes
|
||||
|
||||
<p align="center">
|
||||
<br/><br/>
|
||||
<img src="https://landscape.cncf.io/images/left-logo.svg" width="150"/> <img src="https://landscape.cncf.io/images/right-logo.svg" width="200"/>
|
||||
<br/><br/>
|
||||
DolphinScheduler enriches the <a href="https://landscape.cncf.io/?landscape=observability-and-analysis&license=apache-license-2-0">CNCF CLOUD NATIVE Landscape.</a >
|
||||
|
||||
</p >
|
||||
|
||||
## License
|
||||
|
||||
Please refer to the [LICENSE](https://github.com/apache/dolphinscheduler/blob/dev/LICENSE) file.
|
||||
|
|
|
|||
|
|
@ -1,26 +1,25 @@
|
|||
Dolphin Scheduler Official Website
|
||||
[dolphinscheduler.apache.org](https://dolphinscheduler.apache.org)
|
||||
============
|
||||
|
||||
[](https://www.apache.org/licenses/LICENSE-2.0.html)
|
||||
[](https://github.com/apache/dolphinscheduler)
|
||||
[](https://codecov.io/gh/apache/dolphinscheduler/branch/dev)
|
||||
[](https://github.com/apache/Incubator-DolphinScheduler)
|
||||
[](https://codecov.io/gh/apache/incubator-dolphinscheduler/branch/dev)
|
||||
[](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler)
|
||||
|
||||
> Dolphin Scheduler for Big Data
|
||||
|
||||
[](https://starchart.cc/apache/dolphinscheduler)
|
||||
|
||||
|
||||
[](https://starchart.cc/apache/incubator-dolphinscheduler)
|
||||
|
||||
[](README_zh_CN.md)
|
||||
[](README.md)
|
||||
|
||||
## 设计特点
|
||||
|
||||
一个分布式易扩展的可视化DAG工作流任务调度系统。致力于解决数据处理流程中错综复杂的依赖关系,使调度系统在数据处理流程中`开箱即用`。
|
||||
|
||||
**设计特点:** 一个分布式易扩展的可视化DAG工作流任务调度系统。致力于解决数据处理流程中错综复杂的依赖关系,使调度系统在数据处理流程中`开箱即用`。
|
||||
其主要目标如下:
|
||||
|
||||
- 以DAG图的方式将Task按照任务的依赖关系关联起来,可实时可视化监控任务的运行状态
|
||||
- 支持丰富的任务类型:Shell、MR、Spark、SQL(mysql、postgresql、hive、sparksql)、Python、Sub_Process、Procedure等
|
||||
- 支持丰富的任务类型:Shell、MR、Spark、SQL(mysql、postgresql、hive、sparksql),Python,Sub_Process、Procedure等
|
||||
- 支持工作流定时调度、依赖调度、手动调度、手动暂停/停止/恢复,同时支持失败重试/告警、从指定节点恢复失败、Kill任务等操作
|
||||
- 支持工作流优先级、任务优先级及任务的故障转移及任务超时告警/失败
|
||||
- 支持工作流全局参数及节点自定义参数设置
|
||||
|
|
@ -34,7 +33,8 @@ Dolphin Scheduler Official Website
|
|||
- 支持国际化
|
||||
- 还有更多等待伙伴们探索
|
||||
|
||||
## 系统部分截图
|
||||
|
||||
### 系统部分截图
|
||||
|
||||

|
||||
|
||||
|
|
@ -50,51 +50,51 @@ Dolphin Scheduler Official Website
|
|||
|
||||

|
||||
|
||||
## 近期研发计划
|
||||
### 我要体验
|
||||
|
||||
DolphinScheduler的工作计划:<a href="https://github.com/apache/dolphinscheduler/projects/1" target="_blank">研发计划</a> ,其中 In Develop卡片下是正在研发的功能,TODO卡片是待做事项(包括 feature ideas)
|
||||
- <a href="http://106.75.43.194:8888" target="_blank">我要体验</a>
|
||||
|
||||
## 参与贡献
|
||||
|
||||
### 近期研发计划
|
||||
|
||||
DolphinScheduler的工作计划:<a href="https://github.com/apache/incubator-dolphinscheduler/projects/1" target="_blank">研发计划</a> ,其中 In Develop卡片下是正在研发的功能,TODO卡片是待做事项(包括 feature ideas)
|
||||
|
||||
### 参与贡献
|
||||
|
||||
非常欢迎大家来参与贡献,贡献流程请参考:
|
||||
[[参与贡献](https://dolphinscheduler.apache.org/zh-cn/community/development/contribute.html)]
|
||||
[[参与贡献](https://dolphinscheduler.apache.org/zh-cn/docs/development/contribute.html)]
|
||||
|
||||
## 快速试用 Docker
|
||||
|
||||
请参考官方文档: [快速试用 Docker 部署](http://dolphinscheduler.apache.org/zh-cn/docs/latest/user_doc/guide/installation/docker.html)
|
||||
|
||||
## 快速试用 Kubernetes
|
||||
|
||||
请参考官方文档: [快速试用 Kubernetes 部署](http://dolphinscheduler.apache.org/zh-cn/docs/latest/user_doc/guide/installation/kubernetes.html)
|
||||
|
||||
## 如何构建
|
||||
### How to Build
|
||||
|
||||
```bash
|
||||
./mvnw clean install -Prelease
|
||||
```
|
||||
|
||||
制品:
|
||||
Artifact:
|
||||
|
||||
```
|
||||
dolphinscheduler-dist/target/apache-dolphinscheduler-${latest.release.version}-bin.tar.gz: DolphinScheduler 二进制包
|
||||
dolphinscheduler-dist/target/apache-dolphinscheduler-${latest.release.version}-src.tar.gz: DolphinScheduler 源代码包
|
||||
dolphinscheduler-dist/target/apache-dolphinscheduler-incubating-${latest.release.version}-dolphinscheduler-bin.tar.gz: Binary package of DolphinScheduler
|
||||
dolphinscheduler-dist/target/apache-dolphinscheduler-incubating-${latest.release.version}-src.zip: Source code package of DolphinScheduler
|
||||
```
|
||||
|
||||
## 感谢
|
||||
### 感谢
|
||||
|
||||
Dolphin Scheduler使用了很多优秀的开源项目,比如google的guava、guice、grpc,netty,quartz,以及apache的众多开源项目等等,
|
||||
Dolphin Scheduler使用了很多优秀的开源项目,比如google的guava、guice、grpc,netty,ali的bonecp,quartz,以及apache的众多开源项目等等,
|
||||
正是由于站在这些开源项目的肩膀上,才有Dolphin Scheduler的诞生的可能。对此我们对使用的所有开源软件表示非常的感谢!我们也希望自己不仅是开源的受益者,也能成为开源的贡献者,也希望对开源有同样热情和信念的伙伴加入进来,一起为开源献出一份力!
|
||||
|
||||
## 获得帮助
|
||||
|
||||
1. 提交 [issue](https://github.com/apache/dolphinscheduler/issues/new/choose)
|
||||
2. [加入slack群](https://join.slack.com/t/asf-dolphinscheduler/shared_invite/zt-omtdhuio-_JISsxYhiVsltmC5h38yfw) 并在频道 `#troubleshooting` 中提问
|
||||
### 获得帮助
|
||||
1. 提交issue
|
||||
1. 先订阅邮件开发列表:[订阅邮件列表](https://dolphinscheduler.apache.org/zh-cn/docs/development/subscribe.html), 订阅成功后发送邮件到dev@dolphinscheduler.apache.org.
|
||||
1. 联系微信群助手(ID:dailidong66). 微信仅用于中国用户讨论.
|
||||
|
||||
### 版权
|
||||
请参考 [LICENSE](https://github.com/apache/incubator-dolphinscheduler/blob/dev/LICENSE) 文件.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 社区
|
||||
|
||||
1. 通过[该申请链接](https://join.slack.com/t/asf-dolphinscheduler/shared_invite/zt-omtdhuio-_JISsxYhiVsltmC5h38yfw)加入slack channel
|
||||
2. 关注[Apache Dolphin Scheduler的Twitter账号](https://twitter.com/dolphinschedule)获取实时动态
|
||||
|
||||
## 版权
|
||||
|
||||
请参考 [LICENSE](https://github.com/apache/dolphinscheduler/blob/dev/LICENSE) 文件.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,132 @@
|
|||
### 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-incubating/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-incubating-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
|
||||
|
||||

|
||||
|
|
@ -0,0 +1,158 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,158 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
<!--
|
||||
~ 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</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>
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<!--
|
||||
~ 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>
|
||||
</configuration>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
<?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-incubating*</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>
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
"""
|
||||
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
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
"""
|
||||
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()
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
"""
|
||||
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()
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
"""
|
||||
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
|
||||
)
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
"""
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
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()
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
# -*- 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()
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
"""
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
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()
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
"""
|
||||
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"
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""
|
||||
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()
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
"""
|
||||
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/"
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
#!/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 -Xms4g -Xss512k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -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."
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,661 @@
|
|||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,158 @@
|
|||
{
|
||||
"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.4/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.4/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.4/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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,158 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,206 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
<!--
|
||||
~ 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</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>
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<!--
|
||||
~ 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>
|
||||
</configuration>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<!--
|
||||
~ 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>
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
<?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.4</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-incubating*</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>
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
"""
|
||||
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
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
"""
|
||||
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()
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
"""
|
||||
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()
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
"""
|
||||
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
|
||||
)
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
"""
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
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()
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
# -*- 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()
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
"""
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
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()
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
"""
|
||||
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"
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
"""
|
||||
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()
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
"""
|
||||
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/"
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# 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 %}
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
#!/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 -Xms4g -Xss512k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -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."
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue