diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index 510e9b0a34..0103282ae3 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -7,10 +7,7 @@ assignees: ''
---
-*For better global communication, please give priority to using English description, thx! *
-
-*Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.*
-
+**For better global communication, Please describe it in English. If you feel the description in English is not clear, then you can append description in Chinese(just for Mandarin(CN)), thx! **
**Describe the bug**
A clear and concise description of what the bug is.
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md
index 4c8ec568dd..6fdb06ea6c 100644
--- a/.github/ISSUE_TEMPLATE/question.md
+++ b/.github/ISSUE_TEMPLATE/question.md
@@ -7,10 +7,7 @@ assignees: ''
---
-*For better global communication, please give priority to using English description, thx! *
-
-*Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.*
-
+**For better global communication, Please describe it in English. If you feel the description in English is not clear, then you can append description in Chinese(just for Mandarin(CN)), thx! **
**Describe the question**
A clear and concise description of what the question is.
diff --git a/.github/ISSUE_TEMPLATE/test.md b/.github/ISSUE_TEMPLATE/test.md
deleted file mode 100644
index 3f8715351e..0000000000
--- a/.github/ISSUE_TEMPLATE/test.md
+++ /dev/null
@@ -1,24 +0,0 @@
----
-name: Test
-about: Test to enhance the robustness of this project
-title: "[Test][Module Name] Test title"
-labels: test
-assignees: ''
-
----
-
-*For better global communication, please give priority to using English description, thx! *
-
-*Please review https://dolphinscheduler.apache.org/en-us/docs/development/issue.html when describe an issue.*
-
-**Describe the question**
-A clear and concise description of what the test part is.
-
-**What are the current deficiencies and the benefits of changing or adding this test**
-- A clear and concise description of the current deficiencies, the benefits of changing or adding this test, and the scope involved.
-
-**Which version of DolphinScheduler:**
- -[1.1.0-preview]
-
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions you've considered.
\ No newline at end of file
diff --git a/.github/workflows/ci_frontend.yml b/.github/workflows/ci_frontend.yml
index b8e11252c8..1feaabaeb3 100644
--- a/.github/workflows/ci_frontend.yml
+++ b/.github/workflows/ci_frontend.yml
@@ -52,7 +52,6 @@ jobs:
npm install
npm run lint
npm run build
-
License-check:
runs-on: ubuntu-latest
steps:
@@ -68,4 +67,4 @@ jobs:
with:
java-version: 1.8
- name: Check
- run: mvn -B apache-rat:check
+ run: mvn -B apache-rat:check
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 7a99e2e4b0..7cf1d4d7db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,25 +4,27 @@
.zip
.gz
.DS_Store
+.idea
.idea/
-dist/
-all-dependencies.txt
-self-modules.txt
-third-party-dependencies.txt
-**/target/
+.idea/*
+.target
+.target/
+**/**/target/**
+target/*
+*/target
+*/target/*
.settings
.nbproject
.classpath
.project
-**/*.iml
+*.iml
*.ipr
*.iws
*.tgz
.*.swp
-.factorypath
.vim
.tmp
-**/node_modules
+node_modules
npm-debug.log
.vscode
logs/*
@@ -39,10 +41,110 @@ 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-dao/src/main/resources/dao/data_source.properties
+dolphinscheduler-ui/dist/css/common.16ac5d9.css
+dolphinscheduler-ui/dist/css/home/index.b444b91.css
+dolphinscheduler-ui/dist/css/login/index.5866c64.css
+dolphinscheduler-ui/dist/js/0.ac94e5d.js
+dolphinscheduler-ui/dist/js/0.ac94e5d.js.map
+dolphinscheduler-ui/dist/js/1.0b043a3.js
+dolphinscheduler-ui/dist/js/1.0b043a3.js.map
+dolphinscheduler-ui/dist/js/10.1bce3dc.js
+dolphinscheduler-ui/dist/js/10.1bce3dc.js.map
+dolphinscheduler-ui/dist/js/11.79f04d8.js
+dolphinscheduler-ui/dist/js/11.79f04d8.js.map
+dolphinscheduler-ui/dist/js/12.420daa5.js
+dolphinscheduler-ui/dist/js/12.420daa5.js.map
+dolphinscheduler-ui/dist/js/13.e5bae1c.js
+dolphinscheduler-ui/dist/js/13.e5bae1c.js.map
+dolphinscheduler-ui/dist/js/14.f2a0dca.js
+dolphinscheduler-ui/dist/js/14.f2a0dca.js.map
+dolphinscheduler-ui/dist/js/15.45373e8.js
+dolphinscheduler-ui/dist/js/15.45373e8.js.map
+dolphinscheduler-ui/dist/js/16.fecb0fc.js
+dolphinscheduler-ui/dist/js/16.fecb0fc.js.map
+dolphinscheduler-ui/dist/js/17.84be279.js
+dolphinscheduler-ui/dist/js/17.84be279.js.map
+dolphinscheduler-ui/dist/js/18.307ea70.js
+dolphinscheduler-ui/dist/js/18.307ea70.js.map
+dolphinscheduler-ui/dist/js/19.144db9c.js
+dolphinscheduler-ui/dist/js/19.144db9c.js.map
+dolphinscheduler-ui/dist/js/2.8b4ef29.js
+dolphinscheduler-ui/dist/js/2.8b4ef29.js.map
+dolphinscheduler-ui/dist/js/20.4c527e9.js
+dolphinscheduler-ui/dist/js/20.4c527e9.js.map
+dolphinscheduler-ui/dist/js/21.831b2a2.js
+dolphinscheduler-ui/dist/js/21.831b2a2.js.map
+dolphinscheduler-ui/dist/js/22.2b4bb2a.js
+dolphinscheduler-ui/dist/js/22.2b4bb2a.js.map
+dolphinscheduler-ui/dist/js/23.81467ef.js
+dolphinscheduler-ui/dist/js/23.81467ef.js.map
+dolphinscheduler-ui/dist/js/24.54a00e4.js
+dolphinscheduler-ui/dist/js/24.54a00e4.js.map
+dolphinscheduler-ui/dist/js/25.8d7bd36.js
+dolphinscheduler-ui/dist/js/25.8d7bd36.js.map
+dolphinscheduler-ui/dist/js/26.2ec5e78.js
+dolphinscheduler-ui/dist/js/26.2ec5e78.js.map
+dolphinscheduler-ui/dist/js/27.3ab48c2.js
+dolphinscheduler-ui/dist/js/27.3ab48c2.js.map
+dolphinscheduler-ui/dist/js/28.363088a.js
+dolphinscheduler-ui/dist/js/28.363088a.js.map
+dolphinscheduler-ui/dist/js/29.6c5853a.js
+dolphinscheduler-ui/dist/js/29.6c5853a.js.map
+dolphinscheduler-ui/dist/js/3.a0edb5b.js
+dolphinscheduler-ui/dist/js/3.a0edb5b.js.map
+dolphinscheduler-ui/dist/js/30.940fdd3.js
+dolphinscheduler-ui/dist/js/30.940fdd3.js.map
+dolphinscheduler-ui/dist/js/31.168a460.js
+dolphinscheduler-ui/dist/js/31.168a460.js.map
+dolphinscheduler-ui/dist/js/32.8df6594.js
+dolphinscheduler-ui/dist/js/32.8df6594.js.map
+dolphinscheduler-ui/dist/js/33.4480bbe.js
+dolphinscheduler-ui/dist/js/33.4480bbe.js.map
+dolphinscheduler-ui/dist/js/34.b407fe1.js
+dolphinscheduler-ui/dist/js/34.b407fe1.js.map
+dolphinscheduler-ui/dist/js/35.f340b0a.js
+dolphinscheduler-ui/dist/js/35.f340b0a.js.map
+dolphinscheduler-ui/dist/js/36.8880c2d.js
+dolphinscheduler-ui/dist/js/36.8880c2d.js.map
+dolphinscheduler-ui/dist/js/37.ea2a25d.js
+dolphinscheduler-ui/dist/js/37.ea2a25d.js.map
+dolphinscheduler-ui/dist/js/38.98a59ee.js
+dolphinscheduler-ui/dist/js/38.98a59ee.js.map
+dolphinscheduler-ui/dist/js/39.a5e958a.js
+dolphinscheduler-ui/dist/js/39.a5e958a.js.map
+dolphinscheduler-ui/dist/js/4.4ca44db.js
+dolphinscheduler-ui/dist/js/4.4ca44db.js.map
+dolphinscheduler-ui/dist/js/40.e187b1e.js
+dolphinscheduler-ui/dist/js/40.e187b1e.js.map
+dolphinscheduler-ui/dist/js/41.0e89182.js
+dolphinscheduler-ui/dist/js/41.0e89182.js.map
+dolphinscheduler-ui/dist/js/42.341047c.js
+dolphinscheduler-ui/dist/js/42.341047c.js.map
+dolphinscheduler-ui/dist/js/43.27b8228.js
+dolphinscheduler-ui/dist/js/43.27b8228.js.map
+dolphinscheduler-ui/dist/js/44.e8869bc.js
+dolphinscheduler-ui/dist/js/44.e8869bc.js.map
+dolphinscheduler-ui/dist/js/45.8d54901.js
+dolphinscheduler-ui/dist/js/45.8d54901.js.map
+dolphinscheduler-ui/dist/js/5.e1ed7f3.js
+dolphinscheduler-ui/dist/js/5.e1ed7f3.js.map
+dolphinscheduler-ui/dist/js/6.241ba07.js
+dolphinscheduler-ui/dist/js/6.241ba07.js.map
+dolphinscheduler-ui/dist/js/7.ab2e297.js
+dolphinscheduler-ui/dist/js/7.ab2e297.js.map
+dolphinscheduler-ui/dist/js/8.83ff814.js
+dolphinscheduler-ui/dist/js/8.83ff814.js.map
+dolphinscheduler-ui/dist/js/9.39cb29f.js
+dolphinscheduler-ui/dist/js/9.39cb29f.js.map
+dolphinscheduler-ui/dist/js/common.733e342.js
+dolphinscheduler-ui/dist/js/common.733e342.js.map
+dolphinscheduler-ui/dist/js/home/index.78a5d12.js
+dolphinscheduler-ui/dist/js/home/index.78a5d12.js.map
+dolphinscheduler-ui/dist/js/login/index.291b8e3.js
+dolphinscheduler-ui/dist/js/login/index.291b8e3.js.map
+dolphinscheduler-ui/dist/lib/external/
+dolphinscheduler-ui/src/js/conf/home/pages/projects/pages/taskInstance/index.vue
+/dolphinscheduler-dao/src/main/resources/dao/data_source.properties
-.mvn/wrapper/*.jar
-
-!/zookeeper_data/
diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 0000000000..2cc7d4a55c
Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-application.xml b/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-application.xml
deleted file mode 100644
index 6e50a1b649..0000000000
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-application.xml
+++ /dev/null
@@ -1,467 +0,0 @@
-
-
-
- spring.datasource.initialSize
- 5
-
- Init connection number
-
-
- int
-
-
-
-
- spring.datasource.minIdle
- 5
-
- Min connection number
-
-
- int
-
-
-
-
- spring.datasource.maxActive
- 50
-
- Max connection number
-
-
- int
-
-
-
-
- spring.datasource.maxWait
- 60000
-
- 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.
-
-
- int
-
-
-
-
- spring.datasource.timeBetweenEvictionRunsMillis
- 60000
-
- Milliseconds for check to close free connections
-
-
- int
-
-
-
-
- spring.datasource.timeBetweenConnectErrorMillis
- 60000
-
- 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.
-
-
- int
-
-
-
-
- spring.datasource.minEvictableIdleTimeMillis
- 300000
-
- The longest time a connection remains idle without being evicted, in milliseconds
-
-
- int
-
-
-
-
- spring.datasource.validationQuery
- SELECT 1
-
- 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.
-
-
-
-
- spring.datasource.validationQueryTimeout
- 3
-
- int
-
-
- Check whether the connection is valid for timeout, in seconds
-
-
-
-
- spring.datasource.testWhileIdle
- true
-
- boolean
-
-
- 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
-
-
-
-
- spring.datasource.testOnBorrow
- true
-
- boolean
-
-
- Execute validation to check if the connection is valid when applying for a connection
-
-
-
-
- spring.datasource.testOnReturn
- false
-
- boolean
-
-
- Execute validation to check if the connection is valid when the connection is returned
-
-
-
-
- spring.datasource.defaultAutoCommit
- true
-
- boolean
-
-
-
-
-
-
- spring.datasource.keepAlive
- false
-
- boolean
-
-
-
-
-
-
-
- spring.datasource.poolPreparedStatements
- true
-
- boolean
-
-
- Open PSCache, specify count PSCache for every connection
-
-
-
-
- spring.datasource.maxPoolPreparedStatementPerConnectionSize
- 20
-
- int
-
-
-
-
-
- spring.datasource.spring.datasource.filters
- stat,wall,log4j
-
-
-
-
- spring.datasource.connectionProperties
- druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-
-
-
-
-
- mybatis-plus.mapper-locations
- classpath*:/org.apache.dolphinscheduler.dao.mapper/*.xml
-
-
-
-
- mybatis-plus.typeEnumsPackage
- org.apache.dolphinscheduler.*.enums
-
-
-
-
- mybatis-plus.typeAliasesPackage
- org.apache.dolphinscheduler.dao.entity
-
- Entity scan, where multiple packages are separated by a comma or semicolon
-
-
-
-
- mybatis-plus.global-config.db-config.id-type
- AUTO
-
- value-list
-
-
- AUTO
-
-
-
- INPUT
-
-
-
- ID_WORKER
-
-
-
- UUID
-
-
-
- 1
-
-
- Primary key type AUTO:" database ID AUTO ",
- INPUT:" user INPUT ID",
- ID_WORKER:" global unique ID (numeric type unique ID)",
- UUID:" global unique ID UUID";
-
-
-
-
- mybatis-plus.global-config.db-config.field-strategy
- NOT_NULL
-
- value-list
-
-
- IGNORED
-
-
-
- NOT_NULL
-
-
-
- NOT_EMPTY
-
-
-
- 1
-
-
- Field policy IGNORED:" ignore judgment ",
- NOT_NULL:" not NULL judgment "),
- NOT_EMPTY:" not NULL judgment"
-
-
-
-
- mybatis-plus.global-config.db-config.column-underline
- true
-
- boolean
-
-
-
-
-
- mybatis-plus.global-config.db-config.logic-delete-value
- 1
-
- int
-
-
-
-
-
- mybatis-plus.global-config.db-config.logic-not-delete-value
- 0
-
- int
-
-
-
-
-
- mybatis-plus.global-config.db-config.banner
- true
-
- boolean
-
-
-
-
-
-
- mybatis-plus.configuration.map-underscore-to-camel-case
- true
-
- boolean
-
-
-
-
-
- mybatis-plus.configuration.cache-enabled
- false
-
- boolean
-
-
-
-
-
- mybatis-plus.configuration.call-setters-on-nulls
- true
-
- boolean
-
-
-
-
-
- mybatis-plus.configuration.jdbc-type-for-null
- null
-
-
-
-
- master.exec.threads
- 100
-
- int
-
-
-
-
-
- master.exec.task.num
- 20
-
- int
-
-
-
-
-
- master.heartbeat.interval
- 10
-
- int
-
-
-
-
-
- master.task.commit.retryTimes
- 5
-
- int
-
-
-
-
-
- master.task.commit.interval
- 1000
-
- int
-
-
-
-
-
- master.max.cpuload.avg
- 100
-
- int
-
-
-
-
-
- master.reserved.memory
- 0.1
-
- float
-
-
-
-
-
- worker.exec.threads
- 100
-
- int
-
-
-
-
-
- worker.heartbeat.interval
- 10
-
- int
-
-
-
-
-
- worker.fetch.task.num
- 3
-
- int
-
-
-
-
-
- worker.max.cpuload.avg
- 100
-
- int
-
-
-
-
-
- worker.reserved.memory
- 0.1
-
- float
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/alerts.json b/ambari_plugin/common-services/DOLPHIN/1.3.3/alerts.json
similarity index 95%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/alerts.json
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/alerts.json
index 769245b366..184f021ac3 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/alerts.json
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/alerts.json
@@ -65,7 +65,7 @@
"enabled": true,
"source": {
"type": "SCRIPT",
- "path": "DOLPHIN/1.2.1/package/alerts/alert_dolphin_scheduler_status.py",
+ "path": "DOLPHIN/1.3.3/package/alerts/alert_dolphin_scheduler_status.py",
"parameters": [
{
@@ -98,7 +98,7 @@
"enabled": true,
"source": {
"type": "SCRIPT",
- "path": "DOLPHIN/1.2.1/package/alerts/alert_dolphin_scheduler_status.py",
+ "path": "DOLPHIN/1.3.3/package/alerts/alert_dolphin_scheduler_status.py",
"parameters": [
{
@@ -131,7 +131,7 @@
"enabled": true,
"source": {
"type": "SCRIPT",
- "path": "DOLPHIN/1.2.1/package/alerts/alert_dolphin_scheduler_status.py",
+ "path": "DOLPHIN/1.3.3/package/alerts/alert_dolphin_scheduler_status.py",
"parameters": [
{
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-alert.xml b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-alert.xml
similarity index 95%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-alert.xml
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-alert.xml
index 5b82230148..32abcc791d 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-alert.xml
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-alert.xml
@@ -90,13 +90,6 @@
-
- xls.file.path
- /tmp/xls
-
-
-
-
enterprise.wechat.enable
false
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-application-api.xml b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-application-api.xml
similarity index 82%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-application-api.xml
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-application-api.xml
index ea4cb82afd..766c0f477d 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-application-api.xml
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-application-api.xml
@@ -34,6 +34,12 @@
+
+ server.servlet.context-path
+ /dolphinscheduler/
+
+
+
spring.servlet.multipart.max-file-size
1024
@@ -68,4 +74,14 @@
UTF-8
+
+ spring.messages.basename
+ i18n/messages
+
+
+
+ security.authentication.type
+ PASSWORD
+
+
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-common.xml b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-common.xml
similarity index 100%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-common.xml
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-common.xml
diff --git a/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-datasource.xml b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-datasource.xml
new file mode 100644
index 0000000000..02d8de0482
--- /dev/null
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-datasource.xml
@@ -0,0 +1,206 @@
+
+
+
+ spring.datasource.initialSize
+ 5
+
+ Init connection number
+
+
+ int
+
+
+
+
+ spring.datasource.minIdle
+ 5
+
+ Min connection number
+
+
+ int
+
+
+
+
+ spring.datasource.maxActive
+ 50
+
+ Max connection number
+
+
+ int
+
+
+
+
+ spring.datasource.maxWait
+ 60000
+
+ 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.
+
+
+ int
+
+
+
+
+ spring.datasource.timeBetweenEvictionRunsMillis
+ 60000
+
+ Milliseconds for check to close free connections
+
+
+ int
+
+
+
+
+ spring.datasource.timeBetweenConnectErrorMillis
+ 60000
+
+ 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.
+
+
+ int
+
+
+
+
+ spring.datasource.minEvictableIdleTimeMillis
+ 300000
+
+ The longest time a connection remains idle without being evicted, in milliseconds
+
+
+ int
+
+
+
+
+ spring.datasource.validationQuery
+ SELECT 1
+
+ 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.
+
+
+
+
+ spring.datasource.validationQueryTimeout
+ 3
+
+ int
+
+
+ Check whether the connection is valid for timeout, in seconds
+
+
+
+
+ spring.datasource.testWhileIdle
+ true
+
+ boolean
+
+
+ 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
+
+
+
+
+ spring.datasource.testOnBorrow
+ true
+
+ boolean
+
+
+ Execute validation to check if the connection is valid when applying for a connection
+
+
+
+
+ spring.datasource.testOnReturn
+ false
+
+ boolean
+
+
+ Execute validation to check if the connection is valid when the connection is returned
+
+
+
+
+ spring.datasource.defaultAutoCommit
+ true
+
+ boolean
+
+
+
+
+
+
+ spring.datasource.keepAlive
+ false
+
+ boolean
+
+
+
+
+
+
+
+ spring.datasource.poolPreparedStatements
+ true
+
+ boolean
+
+
+ Open PSCache, specify count PSCache for every connection
+
+
+
+
+ spring.datasource.maxPoolPreparedStatementPerConnectionSize
+ 20
+
+ int
+
+
+
+
+
+ spring.datasource.spring.datasource.filters
+ stat,wall,log4j
+
+
+
+
+ spring.datasource.connectionProperties
+ druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
+
+
+
+
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-env.xml b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-env.xml
similarity index 100%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-env.xml
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-env.xml
diff --git a/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-master.xml b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-master.xml
new file mode 100644
index 0000000000..c8eec047fc
--- /dev/null
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-master.xml
@@ -0,0 +1,88 @@
+
+
+
+ master.exec.threads
+ 100
+
+ int
+
+ master execute thread num
+
+
+
+ master.exec.task.num
+ 20
+
+ int
+
+ master execute task number in parallel
+
+
+
+ master.heartbeat.interval
+ 10
+
+ int
+
+ master heartbeat interval
+
+
+
+ master.task.commit.retryTimes
+ 5
+
+ int
+
+ master commit task retry times
+
+
+
+ master.task.commit.interval
+ 1000
+
+ int
+
+ master commit task interval
+
+
+
+ master.max.cpuload.avg
+ 100
+
+ int
+
+ only less than cpu avg load, master server can work. default value : the number of cpu cores * 2
+
+
+
+ master.reserved.memory
+ 0.3
+ only larger than reserved memory, master server can work. default value : physical memory * 1/10, unit is G.
+
+
+
+
+ master.listen.port
+ 5678
+
+ int
+
+ master listen port
+
+
+
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-quartz.xml b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-quartz.xml
similarity index 91%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-quartz.xml
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-quartz.xml
index 82b59d8827..7a0c68b051 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/configuration/dolphin-quartz.xml
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-quartz.xml
@@ -106,26 +106,21 @@
- org.quartz.jobStore.dataSource
- myDs
-
-
-
- org.quartz.dataSource.myDs.connectionProvider.class
- org.apache.dolphinscheduler.server.quartz.DruidConnectionProvider
+ org.quartz.jobStore.acquireTriggersWithinLock
+ true
+
+ boolean
+
- org.quartz.dataSource.myDs.maxConnections
- 10
-
- int
-
+ org.quartz.jobStore.dataSource
+ myDs
- org.quartz.dataSource.myDs.validationQuery
- select 1
+ org.quartz.dataSource.myDs.connectionProvider.class
+ org.apache.dolphinscheduler.service.quartz.DruidConnectionProvider
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-worker.xml b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-worker.xml
new file mode 100644
index 0000000000..1ae7a1a765
--- /dev/null
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-worker.xml
@@ -0,0 +1,67 @@
+
+
+
+ worker.exec.threads
+ 100
+
+ int
+
+ worker execute thread num
+
+
+
+ worker.heartbeat.interval
+ 10
+
+ int
+
+ worker heartbeat interval
+
+
+
+ worker.max.cpuload.avg
+ 100
+
+ int
+
+ only less than cpu avg load, worker server can work. default value : the number of cpu cores * 2
+
+
+
+ worker.reserved.memory
+ 0.3
+ only larger than reserved memory, worker server can work. default value : physical memory * 1/10, unit is G.
+
+
+
+
+ worker.listen.port
+ 1234
+
+ int
+
+ worker listen port
+
+
+
+ worker.groups
+ default
+ default worker group
+
+
+
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-zookeeper.xml b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-zookeeper.xml
new file mode 100644
index 0000000000..e89962d900
--- /dev/null
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/configuration/dolphin-zookeeper.xml
@@ -0,0 +1,76 @@
+
+
+
+ zookeeper.dolphinscheduler.root
+ /dolphinscheduler
+
+ dolphinscheduler root directory
+
+
+
+
+ zookeeper.session.timeout
+ 300
+
+ int
+
+
+
+
+
+
+ zookeeper.connection.timeout
+ 300
+
+ int
+
+
+
+
+
+
+ zookeeper.retry.base.sleep
+ 100
+
+ int
+
+
+
+
+
+
+ zookeeper.retry.max.sleep
+ 30000
+
+ int
+
+
+
+
+
+
+ zookeeper.retry.maxtime
+ 5
+
+ int
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/metainfo.xml b/ambari_plugin/common-services/DOLPHIN/1.3.3/metainfo.xml
similarity index 98%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/metainfo.xml
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/metainfo.xml
index 0d2bbe3163..074306d5cb 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/metainfo.xml
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/metainfo.xml
@@ -22,7 +22,7 @@
DOLPHIN
Dolphin Scheduler
分布式易扩展的可视化DAG工作流任务调度系统
- 1.2.1
+ 1.3.3
DOLPHIN_MASTER
@@ -103,7 +103,7 @@
any
- apache-dolphinscheduler-incubating-1.2.1*
+ apache-dolphinscheduler-incubating*
@@ -134,4 +134,4 @@
-
+
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/alerts/alert_dolphin_scheduler_status.py b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/alerts/alert_dolphin_scheduler_status.py
similarity index 100%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/alerts/alert_dolphin_scheduler_status.py
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/alerts/alert_dolphin_scheduler_status.py
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_alert_service.py b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_alert_service.py
similarity index 92%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_alert_service.py
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_alert_service.py
index 62255a3432..e78c38d272 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_alert_service.py
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_alert_service.py
@@ -26,7 +26,8 @@ class DolphinAlertService(Script):
import params
env.set_params(params)
self.install_packages(env)
- Execute(('chmod', '-R', '777', params.dolphin_home), user=params.dolphin_user, sudo=True)
+ 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
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_api_service.py b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_api_service.py
similarity index 93%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_api_service.py
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_api_service.py
index bdc18fb602..5a28924a9a 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_api_service.py
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_api_service.py
@@ -26,7 +26,8 @@ class DolphinApiService(Script):
import params
env.set_params(params)
self.install_packages(env)
- Execute(('chmod', '-R', '777', params.dolphin_home), user=params.dolphin_user, sudo=True)
+ 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
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_env.py b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_env.py
similarity index 78%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_env.py
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_env.py
index 235605894f..1661d76c75 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_env.py
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_env.py
@@ -42,31 +42,12 @@ def dolphin_env():
create_parents=True
)
-
- Directory(params.dolphin_alert_map['xls.file.path'],
- 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
)
- Directory(params.dolphin_common_map['data.download.basedir.path'],
- mode=0777,
- owner=params.dolphin_user,
- group=params.dolphin_group,
- create_parents=True
- )
- Directory(params.dolphin_common_map['process.exec.basepath'],
- mode=0777,
- owner=params.dolphin_user,
- group=params.dolphin_group,
- create_parents=True
- )
File(format(params.dolphin_env_path),
@@ -79,11 +60,25 @@ def dolphin_env():
File(format(params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh"),
mode=0755,
- content=Template("dolphin-daemon.j2"),
+ 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,
@@ -92,9 +87,9 @@ def dolphin_env():
group=params.dolphin_group
)
- File(format(params.dolphin_conf_dir + "/application.properties"),
+ File(format(params.dolphin_conf_dir + "/datasource.properties"),
mode=0755,
- content=Template("application.properties.j2"),
+ content=Template("datasource.properties.j2"),
owner=params.dolphin_user,
group=params.dolphin_group
)
@@ -119,3 +114,10 @@ def dolphin_env():
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
+ )
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_logger_service.py b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_logger_service.py
similarity index 92%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_logger_service.py
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_logger_service.py
index f1c19bd66f..fb47e132e1 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_logger_service.py
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_logger_service.py
@@ -26,8 +26,8 @@ class DolphinLoggerService(Script):
import params
env.set_params(params)
self.install_packages(env)
- Execute(('chmod', '-R', '777', params.dolphin_home), user=params.dolphin_user, sudo=True)
-
+ 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
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_master_service.py b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_master_service.py
similarity index 92%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_master_service.py
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_master_service.py
index 6ee7ecfcf3..8d64935d26 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_master_service.py
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_master_service.py
@@ -27,7 +27,8 @@ class DolphinMasterService(Script):
import params
env.set_params(params)
self.install_packages(env)
- Execute(('chmod', '-R', '777', params.dolphin_home), user=params.dolphin_user, sudo=True)
+ 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
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_worker_service.py b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_worker_service.py
similarity index 92%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_worker_service.py
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_worker_service.py
index 2d145ee730..1f542c06c2 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_worker_service.py
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/dolphin_worker_service.py
@@ -26,7 +26,8 @@ class DolphinWorkerService(Script):
import params
env.set_params(params)
self.install_packages(env)
- Execute(('chmod', '-R', '777', params.dolphin_home), user=params.dolphin_user, sudo=True)
+ 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
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/params.py b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/params.py
similarity index 68%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/params.py
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/params.py
index 049b2cf3ae..5a9994f559 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/params.py
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/params.py
@@ -54,11 +54,8 @@ 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_host'] = dolphin_env_map['dolphin.database.host']
-dolphin_database_config['dolphin_database_port'] = dolphin_env_map['dolphin.database.port']
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'
@@ -72,6 +69,10 @@ else:
+ ':' + 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'
@@ -79,27 +80,22 @@ wechat_token_url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=$corpId&
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_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(config['configurations']['dolphin-alert'])
+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['logging.config'] = 'classpath:apiserver_logback.xml'
-dolphin_app_api_map['spring.messages.basename'] = 'i18n/messages'
-dolphin_app_api_map['server.servlet.context-path'] = '/dolphinscheduler/'
dolphin_app_api_map.update(config['configurations']['dolphin-application-api'])
-# application-dao.properties
-dolphin_application_map = {}
-dolphin_application_map['spring.datasource.type'] = 'com.alibaba.druid.pool.DruidDataSource'
-dolphin_application_map['spring.datasource.driver-class-name'] = dolphin_database_config['dolphin_database_driver']
-dolphin_application_map['spring.datasource.url'] = dolphin_database_config['dolphin_database_url']
-dolphin_application_map['spring.datasource.username'] = dolphin_database_config['dolphin_database_username']
-dolphin_application_map['spring.datasource.password'] = dolphin_database_config['dolphin_database_password']
-dolphin_application_map.update(config['configurations']['dolphin-application'])
# common.properties
dolphin_common_map = {}
@@ -118,33 +114,42 @@ else:
dolphin_common_map_tmp = config['configurations']['dolphin-common']
data_basedir_path = dolphin_common_map_tmp['data.basedir.path']
-process_exec_basepath = data_basedir_path + '/exec'
-data_download_basedir_path = data_basedir_path + '/download'
-dolphin_common_map['process.exec.basepath'] = process_exec_basepath
-dolphin_common_map['data.download.basedir.path'] = data_download_basedir_path
dolphin_common_map['dolphinscheduler.env.path'] = dolphin_env_path
+dolphin_common_map.update(config['configurations']['dolphin-common'])
-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_common_map['zookeeper.quorum'] = zookeeperPort.join(zookeeperHosts) + ":" + clientPort
+# 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'])
-dolphin_common_map.update(config['configurations']['dolphin-common'])
+# 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['org.quartz.dataSource.myDs.driver'] = dolphin_database_config['dolphin_database_driver']
-dolphin_quartz_map['org.quartz.dataSource.myDs.URL'] = dolphin_database_config['dolphin_database_url']
-dolphin_quartz_map['org.quartz.dataSource.myDs.user'] = dolphin_database_config['dolphin_database_username']
-dolphin_quartz_map['org.quartz.dataSource.myDs.password'] = dolphin_database_config['dolphin_database_password']
dolphin_quartz_map.update(config['configurations']['dolphin-quartz'])
-# if 'ganglia_server_host' in config['clusterHostInfo'] and \
-# len(config['clusterHostInfo']['ganglia_server_host'])>0:
-# ganglia_installed = True
-# ganglia_server = config['clusterHostInfo']['ganglia_server_host'][0]
-# ganglia_report_interval = 60
-# else:
-# ganglia_installed = False
+# 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"
+
+
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/service_check.py b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/service_check.py
similarity index 100%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/service_check.py
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/service_check.py
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/status_params.py b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/status_params.py
similarity index 100%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/status_params.py
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/scripts/status_params.py
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/alert.properties.j2 b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/alert.properties.j2
similarity index 100%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/alert.properties.j2
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/alert.properties.j2
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/application-api.properties.j2 b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/application-api.properties.j2
similarity index 100%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/application-api.properties.j2
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/application-api.properties.j2
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/common.properties.j2 b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/common.properties.j2
similarity index 100%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/common.properties.j2
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/common.properties.j2
diff --git a/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/datasource.properties.j2 b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/datasource.properties.j2
new file mode 100644
index 0000000000..40aed83543
--- /dev/null
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/datasource.properties.j2
@@ -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 %}
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/dolphin-daemon.j2 b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/dolphin-daemon.sh.j2
similarity index 83%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/dolphin-daemon.j2
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/dolphin-daemon.sh.j2
index 1dc4bac0ab..c5cc11fb62 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/dolphin-daemon.j2
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/dolphin-daemon.sh.j2
@@ -48,22 +48,19 @@ pid={{dolphin_pidfile_dir}}/$command.pid
cd $DOLPHINSCHEDULER_HOME
if [ "$command" = "api-server" ]; then
- LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/apiserver_logback.xml -Dspring.profiles.active=api"
+ 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}}/master_logback.xml -Ddruid.mysql.usePingMethod=false"
+ 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}}/worker_logback.xml -Ddruid.mysql.usePingMethod=false"
+ 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="-Dlogback.configurationFile={{dolphin_conf_dir}}/alert_logback.xml"
+ 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.rpc.LoggerServer
-elif [ "$command" = "combined-server" ]; then
- LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/combined_logback.xml -Dspring.profiles.active=api -Dserver.is-combined-server=true"
- CLASS=org.apache.dolphinscheduler.api.CombinedApplicationServer
+ CLASS=org.apache.dolphinscheduler.server.log.LoggerServer
else
echo "Error: No command named \`$command' was found."
exit 1
diff --git a/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/master.properties.j2 b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/master.properties.j2
new file mode 100644
index 0000000000..d9b85e14cf
--- /dev/null
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/master.properties.j2
@@ -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 %}
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/quartz.properties.j2 b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/quartz.properties.j2
similarity index 100%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/quartz.properties.j2
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/quartz.properties.j2
diff --git a/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/worker.properties.j2 b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/worker.properties.j2
new file mode 100644
index 0000000000..a008b74084
--- /dev/null
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/worker.properties.j2
@@ -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 %}
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/zookeeper.properties.j2 b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/zookeeper.properties.j2
new file mode 100644
index 0000000000..9eb14eaef3
--- /dev/null
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/package/templates/zookeeper.properties.j2
@@ -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 %}
\ No newline at end of file
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/quicklinks/quicklinks.json b/ambari_plugin/common-services/DOLPHIN/1.3.3/quicklinks/quicklinks.json
old mode 100755
new mode 100644
similarity index 100%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/quicklinks/quicklinks.json
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/quicklinks/quicklinks.json
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/themes/theme.json b/ambari_plugin/common-services/DOLPHIN/1.3.3/themes/theme.json
similarity index 86%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/themes/theme.json
rename to ambari_plugin/common-services/DOLPHIN/1.3.3/themes/theme.json
index 23e46076aa..953e2323f8 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/themes/theme.json
+++ b/ambari_plugin/common-services/DOLPHIN/1.3.3/themes/theme.json
@@ -151,18 +151,40 @@
"subsection-name": "env-row1-col2"
},
{
- "config": "dolphin-common/res.upload.startup.type",
+ "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/res.upload.startup.type"
+ "dolphin-common/resource.storage.type"
],
- "if": "${dolphin-common/res.upload.startup.type} === HDFS",
+ "if": "${dolphin-common/resource.storage.type} === HDFS",
"then": {
"property_value_attributes": {
"visible": true
@@ -182,9 +204,9 @@
"depends-on": [
{
"configs":[
- "dolphin-common/res.upload.startup.type"
+ "dolphin-common/resource.storage.type"
],
- "if": "${dolphin-common/res.upload.startup.type} === HDFS",
+ "if": "${dolphin-common/resource.storage.type} === HDFS",
"then": {
"property_value_attributes": {
"visible": true
@@ -204,9 +226,9 @@
"depends-on": [
{
"configs":[
- "dolphin-common/res.upload.startup.type"
+ "dolphin-common/resource.storage.type"
],
- "if": "${dolphin-common/res.upload.startup.type} === HDFS",
+ "if": "${dolphin-common/resource.storage.type} === HDFS",
"then": {
"property_value_attributes": {
"visible": true
@@ -226,9 +248,9 @@
"depends-on": [
{
"configs":[
- "dolphin-common/res.upload.startup.type"
+ "dolphin-common/resource.storage.type"
],
- "if": "${dolphin-common/res.upload.startup.type} === S3",
+ "if": "${dolphin-common/resource.storage.type} === S3",
"then": {
"property_value_attributes": {
"visible": true
@@ -248,9 +270,9 @@
"depends-on": [
{
"configs":[
- "dolphin-common/res.upload.startup.type"
+ "dolphin-common/resource.storage.type"
],
- "if": "${dolphin-common/res.upload.startup.type} === S3",
+ "if": "${dolphin-common/resource.storage.type} === S3",
"then": {
"property_value_attributes": {
"visible": true
@@ -270,9 +292,9 @@
"depends-on": [
{
"configs":[
- "dolphin-common/res.upload.startup.type"
+ "dolphin-common/resource.storage.type"
],
- "if": "${dolphin-common/res.upload.startup.type} === S3",
+ "if": "${dolphin-common/resource.storage.type} === S3",
"then": {
"property_value_attributes": {
"visible": true
@@ -356,6 +378,28 @@
}
]
},
+ {
+ "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"
@@ -505,11 +549,17 @@
}
},
{
- "config": "dolphin-common/res.upload.startup.type",
+ "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": {
@@ -570,6 +620,12 @@
"type": "text-field"
}
},
+ {
+ "config": "dolphin-common/kerberos.expire.time",
+ "widget": {
+ "type": "text-field"
+ }
+ },
{
"config": "dolphin-alert/enterprise.wechat.enable",
"widget": {
diff --git a/docker/build/startup.sh b/docker/build/startup.sh
index ea4fbc0cd1..0511788d48 100644
--- a/docker/build/startup.sh
+++ b/docker/build/startup.sh
@@ -38,13 +38,13 @@ initDatabase() {
echo "connect ${DATABASE_TYPE} service"
if [ ${DATABASE_TYPE} = "mysql" ]; then
v=$(mysql -h${DATABASE_HOST} -P${DATABASE_PORT} -u${DATABASE_USERNAME} --password=${DATABASE_PASSWORD} -D ${DATABASE_DATABASE} -e "select 1" 2>&1)
- if [ "$(echo '${v}' | grep 'ERROR' | wc -l)" -eq 1 ]; then
+ if [ "$(echo ${v} | grep 'ERROR' | wc -l)" -eq 1 ]; then
echo "Error: Can't connect to database...${v}"
exit 1
fi
else
v=$(sudo -u postgres PGPASSWORD=${DATABASE_PASSWORD} psql -h ${DATABASE_HOST} -p ${DATABASE_PORT} -U ${DATABASE_USERNAME} -d ${DATABASE_DATABASE} -tAc "select 1")
- if [ "$(echo '${v}' | grep 'FATAL' | wc -l)" -eq 1 ]; then
+ if [ "$(echo ${v} | grep 'FATAL' | wc -l)" -eq 1 ]; then
echo "Error: Can't connect to database...${v}"
exit 1
fi
diff --git a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/application.properties.j2 b/docker/kubernetes/dolphinscheduler/requirements.yaml
similarity index 76%
rename from ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/application.properties.j2
rename to docker/kubernetes/dolphinscheduler/requirements.yaml
index 7bb9f8aff3..e219975995 100644
--- a/ambari_plugin/common-services/DOLPHIN/1.2.1/package/templates/application.properties.j2
+++ b/docker/kubernetes/dolphinscheduler/requirements.yaml
@@ -14,7 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-
-{% for key, value in dolphin_application_map.iteritems() -%}
- {{key}}={{value}}
-{% endfor %}
\ No newline at end of file
+dependencies:
+- name: postgresql
+ version: 8.x.x
+ repository: https://charts.bitnami.com/bitnami
+ condition: postgresql.enabled
+- name: zookeeper
+ version: 5.x.x
+ repository: https://charts.bitnami.com/bitnami
+ condition: redis.enabled
\ No newline at end of file
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-dingtalk/pom.xml b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-dingtalk/pom.xml
index 1f9c46e5f8..930b92f855 100644
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-dingtalk/pom.xml
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-dingtalk/pom.xml
@@ -21,7 +21,7 @@
dolphinscheduler-alert-plugin
org.apache.dolphinscheduler
- 1.3.2-SNAPSHOT
+ 1.3.4-SNAPSHOT
4.0.0
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-email/pom.xml b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-email/pom.xml
index fcc1469dde..f4524b2046 100644
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-email/pom.xml
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-email/pom.xml
@@ -21,7 +21,7 @@
dolphinscheduler-alert-plugin
org.apache.dolphinscheduler
- 1.3.2-SNAPSHOT
+ 1.3.4-SNAPSHOT
4.0.0
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/pom.xml b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/pom.xml
index ce2e0c0478..5223730e3e 100644
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/pom.xml
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-http/pom.xml
@@ -21,7 +21,7 @@
dolphinscheduler-alert-plugin
org.apache.dolphinscheduler
- 1.3.2-SNAPSHOT
+ 1.3.4-SNAPSHOT
4.0.0
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-script/pom.xml b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-script/pom.xml
index 6b3277fe61..8c35b3cbf6 100644
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-script/pom.xml
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-script/pom.xml
@@ -21,7 +21,7 @@
dolphinscheduler-alert-plugin
org.apache.dolphinscheduler
- 1.3.2-SNAPSHOT
+ 1.3.4-SNAPSHOT
4.0.0
diff --git a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-wechat/pom.xml b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-wechat/pom.xml
index 2e729ba09d..123cebc5c5 100644
--- a/dolphinscheduler-alert-plugin/dolphinscheduler-alert-wechat/pom.xml
+++ b/dolphinscheduler-alert-plugin/dolphinscheduler-alert-wechat/pom.xml
@@ -21,7 +21,7 @@
dolphinscheduler-alert-plugin
org.apache.dolphinscheduler
- 1.3.2-SNAPSHOT
+ 1.3.4-SNAPSHOT
4.0.0
diff --git a/dolphinscheduler-alert-plugin/pom.xml b/dolphinscheduler-alert-plugin/pom.xml
index 707f0ceafb..ede5051049 100644
--- a/dolphinscheduler-alert-plugin/pom.xml
+++ b/dolphinscheduler-alert-plugin/pom.xml
@@ -21,7 +21,7 @@
dolphinscheduler
org.apache.dolphinscheduler
- 1.3.2-SNAPSHOT
+ 1.3.4-SNAPSHOT
4.0.0
diff --git a/dolphinscheduler-alert/pom.xml b/dolphinscheduler-alert/pom.xml
index ebea0e8716..c7a8118a13 100644
--- a/dolphinscheduler-alert/pom.xml
+++ b/dolphinscheduler-alert/pom.xml
@@ -21,7 +21,7 @@
org.apache.dolphinscheduler
dolphinscheduler
- 1.3.2-SNAPSHOT
+ 1.3.4-SNAPSHOT
dolphinscheduler-alert
${project.artifactId}
diff --git a/dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/AlertPluginManagerTest.java b/dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/AlertPluginManagerTest.java
index ea78f6b12a..5ed25cc004 100644
--- a/dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/AlertPluginManagerTest.java
+++ b/dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/AlertPluginManagerTest.java
@@ -23,6 +23,7 @@ import org.apache.dolphinscheduler.alert.utils.PropertyUtils;
import org.apache.dolphinscheduler.spi.utils.StringUtils;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,6 +33,7 @@ import com.google.common.collect.ImmutableList;
/**
* AlertPluginManager Tester.
*/
+@Ignore
public class AlertPluginManagerTest {
private static final Logger logger = LoggerFactory.getLogger(AlertPluginManagerTest.class);
diff --git a/dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/DolphinPluginLoaderTest.java b/dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/DolphinPluginLoaderTest.java
index b9d3d1a0ae..5c792db451 100644
--- a/dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/DolphinPluginLoaderTest.java
+++ b/dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/DolphinPluginLoaderTest.java
@@ -20,6 +20,7 @@ package org.apache.dolphinscheduler.alert.plugin;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import com.google.common.collect.ImmutableList;
@@ -27,6 +28,7 @@ import com.google.common.collect.ImmutableList;
/**
* DolphinPluginLoader Tester.
*/
+@Ignore
public class DolphinPluginLoaderTest {
@Before
diff --git a/dolphinscheduler-api/pom.xml b/dolphinscheduler-api/pom.xml
index cd6e04fc26..3317598ac9 100644
--- a/dolphinscheduler-api/pom.xml
+++ b/dolphinscheduler-api/pom.xml
@@ -16,242 +16,256 @@
~ limitations under the License.
-->
-
- 4.0.0
-
- org.apache.dolphinscheduler
- dolphinscheduler
- 1.3.2-SNAPSHOT
-
- dolphinscheduler-api
- ${project.artifactId}
- jar
+
+ 4.0.0
+
+ org.apache.dolphinscheduler
+ dolphinscheduler
+ 1.3.4-SNAPSHOT
+
+ dolphinscheduler-api
+ ${project.artifactId}
+ jar
-
-
- org.apache.dolphinscheduler
- dolphinscheduler-alert
-
+
+
+ org.apache.dolphinscheduler
+ dolphinscheduler-alert
+
-
- org.apache.dolphinscheduler
- dolphinscheduler-dao
-
+
+ org.apache.dolphinscheduler
+ dolphinscheduler-dao
+
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
- org.springframework.boot
- spring-boot-starter-tomcat
-
-
- log4j-to-slf4j
- org.apache.logging.log4j
-
-
-
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-tomcat
+
+
+ log4j-to-slf4j
+ org.apache.logging.log4j
+
+
+
-
-
- org.springframework.boot
- spring-boot-starter-jetty
-
-
- org.eclipse.jetty.websocket
- javax-websocket-server-impl
-
-
- org.eclipse.jetty.websocket
- websocket-server
-
-
-
+
+
+ org.springframework.boot
+ spring-boot-starter-jetty
+
+
+ org.eclipse.jetty.websocket
+ javax-websocket-server-impl
+
+
+ org.eclipse.jetty.websocket
+ websocket-server
+
+
+
-
- org.springframework.boot
- spring-boot-starter-aop
-
-
- org.springframework.boot
- spring-boot-starter
-
-
-
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+
-
- org.springframework
- spring-context
-
+
+ org.springframework
+ spring-context
+
-
- commons-collections
- commons-collections
-
+
+ commons-collections
+ commons-collections
+
-
- org.quartz-scheduler
- quartz
-
-
- c3p0
- c3p0
-
-
-
+
+ org.quartz-scheduler
+ quartz
+
+
+ com.mchange
+ c3p0
+
+
+ com.mchange
+ mchange-commons-java
+
+
+ com.zaxxer
+ HikariCP-java6
+
+
+
-
- org.quartz-scheduler
- quartz-jobs
-
+
+ org.quartz-scheduler
+ quartz-jobs
+
-
- io.springfox
- springfox-swagger2
-
+
+ io.springfox
+ springfox-swagger2
+
-
- io.springfox
- springfox-swagger-ui
-
+
+ io.springfox
+ springfox-swagger-ui
+
-
- org.apache.dolphinscheduler
- dolphinscheduler-service
-
+
+ io.swagger
+ swagger-models
+
-
- com.github.xiaoymin
- swagger-bootstrap-ui
-
+
+ org.apache.dolphinscheduler
+ dolphinscheduler-service
+
-
- org.apache.curator
- curator-framework
-
+
+ com.github.xiaoymin
+ swagger-bootstrap-ui
+
-
- org.apache.curator
- curator-recipes
-
-
- org.apache.zookeeper
- zookeeper
-
-
-
+
+ org.apache.curator
+ curator-framework
+
-
-
- org.apache.hadoop
- hadoop-common
-
-
- javax.servlet
- servlet-api
-
-
- org.apache.curator
- curator-client
-
-
-
+
+ org.apache.curator
+ curator-recipes
+
+
+ org.apache.zookeeper
+ zookeeper
+
+
+
-
- org.apache.hadoop
- hadoop-client
-
-
- org.slf4j
- slf4j-log4j12
-
-
-
+
+
+ org.apache.hadoop
+ hadoop-common
+
+
+ javax.servlet
+ servlet-api
+
+
+ org.apache.curator
+ curator-client
+
+
+
-
- org.apache.hadoop
- hadoop-hdfs
-
-
- servlet-api
- javax.servlet
-
-
-
+
+ org.apache.hadoop
+ hadoop-client
+
+
+ org.slf4j
+ slf4j-log4j12
+
+
+
-
- org.apache.hadoop
- hadoop-yarn-common
-
-
- servlet-api
- javax.servlet
-
-
-
+
+ org.apache.hadoop
+ hadoop-hdfs
+
+
+ servlet-api
+ javax.servlet
+
+
+
-
- org.apache.hadoop
- hadoop-aws
-
+
+ org.apache.hadoop
+ hadoop-yarn-common
+
+
+ servlet-api
+ javax.servlet
+
+
+
-
- org.mortbay.jetty
- jsp-2.1
-
-
- org.mortbay.jetty
- servlet-api-2.5
-
-
-
+
+ org.apache.hadoop
+ hadoop-aws
+
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.ow2.asm
- asm
-
-
- org.springframework.boot
- spring-boot
-
-
- org.springframework.boot
- spring-boot-autoconfigure
-
-
-
+
+ org.mortbay.jetty
+ jsp-2.1
+
+
+ org.mortbay.jetty
+ servlet-api-2.5
+
+
+
-
- junit
- junit
- test
-
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.ow2.asm
+ asm
+
+
+ org.springframework.boot
+ spring-boot
+
+
+ org.springframework.boot
+ spring-boot-autoconfigure
+
+
+
-
- org.powermock
- powermock-module-junit4
- test
-
+
+ junit
+ junit
+ test
+
-
- org.powermock
- powermock-api-mockito2
- test
-
-
- org.mockito
- mockito-core
-
-
-
+
+ org.powermock
+ powermock-module-junit4
+ test
+
-
+
+ org.powermock
+ powermock-api-mockito2
+ test
+
+
+ org.mockito
+ mockito-core
+
+
+
+
+
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/AppConfiguration.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/AppConfiguration.java
index 3698370fbd..28a42929ca 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/AppConfiguration.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/configuration/AppConfiguration.java
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.apache.dolphinscheduler.api.configuration;
import org.apache.dolphinscheduler.api.interceptor.LoginHandlerInterceptor;
@@ -33,85 +34,78 @@ import java.util.Locale;
@Configuration
public class AppConfiguration implements WebMvcConfigurer {
- public static final String LOGIN_INTERCEPTOR_PATH_PATTERN = "/**/*";
- public static final String LOGIN_PATH_PATTERN = "/login";
- public static final String REGISTER_PATH_PATTERN = "/users/register";
- public static final String PATH_PATTERN = "/**";
- public static final String LOCALE_LANGUAGE_COOKIE = "language";
- public static final int COOKIE_MAX_AGE = 3600;
-
-
- @Bean
- public LoginHandlerInterceptor loginInterceptor() {
- return new LoginHandlerInterceptor();
- }
-
-
- /**
- * Cookie
- * @return local resolver
- */
- @Bean(name = "localeResolver")
- public LocaleResolver localeResolver() {
- CookieLocaleResolver localeResolver = new CookieLocaleResolver();
- localeResolver.setCookieName(LOCALE_LANGUAGE_COOKIE);
- /** set default locale **/
- localeResolver.setDefaultLocale(Locale.US);
- /** set cookie max age **/
- localeResolver.setCookieMaxAge(COOKIE_MAX_AGE);
- return localeResolver;
- }
-
- @Bean
- public LocaleChangeInterceptor localeChangeInterceptor() {
- LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
- /** **/
- lci.setParamName("language");
-
- return lci;
- }
-
-
- @Override
- public void addInterceptors(InterceptorRegistry registry) {
- //i18n
- registry.addInterceptor(localeChangeInterceptor());
-
- registry.addInterceptor(loginInterceptor()).addPathPatterns(LOGIN_INTERCEPTOR_PATH_PATTERN).excludePathPatterns(LOGIN_PATH_PATTERN, REGISTER_PATH_PATTERN, "/swagger-resources/**", "/webjars/**", "/v2/**", "/doc.html", "*.html", "/ui/**");
- }
-
-
- @Override
- public void addResourceHandlers(ResourceHandlerRegistry registry) {
- registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
- registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
- registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
- registry.addResourceHandler("/ui/**").addResourceLocations("file:ui/");
- }
-
- @Override
- public void addViewControllers(ViewControllerRegistry registry) {
- registry.addViewController("/ui/").setViewName("forward:/ui/index.html");
- registry.addViewController("/").setViewName("forward:/ui/index.html");
- }
-
- @Override
- public void addCorsMappings(CorsRegistry registry) {
- registry.addMapping(PATH_PATTERN).allowedOrigins("*").allowedMethods("*");
- }
-
-
- /**
- * Turn off suffix-based content negotiation
- *
- * @param configurer configurer
- */
- @Override
- public void configureContentNegotiation(final ContentNegotiationConfigurer configurer) {
- configurer.favorPathExtension(false);
- }
-
-
-
-
+ public static final String LOGIN_INTERCEPTOR_PATH_PATTERN = "/**/*";
+ public static final String LOGIN_PATH_PATTERN = "/login";
+ public static final String REGISTER_PATH_PATTERN = "/users/register";
+ public static final String PATH_PATTERN = "/**";
+ public static final String LOCALE_LANGUAGE_COOKIE = "language";
+ public static final int COOKIE_MAX_AGE = 3600;
+
+ @Bean
+ public LoginHandlerInterceptor loginInterceptor() {
+ return new LoginHandlerInterceptor();
+ }
+
+ /**
+ * Cookie
+ * @return local resolver
+ */
+ @Bean(name = "localeResolver")
+ public LocaleResolver localeResolver() {
+ CookieLocaleResolver localeResolver = new CookieLocaleResolver();
+ localeResolver.setCookieName(LOCALE_LANGUAGE_COOKIE);
+ // set default locale
+ localeResolver.setDefaultLocale(Locale.US);
+ // set cookie max age
+ localeResolver.setCookieMaxAge(COOKIE_MAX_AGE);
+ return localeResolver;
+ }
+
+ @Bean
+ public LocaleChangeInterceptor localeChangeInterceptor() {
+ LocaleChangeInterceptor lci = new LocaleChangeInterceptor();
+ lci.setParamName("language");
+ return lci;
+ }
+
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ // i18n
+ registry.addInterceptor(localeChangeInterceptor());
+ registry.addInterceptor(loginInterceptor())
+ .addPathPatterns(LOGIN_INTERCEPTOR_PATH_PATTERN)
+ .excludePathPatterns(LOGIN_PATH_PATTERN, REGISTER_PATH_PATTERN,
+ "/swagger-resources/**", "/webjars/**", "/v2/**",
+ "/doc.html", "/swagger-ui.html", "*.html", "/ui/**");
+ }
+
+ @Override
+ public void addResourceHandlers(ResourceHandlerRegistry registry) {
+ registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
+ registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
+ registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
+ registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
+ registry.addResourceHandler("/ui/**").addResourceLocations("file:ui/");
+ }
+
+ @Override
+ public void addViewControllers(ViewControllerRegistry registry) {
+ registry.addViewController("/ui/").setViewName("forward:/ui/index.html");
+ registry.addViewController("/").setViewName("forward:/ui/index.html");
+ }
+
+ @Override
+ public void addCorsMappings(CorsRegistry registry) {
+ registry.addMapping(PATH_PATTERN).allowedOrigins("*").allowedMethods("*");
+ }
+
+ /**
+ * Turn off suffix-based content negotiation
+ *
+ * @param configurer configurer
+ */
+ @Override
+ public void configureContentNegotiation(final ContentNegotiationConfigurer configurer) {
+ configurer.favorPathExtension(false);
+ }
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java
index 2457177cdf..17faad04bc 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AccessTokenController.java
@@ -86,7 +86,7 @@ public class AccessTokenController extends BaseController {
logger.info("login user {}, create token , userId : {} , token expire time : {} , token : {}", loginUser.getUserName(),
userId, expireTime, token);
- Map result = accessTokenService.createToken(userId, expireTime, token);
+ Map result = accessTokenService.createToken(loginUser, userId, expireTime, token);
return returnDataList(result);
}
@@ -106,7 +106,7 @@ public class AccessTokenController extends BaseController {
@RequestParam(value = "userId") int userId,
@RequestParam(value = "expireTime") String expireTime) {
logger.info("login user {}, generate token , userId : {} , token expire time : {}", loginUser, userId, expireTime);
- Map result = accessTokenService.generateToken(userId, expireTime);
+ Map result = accessTokenService.generateToken(loginUser, userId, expireTime);
return returnDataList(result);
}
@@ -185,7 +185,7 @@ public class AccessTokenController extends BaseController {
logger.info("login user {}, update token , userId : {} , token expire time : {} , token : {}", loginUser.getUserName(),
userId, expireTime, token);
- Map result = accessTokenService.updateToken(id, userId, expireTime, token);
+ Map result = accessTokenService.updateToken(loginUser, id, userId, expireTime, token);
return returnDataList(result);
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertGroupController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertGroupController.java
index b3a3ee55e9..cf8dc8088e 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertGroupController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/AlertGroupController.java
@@ -131,8 +131,8 @@ public class AlertGroupController extends BaseController {
@ResponseStatus(HttpStatus.OK)
@ApiException(LIST_PAGING_ALERT_GROUP_ERROR)
public Result listPaging(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam("pageNo") Integer pageNo,
@RequestParam(value = "searchVal", required = false) String searchVal,
+ @RequestParam("pageNo") Integer pageNo,
@RequestParam("pageSize") Integer pageSize) {
logger.info("login user {}, list paging, pageNo: {}, searchVal: {}, pageSize: {}",
loginUser.getUserName(), pageNo, searchVal, pageSize);
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
index 48cb53c5b2..1c13c1374c 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProcessDefinitionController.java
@@ -142,7 +142,7 @@ public class ProcessDefinitionController extends BaseController {
@ApiOperation(value = "copyProcessDefinition", notes = "COPY_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
@ApiImplicitParam(name = "processDefinitionIds", value = "PROCESS_DEFINITION_IDS", required = true, dataType = "String", example = "3,4"),
- @ApiImplicitParam(name = "targetProjectId", value = "TARGET_PROJECT_ID", required = true, type = "Integer")
+ @ApiImplicitParam(name = "targetProjectId", value = "TARGET_PROJECT_ID", required = true, dataType = "Int", example = "10")
})
@PostMapping(value = "/copy")
@ResponseStatus(HttpStatus.OK)
@@ -173,7 +173,7 @@ public class ProcessDefinitionController extends BaseController {
@ApiOperation(value = "moveProcessDefinition", notes = "MOVE_PROCESS_DEFINITION_NOTES")
@ApiImplicitParams({
@ApiImplicitParam(name = "processDefinitionIds", value = "PROCESS_DEFINITION_IDS", required = true, dataType = "String", example = "3,4"),
- @ApiImplicitParam(name = "targetProjectId", value = "TARGET_PROJECT_ID", required = true, type = "Integer")
+ @ApiImplicitParam(name = "targetProjectId", value = "TARGET_PROJECT_ID", required = true, dataType = "Int", example = "10")
})
@PostMapping(value = "/move")
@ResponseStatus(HttpStatus.OK)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
index dac97bca9d..1bf5003946 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ProjectController.java
@@ -228,21 +228,20 @@ public class ProjectController extends BaseController {
}
/**
- * query user created project
+ * query authorized and user created project
*
* @param loginUser login user
- * @return projects which the user create
+ * @return projects which the user create and authorized
*/
- @ApiOperation(value = "queryProjectCreatedByUser", notes = "QUERY_USER_CREATED_PROJECT_NOTES")
-
- @GetMapping(value = "/login-user-created-project")
+ @ApiOperation(value = "queryProjectCreatedAndAuthorizedByUser", notes = "QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_NOTES")
+ @GetMapping(value = "/created-and-authorized-project")
@ResponseStatus(HttpStatus.OK)
- @ApiException(QUERY_USER_CREATED_PROJECT_ERROR)
- public Result queryProjectCreatedByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
- logger.info("login user {}, query authorized project by user id: {}.",
+ @ApiException(QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_ERROR)
+ public Result queryProjectCreatedAndAuthorizedByUser(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser) {
+ logger.info("login user {}, query authorized and user created project by user id: {}.",
StringUtils.replaceNRTtoUnderline(loginUser.getUserName()),
StringUtils.replaceNRTtoUnderline(String.valueOf(loginUser.getId())));
- Map result = projectService.queryProjectCreatedByUser(loginUser);
+ Map result = projectService.queryProjectCreatedAndAuthorizedByUser(loginUser);
return returnDataList(result);
}
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
index a0ec666ed7..52fd023c35 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/ResourcesController.java
@@ -14,23 +14,48 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.apache.dolphinscheduler.api.controller;
+import static org.apache.dolphinscheduler.api.enums.Status.AUTHORIZED_FILE_RESOURCE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.AUTHORIZED_UDF_FUNCTION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.AUTHORIZE_RESOURCE_TREE;
+import static org.apache.dolphinscheduler.api.enums.Status.CREATE_RESOURCE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.CREATE_RESOURCE_FILE_ON_LINE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.CREATE_UDF_FUNCTION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.DELETE_RESOURCE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.DELETE_UDF_FUNCTION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.DOWNLOAD_RESOURCE_FILE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.EDIT_RESOURCE_FILE_ON_LINE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.QUERY_DATASOURCE_BY_TYPE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.QUERY_RESOURCES_LIST_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.QUERY_RESOURCES_LIST_PAGING;
+import static org.apache.dolphinscheduler.api.enums.Status.QUERY_UDF_FUNCTION_LIST_PAGING_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.RESOURCE_FILE_IS_EMPTY;
+import static org.apache.dolphinscheduler.api.enums.Status.RESOURCE_NOT_EXIST;
+import static org.apache.dolphinscheduler.api.enums.Status.UNAUTHORIZED_UDF_FUNCTION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_RESOURCE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.UPDATE_UDF_FUNCTION_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_RESOURCE_BY_NAME_AND_TYPE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.VERIFY_UDF_FUNCTION_NAME_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.VIEW_RESOURCE_FILE_ON_LINE_ERROR;
+import static org.apache.dolphinscheduler.api.enums.Status.VIEW_UDF_FUNCTION_ERROR;
+
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.exceptions.ApiException;
import org.apache.dolphinscheduler.api.service.ResourcesService;
import org.apache.dolphinscheduler.api.service.UdfFuncService;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
+import org.apache.dolphinscheduler.common.enums.ProgramType;
import org.apache.dolphinscheduler.common.enums.ResourceType;
import org.apache.dolphinscheduler.common.enums.UdfType;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
+import org.apache.dolphinscheduler.common.utils.StringUtils;
import org.apache.dolphinscheduler.dao.entity.User;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.apache.commons.lang.StringUtils;
+
+import java.util.Map;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -38,13 +63,21 @@ import org.springframework.core.io.Resource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.ResponseStatus;
+import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
-import springfox.documentation.annotations.ApiIgnore;
-
-import java.util.Map;
-import static org.apache.dolphinscheduler.api.enums.Status.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import springfox.documentation.annotations.ApiIgnore;
/**
* resources controller
@@ -56,37 +89,28 @@ public class ResourcesController extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(ResourcesController.class);
-
@Autowired
private ResourcesService resourceService;
@Autowired
private UdfFuncService udfFuncService;
/**
- * create directory
*
- * @param loginUser login user
- * @param alias alias
- * @param description description
- * @param type type
- * @return create result code
- */
-
- /**
* @param loginUser login user
* @param type type
* @param alias alias
* @param description description
* @param pid parent id
* @param currentDir current directory
- * @return
+ * @return create result code
*/
@ApiOperation(value = "createDirctory", notes = "CREATE_RESOURCE_NOTES")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
@ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataType = "String"),
@ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"),
- @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataType = "MultipartFile")
+ @ApiImplicitParam(name = "pid", value = "RESOURCE_PID", required = true, dataType = "Int", example = "10"),
+ @ApiImplicitParam(name = "currentDir", value = "RESOURCE_CURRENTDIR", required = true, dataType = "String")
})
@PostMapping(value = "/directory/create")
@ApiException(CREATE_RESOURCE_ERROR)
@@ -103,12 +127,13 @@ public class ResourcesController extends BaseController {
/**
* create resource
- *
- * @param loginUser login user
- * @param alias alias
- * @param description description
- * @param type type
- * @param file file
+ * @param loginUser
+ * @param type
+ * @param alias
+ * @param description
+ * @param file
+ * @param pid
+ * @param currentDir
* @return create result code
*/
@ApiOperation(value = "createResource", notes = "CREATE_RESOURCE_NOTES")
@@ -116,7 +141,9 @@ public class ResourcesController extends BaseController {
@ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
@ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataType = "String"),
@ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"),
- @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataType = "MultipartFile")
+ @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataType = "MultipartFile"),
+ @ApiImplicitParam(name = "pid", value = "RESOURCE_PID", required = true, dataType = "Int", example = "10"),
+ @ApiImplicitParam(name = "currentDir", value = "RESOURCE_CURRENTDIR", required = true, dataType = "String")
})
@PostMapping(value = "/create")
@ApiException(CREATE_RESOURCE_ERROR)
@@ -135,11 +162,12 @@ public class ResourcesController extends BaseController {
/**
* update resource
*
- * @param loginUser login user
- * @param alias alias
- * @param resourceId resource id
- * @param type resource type
+ * @param loginUser login user
+ * @param alias alias
+ * @param resourceId resource id
+ * @param type resource type
* @param description description
+ * @param file resource file
* @return update result code
*/
@ApiOperation(value = "updateResource", notes = "UPDATE_RESOURCE_NOTES")
@@ -147,7 +175,8 @@ public class ResourcesController extends BaseController {
@ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100"),
@ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
@ApiImplicitParam(name = "name", value = "RESOURCE_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String")
+ @ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"),
+ @ApiImplicitParam(name = "file", value = "RESOURCE_FILE", required = true, dataType = "MultipartFile")
})
@PostMapping(value = "/update")
@ApiException(UPDATE_RESOURCE_ERROR)
@@ -155,17 +184,18 @@ public class ResourcesController extends BaseController {
@RequestParam(value = "id") int resourceId,
@RequestParam(value = "type") ResourceType type,
@RequestParam(value = "name") String alias,
- @RequestParam(value = "description", required = false) String description) {
- logger.info("login user {}, update resource, type: {}, resource alias: {}, desc: {}",
- loginUser.getUserName(), type, alias, description);
- return resourceService.updateResource(loginUser, resourceId, alias, description, type);
+ @RequestParam(value = "description", required = false) String description,
+ @RequestParam(value = "file" ,required = false) MultipartFile file) {
+ logger.info("login user {}, update resource, type: {}, resource alias: {}, desc: {}, file: {}",
+ loginUser.getUserName(), type, alias, description, file);
+ return resourceService.updateResource(loginUser, resourceId, alias, description, type, file);
}
/**
* query resources list
*
* @param loginUser login user
- * @param type resource type
+ * @param type resource type
* @return resource list
*/
@ApiOperation(value = "queryResourceList", notes = "QUERY_RESOURCE_LIST_NOTES")
@@ -187,16 +217,16 @@ public class ResourcesController extends BaseController {
* query resources list paging
*
* @param loginUser login user
- * @param type resource type
+ * @param type resource type
* @param searchVal search value
- * @param pageNo page number
- * @param pageSize page size
+ * @param pageNo page number
+ * @param pageSize page size
* @return resource list page
*/
@ApiOperation(value = "queryResourceListPaging", notes = "QUERY_RESOURCE_LIST_PAGING_NOTES")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "int"),
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "int", example = "10"),
@ApiImplicitParam(name = "searchVal", value = "SEARCH_VAL", dataType = "String"),
@ApiImplicitParam(name = "pageNo", value = "PAGE_NO", dataType = "Int", example = "1"),
@ApiImplicitParam(name = "pageSize", value = "PAGE_SIZE", dataType = "Int", example = "20")
@@ -227,7 +257,7 @@ public class ResourcesController extends BaseController {
/**
* delete resource
*
- * @param loginUser login user
+ * @param loginUser login user
* @param resourceId resource id
* @return delete result code
*/
@@ -251,8 +281,8 @@ public class ResourcesController extends BaseController {
* verify resource by alias and type
*
* @param loginUser login user
- * @param fullName resource full name
- * @param type resource type
+ * @param fullName resource full name
+ * @param type resource type
* @return true if the resource name not exists, otherwise return false
*/
@ApiOperation(value = "verifyResourceName", notes = "VERIFY_RESOURCE_NAME_NOTES")
@@ -277,10 +307,10 @@ public class ResourcesController extends BaseController {
* query resources jar list
*
* @param loginUser login user
- * @param type resource type
+ * @param type resource type
* @return resource list
*/
- @ApiOperation(value = "queryResourceJarList", notes = "QUERY_RESOURCE_LIST_NOTES")
+ @ApiOperation(value = "queryResourceByProgramType", notes = "QUERY_RESOURCE_LIST_NOTES")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType")
})
@@ -288,10 +318,14 @@ public class ResourcesController extends BaseController {
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_RESOURCES_LIST_ERROR)
public Result queryResourceJarList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
- @RequestParam(value = "type") ResourceType type
+ @RequestParam(value = "type") ResourceType type,
+ @RequestParam(value = "programType",required = false) ProgramType programType
) {
- logger.info("query resource list, login user:{}, resource type:{}", loginUser.getUserName(), type.toString());
- Map result = resourceService.queryResourceJarList(loginUser, type);
+ String programTypeName = programType == null ? "" : programType.name();
+ String userName = loginUser.getUserName();
+ userName = userName.replaceAll("[\n|\r|\t]", "_");
+ logger.info("query resource list, login user:{}, resource type:{}, program type:{}", userName,programTypeName);
+ Map result = resourceService.queryResourceByProgramType(loginUser, type,programType);
return returnDataList(result);
}
@@ -299,14 +333,16 @@ public class ResourcesController extends BaseController {
* query resource by full name and type
*
* @param loginUser login user
- * @param fullName resource full name
- * @param type resource type
+ * @param fullName resource full name
+ * @param type resource type
+ * @param id resource id
* @return true if the resource name not exists, otherwise return false
*/
@ApiOperation(value = "queryResource", notes = "QUERY_BY_RESOURCE_NAME")
@ApiImplicitParams({
@ApiImplicitParam(name = "type", value = "RESOURCE_TYPE", required = true, dataType = "ResourceType"),
- @ApiImplicitParam(name = "fullName", value = "RESOURCE_FULL_NAME", required = true, dataType = "String")
+ @ApiImplicitParam(name = "fullName", value = "RESOURCE_FULL_NAME", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = false, dataType = "Int", example = "10")
})
@GetMapping(value = "/queryResource")
@ResponseStatus(HttpStatus.OK)
@@ -325,10 +361,10 @@ public class ResourcesController extends BaseController {
/**
* view resource file online
*
- * @param loginUser login user
- * @param resourceId resource id
+ * @param loginUser login user
+ * @param resourceId resource id
* @param skipLineNum skip line number
- * @param limit limit
+ * @param limit limit
* @return resource content
*/
@ApiOperation(value = "viewResource", notes = "VIEW_RESOURCE_BY_ID_NOTES")
@@ -352,13 +388,14 @@ public class ResourcesController extends BaseController {
/**
* create resource file online
- *
- * @param loginUser login user
- * @param type resource type
- * @param fileName file name
- * @param fileSuffix file suffix
- * @param description description
- * @param content content
+ * @param loginUser
+ * @param type
+ * @param fileName
+ * @param fileSuffix
+ * @param description
+ * @param content
+ * @param pid
+ * @param currentDir
* @return create result code
*/
@ApiOperation(value = "onlineCreateResource", notes = "ONLINE_CREATE_RESOURCE_NOTES")
@@ -367,7 +404,9 @@ public class ResourcesController extends BaseController {
@ApiImplicitParam(name = "fileName", value = "RESOURCE_NAME", required = true, dataType = "String"),
@ApiImplicitParam(name = "suffix", value = "SUFFIX", required = true, dataType = "String"),
@ApiImplicitParam(name = "description", value = "RESOURCE_DESC", dataType = "String"),
- @ApiImplicitParam(name = "content", value = "CONTENT", required = true, dataType = "String")
+ @ApiImplicitParam(name = "content", value = "CONTENT", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "pid", value = "RESOURCE_PID", required = true, dataType = "Int", example = "10"),
+ @ApiImplicitParam(name = "currentDir", value = "RESOURCE_CURRENTDIR", required = true, dataType = "String")
})
@PostMapping(value = "/online-create")
@ApiException(CREATE_RESOURCE_FILE_ON_LINE_ERROR)
@@ -392,9 +431,9 @@ public class ResourcesController extends BaseController {
/**
* edit resource file online
*
- * @param loginUser login user
+ * @param loginUser login user
* @param resourceId resource id
- * @param content content
+ * @param content content
* @return update result code
*/
@ApiOperation(value = "updateResourceContent", notes = "UPDATE_RESOURCE_NOTES")
@@ -420,7 +459,7 @@ public class ResourcesController extends BaseController {
/**
* download resource file
*
- * @param loginUser login user
+ * @param loginUser login user
* @param resourceId resource id
* @return resource content
*/
@@ -449,14 +488,14 @@ public class ResourcesController extends BaseController {
/**
* create udf function
*
- * @param loginUser login user
- * @param type udf type
- * @param funcName function name
- * @param argTypes argument types
- * @param database database
+ * @param loginUser login user
+ * @param type udf type
+ * @param funcName function name
+ * @param argTypes argument types
+ * @param database database
* @param description description
- * @param className class name
- * @param resourceId resource id
+ * @param className class name
+ * @param resourceId resource id
* @return create result code
*/
@ApiOperation(value = "createUdfFunc", notes = "CREATE_UDF_FUNCTION_NOTES")
@@ -490,12 +529,12 @@ public class ResourcesController extends BaseController {
* view udf function
*
* @param loginUser login user
- * @param id resource id
+ * @param id resource id
* @return udf function detail
*/
@ApiOperation(value = "viewUIUdfFunction", notes = "VIEW_UDF_FUNCTION_NOTES")
@ApiImplicitParams({
- @ApiImplicitParam(name = "resourceId", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100")
})
@GetMapping(value = "/udf-func/update-ui")
@@ -512,26 +551,27 @@ public class ResourcesController extends BaseController {
/**
* update udf function
*
- * @param loginUser login user
- * @param type resource type
- * @param funcName function name
- * @param argTypes argument types
- * @param database data base
+ * @param loginUser login user
+ * @param type resource type
+ * @param funcName function name
+ * @param argTypes argument types
+ * @param database data base
* @param description description
- * @param resourceId resource id
- * @param className class name
- * @param udfFuncId udf function id
+ * @param resourceId resource id
+ * @param className class name
+ * @param udfFuncId udf function id
* @return update result code
*/
@ApiOperation(value = "updateUdfFunc", notes = "UPDATE_UDF_FUNCTION_NOTES")
@ApiImplicitParams({
+ @ApiImplicitParam(name = "id", value = "UDF_ID", required = true, dataType = "Int"),
@ApiImplicitParam(name = "type", value = "UDF_TYPE", required = true, dataType = "UdfType"),
@ApiImplicitParam(name = "funcName", value = "FUNC_NAME", required = true, dataType = "String"),
- @ApiImplicitParam(name = "suffix", value = "CLASS_NAME", required = true, dataType = "String"),
+ @ApiImplicitParam(name = "className", value = "CLASS_NAME", required = true, dataType = "String"),
@ApiImplicitParam(name = "argTypes", value = "ARG_TYPES", dataType = "String"),
@ApiImplicitParam(name = "database", value = "DATABASE_NAME", dataType = "String"),
@ApiImplicitParam(name = "description", value = "UDF_DESC", dataType = "String"),
- @ApiImplicitParam(name = "id", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100")
+ @ApiImplicitParam(name = "resourceId", value = "RESOURCE_ID", required = true, dataType = "Int", example = "100")
})
@PostMapping(value = "/udf-func/update")
@@ -556,8 +596,8 @@ public class ResourcesController extends BaseController {
*
* @param loginUser login user
* @param searchVal search value
- * @param pageNo page number
- * @param pageSize page size
+ * @param pageNo page number
+ * @param pageSize page size
* @return udf function list page
*/
@ApiOperation(value = "queryUdfFuncListPaging", notes = "QUERY_UDF_FUNCTION_LIST_PAGING_NOTES")
@@ -569,7 +609,7 @@ public class ResourcesController extends BaseController {
@GetMapping(value = "/udf-func/list-paging")
@ResponseStatus(HttpStatus.OK)
@ApiException(QUERY_UDF_FUNCTION_LIST_PAGING_ERROR)
- public Result queryUdfFuncList(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
+ public Result