Revert "3.2.2 release cherry-pick cp: Reduce the size of tarball to continue …" (#16068)
This reverts commit 646bbf4881.
|
|
@ -15,8 +15,8 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
HUB=apache
|
||||
TAG=3.2.2
|
||||
HUB=ghcr.io/apache/dolphinscheduler
|
||||
TAG=latest
|
||||
|
||||
TZ=Asia/Shanghai
|
||||
DATABASE=postgresql
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ type: application
|
|||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
version: 3.2.2
|
||||
version: 3.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application.
|
||||
|
|
|
|||
|
|
@ -120,12 +120,6 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
|
|||
| conf.auto | bool | `false` | auto restart, if true, all components will be restarted automatically after the common configuration is updated. if false, you need to restart the components manually. default is false |
|
||||
| conf.common."alert.rpc.port" | int | `50052` | rpc port |
|
||||
| conf.common."appId.collect" | string | `"log"` | way to collect applicationId: log, aop |
|
||||
| conf.common."aws.credentials.provider.type" | string | `"AWSStaticCredentialsProvider"` | |
|
||||
| conf.common."aws.s3.access.key.id" | string | `"minioadmin"` | The AWS access key. if resource.storage.type=S3, and credentials.provider.type is AWSStaticCredentialsProvider. This configuration is required |
|
||||
| conf.common."aws.s3.access.key.secret" | string | `"minioadmin"` | The AWS secret access key. if resource.storage.type=S3, and credentials.provider.type is AWSStaticCredentialsProvider. This configuration is required |
|
||||
| conf.common."aws.s3.bucket.name" | string | `"dolphinscheduler"` | The name of the bucket. You need to create them by yourself. Otherwise, the system cannot start. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name. |
|
||||
| conf.common."aws.s3.endpoint" | string | `"http://minio:9000"` | You need to set this parameter when private cloud s3. If S3 uses public cloud, you only need to set resource.aws.region or set to the endpoint of a public cloud such as S3.cn-north-1.amazonaws.com.cn |
|
||||
| conf.common."aws.s3.region" | string | `"ca-central-1"` | The AWS Region to use. if resource.storage.type=S3, This configuration is required |
|
||||
| conf.common."conda.path" | string | `"/opt/anaconda3/etc/profile.d/conda.sh"` | set path of conda.sh |
|
||||
| conf.common."data-quality.jar.dir" | string | `nil` | data quality option |
|
||||
| conf.common."data.basedir.path" | string | `"/tmp/dolphinscheduler"` | user data local directory path, please make sure the directory exists and have read write permissions |
|
||||
|
|
@ -144,6 +138,11 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
|
|||
| conf.common."resource.alibaba.cloud.oss.bucket.name" | string | `"dolphinscheduler"` | oss bucket name, required if you set resource.storage.type=OSS |
|
||||
| conf.common."resource.alibaba.cloud.oss.endpoint" | string | `"https://oss-cn-hangzhou.aliyuncs.com"` | oss bucket endpoint, required if you set resource.storage.type=OSS |
|
||||
| conf.common."resource.alibaba.cloud.region" | string | `"cn-hangzhou"` | alibaba cloud region, required if you set resource.storage.type=OSS |
|
||||
| conf.common."resource.aws.access.key.id" | string | `"minioadmin"` | The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required |
|
||||
| conf.common."resource.aws.region" | string | `"ca-central-1"` | The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required |
|
||||
| conf.common."resource.aws.s3.bucket.name" | string | `"dolphinscheduler"` | The name of the bucket. You need to create them by yourself. Otherwise, the system cannot start. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name. |
|
||||
| conf.common."resource.aws.s3.endpoint" | string | `"http://minio:9000"` | You need to set this parameter when private cloud s3. If S3 uses public cloud, you only need to set resource.aws.region or set to the endpoint of a public cloud such as S3.cn-north-1.amazonaws.com.cn |
|
||||
| conf.common."resource.aws.secret.access.key" | string | `"minioadmin"` | The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required |
|
||||
| conf.common."resource.azure.client.id" | string | `"minioadmin"` | azure storage account name, required if you set resource.storage.type=ABS |
|
||||
| conf.common."resource.azure.client.secret" | string | `"minioadmin"` | azure storage account key, required if you set resource.storage.type=ABS |
|
||||
| conf.common."resource.azure.subId" | string | `"minioadmin"` | azure storage subId, required if you set resource.storage.type=ABS |
|
||||
|
|
@ -159,7 +158,6 @@ Please refer to the [Quick Start in Kubernetes](../../../docs/docs/en/guide/inst
|
|||
| conf.common."yarn.application.status.address" | string | `"http://ds1:%s/ws/v1/cluster/apps/%s"` | if resourcemanager HA is enabled or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname |
|
||||
| conf.common."yarn.job.history.status.address" | string | `"http://ds1:19888/ws/v1/history/mapreduce/jobs/%s"` | job history status url when application number threshold is reached(default 10000, maybe it was set to 1000) |
|
||||
| conf.common."yarn.resourcemanager.ha.rm.ids" | string | `"192.168.xx.xx,192.168.xx.xx"` | if resourcemanager HA is enabled, please set the HA IPs; if resourcemanager is single, keep this value empty |
|
||||
| datasource.profile | string | `"postgresql"` | The profile of datasource |
|
||||
| externalDatabase.database | string | `"dolphinscheduler"` | The database of external database |
|
||||
| externalDatabase.driverClassName | string | `"org.postgresql.Driver"` | The driverClassName of external database |
|
||||
| externalDatabase.enabled | bool | `false` | If exists external database, and set postgresql.enable value to false. external database will be used, otherwise Dolphinscheduler's internal database will be used. |
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ Create a default common labels.
|
|||
{{- define "dolphinscheduler.common.labels" -}}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
|
|
|
|||
|
|
@ -33,13 +33,15 @@ data:
|
|||
banner:
|
||||
charset: UTF-8
|
||||
datasource:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
|
||||
username: root
|
||||
password: root
|
||||
hikari:
|
||||
connection-test-query: select 1
|
||||
pool-name: DolphinScheduler
|
||||
profile: postgresql
|
||||
config:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
|
||||
username: root
|
||||
password: root
|
||||
hikari:
|
||||
connection-test-query: select 1
|
||||
pool-name: DolphinScheduler
|
||||
|
||||
# Mybatis-plus configuration, you don't need to change it
|
||||
mybatis-plus:
|
||||
|
|
@ -100,16 +102,4 @@ data:
|
|||
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
# Override by profile
|
||||
---
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: mysql
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler
|
||||
username: root
|
||||
password: root
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -54,13 +54,15 @@ data:
|
|||
messages:
|
||||
basename: i18n/messages
|
||||
datasource:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
|
||||
username: root
|
||||
password: root
|
||||
hikari:
|
||||
connection-test-query: select 1
|
||||
pool-name: DolphinScheduler
|
||||
profile: postgresql
|
||||
config:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
|
||||
username: root
|
||||
password: root
|
||||
hikari:
|
||||
connection-test-query: select 1
|
||||
pool-name: DolphinScheduler
|
||||
quartz:
|
||||
auto-startup: false
|
||||
job-store-type: jdbc
|
||||
|
|
@ -237,21 +239,6 @@ data:
|
|||
application-name: ""
|
||||
# Doplhinscheduler login url
|
||||
redirect-url: ""
|
||||
|
||||
# Override by profile
|
||||
---
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: mysql
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler
|
||||
username: root
|
||||
password: root
|
||||
quartz:
|
||||
properties:
|
||||
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
|
||||
{{- end }}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -33,13 +33,15 @@ data:
|
|||
time-zone: UTC
|
||||
date-format: "yyyy-MM-dd HH:mm:ss"
|
||||
datasource:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
|
||||
username: root
|
||||
password: root
|
||||
hikari:
|
||||
connection-test-query: select 1
|
||||
pool-name: DolphinScheduler
|
||||
profile: postgresql
|
||||
config:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler
|
||||
username: root
|
||||
password: root
|
||||
hikari:
|
||||
connection-test-query: select 1
|
||||
pool-name: DolphinScheduler
|
||||
quartz:
|
||||
job-store-type: jdbc
|
||||
jdbc:
|
||||
|
|
@ -155,19 +157,4 @@ data:
|
|||
|
||||
metrics:
|
||||
enabled: true
|
||||
|
||||
# Override by profile
|
||||
---
|
||||
spring:
|
||||
config:
|
||||
activate:
|
||||
on-profile: mysql
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler
|
||||
username: root
|
||||
password: root
|
||||
quartz:
|
||||
properties:
|
||||
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ data:
|
|||
{{- range $key, $value := index .Values.conf "common" }}
|
||||
{{- if and $.Values.minio.enabled }}
|
||||
{{- if eq $key "resource.storage.type" }}{{ $value = "S3" }}{{- end }}
|
||||
{{- if eq $key "aws.s3.endpoint" }}{{ $value = print "http://" (include "dolphinscheduler.minio.fullname" $) ":9000" }}{{- end }}
|
||||
{{- if eq $key "resource.aws.s3.endpoint" }}{{ $value = print "http://" (include "dolphinscheduler.minio.fullname" $) ":9000" }}{{- end }}
|
||||
{{- end }}
|
||||
{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -131,5 +131,5 @@ spec:
|
|||
name: {{ include "dolphinscheduler.fullname" . }}-configs
|
||||
- name: alert-config-volume
|
||||
configMap:
|
||||
name: {{ include "dolphinscheduler.fullname" . }}-alert
|
||||
name: { { include "dolphinscheduler.fullname" . } }-alert
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ spec:
|
|||
name: {{ include "dolphinscheduler.fullname" . }}-configs
|
||||
- name: api-config-volume
|
||||
configMap:
|
||||
name: {{ include "dolphinscheduler.fullname" . }}-api
|
||||
name: { { include "dolphinscheduler.fullname" . } }-api
|
||||
{{- include "dolphinscheduler.sharedStorage.volume" . | nindent 8 }}
|
||||
{{- include "dolphinscheduler.fsFileResource.volume" . | nindent 8 }}
|
||||
{{- include "dolphinscheduler.ldap.ssl.volume" . | nindent 8 }}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ spec:
|
|||
{{- end }}
|
||||
- name: master-config-volume
|
||||
configMap:
|
||||
name: {{ include "dolphinscheduler.fullname" . }}-master
|
||||
name: { { include "dolphinscheduler.fullname" . } }-master
|
||||
{{- include "dolphinscheduler.sharedStorage.volume" . | nindent 8 }}
|
||||
- name: config-volume
|
||||
configMap:
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ spec:
|
|||
{{- end }}
|
||||
- name: worker-config-volume
|
||||
configMap:
|
||||
name: {{ include "dolphinscheduler.fullname" . }}-worker
|
||||
name: { { include "dolphinscheduler.fullname" . } }-worker
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: {{ include "dolphinscheduler.fullname" . }}-configs
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ image:
|
|||
# -- Docker image repository for the DolphinScheduler
|
||||
registry: apache
|
||||
# -- Docker image version for the DolphinScheduler
|
||||
tag: 3.2.2
|
||||
tag: latest
|
||||
# -- Image pull policy. Options: Always, Never, IfNotPresent
|
||||
pullPolicy: "IfNotPresent"
|
||||
# -- Specify a imagePullSecrets
|
||||
|
|
@ -49,10 +49,6 @@ image:
|
|||
# -- tools image
|
||||
tools: dolphinscheduler-tools
|
||||
|
||||
datasource:
|
||||
# -- The profile of datasource
|
||||
profile: postgresql
|
||||
|
||||
postgresql:
|
||||
# -- If not exists external PostgreSQL, by default, the DolphinScheduler will use a internal PostgreSQL
|
||||
enabled: true
|
||||
|
|
@ -250,25 +246,20 @@ conf:
|
|||
# -- resource store on HDFS/S3 path, resource file will store to this base path, self configuration, please make sure the directory exists on hdfs and have read write permissions. "/dolphinscheduler" is recommended
|
||||
resource.storage.upload.base.path: /dolphinscheduler
|
||||
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
aws.credentials.provider.type: AWSStaticCredentialsProvider
|
||||
# -- The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.access.key.id: minioadmin
|
||||
|
||||
# -- The AWS access key. if resource.storage.type=S3, and credentials.provider.type is AWSStaticCredentialsProvider. This configuration is required
|
||||
aws.s3.access.key.id: minioadmin
|
||||
# -- The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key: minioadmin
|
||||
|
||||
# -- The AWS secret access key. if resource.storage.type=S3, and credentials.provider.type is AWSStaticCredentialsProvider. This configuration is required
|
||||
aws.s3.access.key.secret: minioadmin
|
||||
|
||||
# -- The AWS Region to use. if resource.storage.type=S3, This configuration is required
|
||||
aws.s3.region: ca-central-1
|
||||
# -- The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region: ca-central-1
|
||||
|
||||
# -- The name of the bucket. You need to create them by yourself. Otherwise, the system cannot start. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name.
|
||||
aws.s3.bucket.name: dolphinscheduler
|
||||
resource.aws.s3.bucket.name: dolphinscheduler
|
||||
|
||||
# -- You need to set this parameter when private cloud s3. If S3 uses public cloud, you only need to set resource.aws.region or set to the endpoint of a public cloud such as S3.cn-north-1.amazonaws.com.cn
|
||||
aws.s3.endpoint: http://minio:9000
|
||||
resource.aws.s3.endpoint: http://minio:9000
|
||||
|
||||
# -- alibaba cloud access key id, required if you set resource.storage.type=OSS
|
||||
resource.alibaba.cloud.access.key.id: <your-access-key-id>
|
||||
|
|
|
|||
|
|
@ -191,21 +191,19 @@ The default configuration is as follows:
|
|||
|
||||
Note that DolphinScheduler also supports zookeeper related configuration through `bin/env/dolphinscheduler_env.sh`.
|
||||
|
||||
For ETCD Registry, please see more details
|
||||
on [link](https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-etcd/README.md).
|
||||
For JDBC Registry, please see more details
|
||||
on [link](https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/README.md).
|
||||
For ETCD Registry, please see more details on [link](https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-etcd/README.md).
|
||||
For JDBC Registry, please see more details on [link](https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/README.md).
|
||||
|
||||
### common.properties [hadoop、s3、yarn config properties]
|
||||
|
||||
Currently, common.properties mainly configures Hadoop,s3a related configurations. Configuration file location:
|
||||
|
||||
| Service | Configuration file |
|
||||
|---------------|-----------------------------------------------------------------------|
|
||||
| Master Server | `master-server/conf/common.properties` |
|
||||
| Api Server | `api-server/conf/common.properties`, `api-server/conf/aws.yaml` |
|
||||
| Worker Server | `worker-server/conf/common.properties`, `worker-server/conf/aws.yaml` |
|
||||
| Alert Server | `alert-server/conf/common.properties` |
|
||||
| Service | Configuration file |
|
||||
|---------------|----------------------------------------|
|
||||
| Master Server | `master-server/conf/common.properties` |
|
||||
| Api Server | `api-server/conf/common.properties` |
|
||||
| Worker Server | `worker-server/conf/common.properties` |
|
||||
| Alert Server | `alert-server/conf/common.properties` |
|
||||
|
||||
The default configuration is as follows:
|
||||
|
||||
|
|
@ -214,6 +212,10 @@ The default configuration is as follows:
|
|||
| data.basedir.path | /tmp/dolphinscheduler | local directory used to store temp files |
|
||||
| resource.storage.type | NONE | type of resource files: HDFS, S3, OSS, GCS, ABS, NONE |
|
||||
| resource.upload.path | /dolphinscheduler | storage path of resource files |
|
||||
| aws.access.key.id | minioadmin | access key id of S3 |
|
||||
| aws.secret.access.key | minioadmin | secret access key of S3 |
|
||||
| aws.region | us-east-1 | region of S3 |
|
||||
| aws.s3.endpoint | http://minio:9000 | endpoint of S3 |
|
||||
| hdfs.root.user | hdfs | configure users with corresponding permissions if storage type is HDFS |
|
||||
| fs.defaultFS | hdfs://mycluster:8020 | If resource.storage.type=S3, then the request url would be similar to 's3a://dolphinscheduler'. Otherwise if resource.storage.type=HDFS and hadoop supports HA, copy core-site.xml and hdfs-site.xml into 'conf' directory |
|
||||
| hadoop.security.authentication.startup.state | false | whether hadoop grant kerberos permission |
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ svn --username="${A_USERNAME}" commit -m "release ${VERSION}"
|
|||
|
||||
#### Check source package
|
||||
|
||||
Decompress `apache-dolphinscheduler-3.2.2-src.tar.gz` then check the following items:
|
||||
Decompress `apache-dolphinscheduler-<VERSION>-src.tar.gz` then check the following items:
|
||||
|
||||
- Check whether source tarball is oversized for including nonessential files
|
||||
- `LICENSE` and `NOTICE` files exist
|
||||
|
|
@ -353,7 +353,7 @@ Decompress `apache-dolphinscheduler-3.2.2-src.tar.gz` then check the following i
|
|||
|
||||
#### Check binary packages
|
||||
|
||||
Decompress `apache-dolphinscheduler-3.2.2-bin.tar.gz` to check the following items:
|
||||
Decompress `apache-dolphinscheduler-<VERSION>-bin.tar.gz` to check the following items:
|
||||
|
||||
- `LICENSE` and `NOTICE` files exist
|
||||
- Correct year in `NOTICE` file
|
||||
|
|
@ -389,7 +389,7 @@ Announce the vote result: send the result vote e-mail to `dev@dolphinscheduler.a
|
|||
Title:
|
||||
|
||||
```txt
|
||||
[VOTE] Release Apache DolphinScheduler 3.2.2
|
||||
[VOTE] Release Apache DolphinScheduler <VERSION>
|
||||
```
|
||||
|
||||
Body:
|
||||
|
|
@ -397,15 +397,15 @@ Body:
|
|||
```txt
|
||||
Hello DolphinScheduler Community,
|
||||
|
||||
This is a call for vote to release Apache DolphinScheduler version 3.2.2
|
||||
This is a call for vote to release Apache DolphinScheduler version <VERSION>
|
||||
|
||||
Release notes: https://github.com/apache/dolphinscheduler/releases/tag/3.2.2
|
||||
Release notes: https://github.com/apache/dolphinscheduler/releases/tag/<VERSION>
|
||||
|
||||
The release candidates: https://dist.apache.org/repos/dist/dev/dolphinscheduler/3.2.2/
|
||||
The release candidates: https://dist.apache.org/repos/dist/dev/dolphinscheduler/<VERSION>/
|
||||
|
||||
Maven 2 staging repository: https://repository.apache.org/content/repositories/<STAGING.REPOSITORY>/org/apache/dolphinscheduler/
|
||||
|
||||
Git tag for the release: https://github.com/apache/dolphinscheduler/tree/3.2.2
|
||||
Git tag for the release: https://github.com/apache/dolphinscheduler/tree/<VERSION>
|
||||
|
||||
Release Commit ID: https://github.com/apache/dolphinscheduler/commit/<SHA-VALUE>
|
||||
|
||||
|
|
@ -436,13 +436,13 @@ Checklist for reference:
|
|||
Title:
|
||||
|
||||
```txt
|
||||
[RESULT][VOTE] Release Apache DolphinScheduler 3.2.2
|
||||
[RESULT][VOTE] Release Apache DolphinScheduler <VERSION>
|
||||
```
|
||||
|
||||
Body:
|
||||
|
||||
```txt
|
||||
The vote to release Apache DolphinScheduler 3.2.2 has passed.Here is the vote result,
|
||||
The vote to release Apache DolphinScheduler <VERSION> has passed.Here is the vote result,
|
||||
|
||||
4 PMC member +1 votes:
|
||||
|
||||
|
|
@ -478,19 +478,19 @@ and then find DolphinScheduler in [apache staging repositories](https://reposito
|
|||
### Update Document
|
||||
|
||||
Website should be present before you send the announce mail this section will tell you how to change the website. For example,
|
||||
the release version is `3.2.2`, the following updates are required(note it will take effect immediately when the PR is merged):
|
||||
the release version is `<VERSION>`, the following updates are required(note it will take effect immediately when the PR is merged):
|
||||
|
||||
- Repository **apache/dolphinscheduler-website**:
|
||||
- `config/download.json`: add the download of the `3.2.2` release package
|
||||
- `scripts/conf.sh`: Add new release version `3.2.2` key-value pair to variable `DEV_RELEASE_DOCS_VERSIONS`
|
||||
- `config/download.json`: add the download of the `<VERSION>` release package
|
||||
- `scripts/conf.sh`: Add new release version `<VERSION>` key-value pair to variable `DEV_RELEASE_DOCS_VERSIONS`
|
||||
- Repository **apache/dolphinscheduler** (dev branch):
|
||||
- `docs/configs/site.js`:
|
||||
- `docsLatest`: update to `3.2.2`
|
||||
- `docs0`: The `text` of two places of `en-us/zh-cn` needs to be updated to `latest(3.2.2)`
|
||||
- `docs/configs/index.md.jsx`: Add `3.2.2: docsxyzConfig` and add new `import` for the new `docsxyzConfig`
|
||||
- `docs/docs/en/history-versions.md` and `docs/docs/zh/history-versions.md`: Add new `3.2.2` release docs.
|
||||
- `docsLatest`: update to `<VERSION>`
|
||||
- `docs0`: The `text` of two places of `en-us/zh-cn` needs to be updated to `latest(<VERSION>)`
|
||||
- `docs/configs/index.md.jsx`: Add `<VERSION>: docsxyzConfig` and add new `import` for the new `docsxyzConfig`
|
||||
- `docs/docs/en/history-versions.md` and `docs/docs/zh/history-versions.md`: Add new `<VERSION>` release docs.
|
||||
- `.github/ISSUE_TEMPLATE/bug-report.yml`: DolphinScheduler's GitHub [bug-report](https://github.com/apache/dolphinscheduler/blob/dev/.github/ISSUE_TEMPLATE/bug-report.yml)
|
||||
issue template have **Version** selection bottom. So after released we should add the new `3.2.2` to
|
||||
issue template have **Version** selection bottom. So after released we should add the new `<VERSION>` to
|
||||
bug-report.yml
|
||||
|
||||
### Publish Docker Image and Helm Chart
|
||||
|
|
@ -511,7 +511,7 @@ Announcement e-mail template as below:
|
|||
Title:
|
||||
|
||||
```txt
|
||||
[ANNOUNCE] Release Apache DolphinScheduler 3.2.2
|
||||
[ANNOUNCE] Release Apache DolphinScheduler <VERSION>
|
||||
```
|
||||
|
||||
Body:
|
||||
|
|
@ -519,7 +519,7 @@ Body:
|
|||
```txt
|
||||
Hi all,
|
||||
|
||||
We are glad to announce the release of Apache DolphinScheduler 3.2.2. Once again I would like to express my thanks to your help.
|
||||
We are glad to announce the release of Apache DolphinScheduler <VERSION>. Once again I would like to express my thanks to your help.
|
||||
|
||||
Dolphin Scheduler is a distributed and easy-to-extend visual workflow scheduler system,
|
||||
dedicated to solving the complex task dependencies in data processing, making the scheduler system out of the box for data processing.
|
||||
|
|
@ -527,14 +527,14 @@ dedicated to solving the complex task dependencies in data processing, making th
|
|||
|
||||
Download Links: https://dolphinscheduler.apache.org/en-us/download
|
||||
|
||||
Release Notes: https://github.com/apache/dolphinscheduler/releases/tag/3.2.2
|
||||
Release Notes: https://github.com/apache/dolphinscheduler/releases/tag/<VERSION>
|
||||
|
||||
Website: https://dolphinscheduler.apache.org/
|
||||
|
||||
DolphinScheduler Resources:
|
||||
- Issue: https://github.com/apache/dolphinscheduler/issues/
|
||||
- Mailing list: dev@dolphinscheduler.apache.org
|
||||
- Documents: https://dolphinscheduler.apache.org/en-us/docs/3.2.2/about/introduction
|
||||
- Documents: https://dolphinscheduler.apache.org/en-us/docs/<VERSION>/about/introduction
|
||||
```
|
||||
|
||||
## News
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ Attention: DolphinScheduler itself does not depend on Hadoop, Hive, Spark, but w
|
|||
mkdir -p /opt
|
||||
cd /opt
|
||||
# decompress
|
||||
tar -zxvf apache-dolphinscheduler-3.2.2-bin.tar.gz -C /opt
|
||||
tar -zxvf apache-dolphinscheduler-<version>-bin.tar.gz -C /opt
|
||||
cd /opt
|
||||
mv apache-dolphinscheduler-3.2.2-bin dolphinscheduler
|
||||
mv apache-dolphinscheduler-<version>-bin dolphinscheduler
|
||||
```
|
||||
|
||||
```markdown
|
||||
|
|
|
|||
|
|
@ -233,9 +233,9 @@ kubectl scale --replicas=6 sts dolphinscheduler-worker -n test # with test names
|
|||
2. Create a new `Dockerfile` to add MySQL driver:
|
||||
|
||||
```
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:3.2.2
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:<version>
|
||||
# For example
|
||||
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-tools:3.2.2
|
||||
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-tools:<version>
|
||||
|
||||
# Attention Please, If the build is dolphinscheduler-tools image
|
||||
# You need to change the following line to: COPY mysql-connector-java-8.0.16.jar /opt/dolphinscheduler/tools/libs
|
||||
|
|
@ -284,9 +284,9 @@ externalDatabase:
|
|||
2. Create a new `Dockerfile` to add MySQL or Oracle driver:
|
||||
|
||||
```
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:3.2.2
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:<version>
|
||||
# For example
|
||||
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:3.2.2
|
||||
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:<version>
|
||||
|
||||
# If you want to support MySQL Datasource
|
||||
COPY mysql-connector-java-8.0.16.jar /opt/dolphinscheduler/libs
|
||||
|
|
@ -316,7 +316,7 @@ docker build -t apache/dolphinscheduler-<service>:new-driver .
|
|||
1. Create a new `Dockerfile` to install pip:
|
||||
|
||||
```
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:3.2.2
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:<version>
|
||||
COPY requirements.txt /tmp
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends python-pip && \
|
||||
|
|
@ -351,7 +351,7 @@ docker build -t apache/dolphinscheduler-worker:pip .
|
|||
1. Create a new `Dockerfile` to install Python 3:
|
||||
|
||||
```
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:3.2.2
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:<version>
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends python3 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ If you want to deploy DolphinScheduler in production, we recommend you follow [c
|
|||
## Preparation
|
||||
|
||||
- JDK:download [JDK][jdk] (1.8+), install and configure environment variable `JAVA_HOME` and append `bin` dir (included in `JAVA_HOME`) to `PATH` variable. You can skip this step if it already exists in your environment.
|
||||
- Binary package: download the DolphinScheduler binary package at [download page](https://dolphinscheduler.apache.org/en-us/download/3.2.2). <!-- markdown-link-check-disable-line -->
|
||||
- Binary package: download the DolphinScheduler binary package at [download page](https://dolphinscheduler.apache.org/en-us/download/<version>). <!-- markdown-link-check-disable-line -->
|
||||
|
||||
## Start DolphinScheduler Standalone Server
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Create a shell task and enter `echo ${dt}` in the script content. In this case,
|
|||
|
||||
### Save the workflow and set global parameters
|
||||
|
||||
Set global parameter: On the workflow definition page, click the plus sign to the right of "Set Global", after filling in the variable name and value, select the appropriate parameter value type, save it.
|
||||
Set global parameter: On the workflow definition page, click the plus sign to the right of "Set Global", after filling in the variable name and value, save it.
|
||||
|
||||

|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Project-level parameters are valid for all task nodes under the entire project.
|
|||
|
||||
### Define project-level parameters
|
||||
|
||||
On the project page, click Project Parameters and Create Parameters, and fill in the parameter name and parameter value, select the appropriate parameter value type. As shown below:
|
||||
On the project page, click Project Parameters and Create Parameters, and fill in the parameter name and parameter value. As shown below:
|
||||
|
||||

|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ Parameters are valid for all task nodes of the entire workflow. It can be config
|
|||
|
||||
## Usage
|
||||
|
||||
Usage of startup parameters is: at the task launch page, click the '+' below the 'Startup Parameter' and fill in the key and value, select the appropriate parameter value type then to save. The workflow will add them into global parameters.
|
||||
Usage of startup parameters is: at the task launch page, click the '+' below the 'Startup Parameter' and fill in the key and value to save. The workflow will add them into global parameters.
|
||||
|
||||
## Example
|
||||
|
||||
|
|
|
|||
|
|
@ -28,37 +28,74 @@ The configuration you may need to change:
|
|||
|
||||
## connect AWS S3
|
||||
|
||||
if you want to upload resources to `Resource Center` connected to `S3`, you need to configure `api-server/conf/common.properties`, `api-server/conf/aws.yaml` and `worker-server/conf/common.properties`, `worker-server/conf/aws.yaml`. You can refer to the following:
|
||||
if you want to upload resources to `Resource Center` connected to `S3`, you need to configure `api-server/conf/common.properties` and `worker-server/conf/common.properties`. You can refer to the following:
|
||||
|
||||
config the following fields
|
||||
|
||||
```properties
|
||||
......
|
||||
|
||||
resource.storage.type=S3
|
||||
|
||||
......
|
||||
|
||||
resource.aws.access.key.id=aws_access_key_id
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key=aws_secret_access_key
|
||||
# The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region=us-west-2
|
||||
# The name of the bucket. You need to create them by yourself. Otherwise, the system cannot start. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name.
|
||||
resource.aws.s3.bucket.name=dolphinscheduler
|
||||
# You need to set this parameter when private cloud s4. If S3 uses public cloud, you only need to set resource.aws.region or set to the endpoint of a public cloud such as S3.cn-north-1.amazonaws.com.cn
|
||||
resource.aws.s3.endpoint=
|
||||
|
||||
......
|
||||
```
|
||||
|
||||
```yaml
|
||||
aws:
|
||||
s3:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: <access.key.id>
|
||||
access.key.secret: <access.key.secret>
|
||||
region: <region>
|
||||
bucket.name: <bucket.name>
|
||||
endpoint: <endpoint>
|
||||
## Use HDFS or Remote Object Storage
|
||||
|
||||
```
|
||||
|
||||
## connect OSS S3
|
||||
|
||||
if you want to upload resources to `Resource Center` connected to `OSS`, you need to configure `api-server/conf/common.properties` and `worker-server/conf/common.properties`. You can refer to the following:
|
||||
|
||||
config the following fields
|
||||
After version 3.0.0-alpha, if you want to upload resources to `Resource Center` connected to `HDFS`, you need to configure `api-server/conf/common.properties` and `worker-server/conf/common.properties`.
|
||||
|
||||
```properties
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# user data local directory path, please make sure the directory exists and have read write permissions
|
||||
data.basedir.path=/tmp/dolphinscheduler
|
||||
|
||||
# resource view suffixs
|
||||
#resource.view.suffixs=txt,log,sh,bat,conf,cfg,py,java,sql,xml,hql,properties,json,yml,yaml,ini,js
|
||||
|
||||
# resource storage type: LOCAL, HDFS, S3, OSS, GCS, ABS, OBS
|
||||
resource.storage.type=LOCAL
|
||||
# resource store on HDFS/S3/OSS path, resource file will store to this base path, self configuration, please make sure the directory exists on hdfs and have read write permissions. "/dolphinscheduler" is recommended
|
||||
resource.storage.upload.base.path=/tmp/dolphinscheduler
|
||||
|
||||
# The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.access.key.id=minioadmin
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key=minioadmin
|
||||
# The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region=cn-north-1
|
||||
# The name of the bucket. You need to create them by yourself. Otherwise, the system cannot start. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name.
|
||||
resource.aws.s3.bucket.name=dolphinscheduler
|
||||
# You need to set this parameter when private cloud s3. If S3 uses public cloud, you only need to set resource.aws.region or set to the endpoint of a public cloud such as S3.cn-north-1.amazonaws.com.cn
|
||||
resource.aws.s3.endpoint=http://localhost:9000
|
||||
|
||||
# alibaba cloud access key id, required if you set resource.storage.type=OSS
|
||||
resource.alibaba.cloud.access.key.id=<your-access-key-id>
|
||||
# alibaba cloud access key secret, required if you set resource.storage.type=OSS
|
||||
|
|
@ -70,24 +107,89 @@ resource.alibaba.cloud.oss.bucket.name=dolphinscheduler
|
|||
# oss bucket endpoint, required if you set resource.storage.type=OSS
|
||||
resource.alibaba.cloud.oss.endpoint=https://oss-cn-hangzhou.aliyuncs.com
|
||||
|
||||
```
|
||||
|
||||
## connect OBS S3
|
||||
|
||||
if you want to upload resources to `Resource Center` connected to `OBS`, you need to configure `api-server/conf/common.properties` and `worker-server/conf/common.properties`. You can refer to the following:
|
||||
|
||||
config the following fields
|
||||
|
||||
```properties
|
||||
# access key id, required if you set resource.storage.type=OBS
|
||||
# alibaba cloud access key id, required if you set resource.storage.type=OBS
|
||||
resource.huawei.cloud.access.key.id=<your-access-key-id>
|
||||
# access key secret, required if you set resource.storage.type=OBS
|
||||
# alibaba cloud access key secret, required if you set resource.storage.type=OBS
|
||||
resource.huawei.cloud.access.key.secret=<your-access-key-secret>
|
||||
# oss bucket name, required if you set resource.storage.type=OBS
|
||||
resource.huawei.cloud.obs.bucket.name=dolphinscheduler
|
||||
# oss bucket endpoint, required if you set resource.storage.type=OBS
|
||||
resource.huawei.cloud.obs.endpoint=obs.cn-southwest-2.huaweicloud.com
|
||||
|
||||
# if resource.storage.type=HDFS, the user must have the permission to create directories under the HDFS root path
|
||||
resource.hdfs.root.user=hdfs
|
||||
# if resource.storage.type=S3, the value like: s3a://dolphinscheduler; if resource.storage.type=HDFS and namenode HA is enabled, you need to copy core-site.xml and hdfs-site.xml to conf dir
|
||||
resource.hdfs.fs.defaultFS=hdfs://mycluster:8020
|
||||
|
||||
# whether to startup kerberos
|
||||
hadoop.security.authentication.startup.state=false
|
||||
|
||||
# java.security.krb5.conf path
|
||||
java.security.krb5.conf.path=/opt/krb5.conf
|
||||
|
||||
# login user from keytab username
|
||||
login.user.keytab.username=hdfs-mycluster@ESZ.COM
|
||||
|
||||
# login user from keytab path
|
||||
login.user.keytab.path=/opt/hdfs.headless.keytab
|
||||
|
||||
# kerberos expire time, the unit is hour
|
||||
kerberos.expire.time=2
|
||||
|
||||
|
||||
# resourcemanager port, the default value is 8088 if not specified
|
||||
resource.manager.httpaddress.port=8088
|
||||
# if resourcemanager HA is enabled, please set the HA IPs; if resourcemanager is single, keep this value empty
|
||||
yarn.resourcemanager.ha.rm.ids=192.168.xx.xx,192.168.xx.xx
|
||||
# if resourcemanager HA is enabled or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname
|
||||
yarn.application.status.address=http://ds1:%s/ws/v1/cluster/apps/%s
|
||||
# job history status url when application number threshold is reached(default 10000, maybe it was set to 1000)
|
||||
yarn.job.history.status.address=http://ds1:19888/ws/v1/history/mapreduce/jobs/%s
|
||||
|
||||
# datasource encryption enable
|
||||
datasource.encryption.enable=false
|
||||
|
||||
# datasource encryption salt
|
||||
datasource.encryption.salt=!@#$%^&*
|
||||
|
||||
# data quality jar directory path, it would auto discovery data quality jar from this given dir. You should keep it empty if you do not change anything in
|
||||
# data-quality, it will auto discovery by dolphinscheduler itself. Change it only if you want to use your own data-quality jar and it is not in worker-server
|
||||
# libs directory(but may sure your jar name start with `dolphinscheduler-data-quality`).
|
||||
data-quality.jar.dir=
|
||||
|
||||
#data-quality.error.output.path=/tmp/data-quality-error-data
|
||||
|
||||
# Network IP gets priority, default inner outer
|
||||
|
||||
# Whether hive SQL is executed in the same session
|
||||
support.hive.oneSession=false
|
||||
|
||||
# use sudo or not, if set true, executing user is tenant user and deploy user needs sudo permissions; if set false, executing user is the deploy user and doesn't need sudo permissions
|
||||
sudo.enable=true
|
||||
|
||||
# network interface preferred like eth0, default: empty
|
||||
#dolphin.scheduler.network.interface.preferred=
|
||||
|
||||
# network IP gets priority, default: inner outer
|
||||
#dolphin.scheduler.network.priority.strategy=default
|
||||
|
||||
# system env path
|
||||
#dolphinscheduler.env.path=dolphinscheduler_env.sh
|
||||
|
||||
# development state
|
||||
development.state=false
|
||||
|
||||
# rpc port
|
||||
alert.rpc.port=50052
|
||||
|
||||
# set path of conda.sh
|
||||
conda.path=/opt/anaconda3/etc/profile.d/conda.sh
|
||||
|
||||
# Task resource limit state
|
||||
task.resource.limit.state=false
|
||||
|
||||
# way to collect applicationId: log(original regex match), aop
|
||||
appId.collect: log
|
||||
```
|
||||
|
||||
> **Note:**
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Start DolphinScheduler with standalone-server Docker images is the easiest way t
|
|||
you can learn DolphinScheduler's concepts and usage, with minimal cost.
|
||||
|
||||
```shell
|
||||
$ DOLPHINSCHEDULER_VERSION=3.2.2
|
||||
$ DOLPHINSCHEDULER_VERSION=<version>
|
||||
$ docker run --name dolphinscheduler-standalone-server -p 12345:12345 -p 25333:25333 -d apache/dolphinscheduler-standalone-server:"${DOLPHINSCHEDULER_VERSION}"
|
||||
```
|
||||
|
||||
|
|
@ -37,11 +37,11 @@ be stored on disks after you change docker-compose configuration, and it is robu
|
|||
DolphinScheduler in a long term. You have to install [docker-compose](https://docs.docker.com/compose/install/) before you
|
||||
start servers.
|
||||
|
||||
After complete the installation, get the `docker-compose.yaml` file from [download page](https://dolphinscheduler.apache.org/en-us/download/3.2.2)
|
||||
After complete the installation, get the `docker-compose.yaml` file from [download page](https://dolphinscheduler.apache.org/en-us/download/<version>)
|
||||
form its source package, and make sure you get the right version. After download the package, you can run the commands as below.
|
||||
|
||||
```shell
|
||||
$ DOLPHINSCHEDULER_VERSION=3.2.2
|
||||
$ DOLPHINSCHEDULER_VERSION=<version>
|
||||
$ tar -zxf apache-dolphinscheduler-"${DOLPHINSCHEDULER_VERSION}"-src.tar.gz
|
||||
# Going to docker-compose's location
|
||||
# For Mac or Linux users
|
||||
|
|
@ -68,7 +68,7 @@ $ docker-compose --profile all up -d
|
|||
container when it up. You could start DolphinScheduler server separately if you want to reuse your exists services.
|
||||
|
||||
```shell
|
||||
$ DOLPHINSCHEDULER_VERSION=3.2.2
|
||||
$ DOLPHINSCHEDULER_VERSION=<version>
|
||||
# Initialize the database, make sure database <DATABASE> already exists
|
||||
$ docker run -d --name dolphinscheduler-tools \
|
||||
-e DATABASE="postgresql" \
|
||||
|
|
@ -134,5 +134,5 @@ and use `admin` and `dolphinscheduler123` as default username and password in th
|
|||
|
||||
You can modify some environment variables to change configurations when you are starting servers through Docker. We have
|
||||
an example in [using exists PostgreSQL ZooKeeper](#using-exists-postgresql-zookeeper) to change database and ZooKeeper configurations,
|
||||
and you could find all environment variables in [all environment variables](https://github.com/apache/dolphinscheduler/blob/3.2.2/script/env/dolphinscheduler_env.sh) <!-- markdown-link-check-disable-line -->
|
||||
and you could find all environment variables in [all environment variables](https://github.com/apache/dolphinscheduler/blob/<version>/script/env/dolphinscheduler_env.sh) <!-- markdown-link-check-disable-line -->
|
||||
and change them if you want.
|
||||
|
|
|
|||
|
|
@ -73,17 +73,14 @@ Parameters of restarting the task by interface
|
|||
|
||||
## Environment to prepare
|
||||
|
||||
Some AWS configuration is required, modify a field in file `aws.yaml`
|
||||
Some AWS configuration is required, modify a field in file `common.properties`
|
||||
|
||||
```yaml
|
||||
dms:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: <access.key.id>
|
||||
access.key.secret: <access.key.secret>
|
||||
region: <region>
|
||||
endpoint: <endpoint>
|
||||
# The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.access.key.id=<YOUR AWS ACCESS KEY>
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key=<YOUR AWS SECRET KEY>
|
||||
# The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region=<AWS REGION>
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -35,17 +35,14 @@ The task plugin are shown as follows:
|
|||
|
||||
## Environment to prepare
|
||||
|
||||
Some AWS configuration is required, modify a field in file `aws.yaml`
|
||||
Some AWS configuration is required, modify a field in file `common.properties`
|
||||
|
||||
```yaml
|
||||
sagemaker:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: <access.key.id>
|
||||
access.key.secret: <access.key.secret>
|
||||
region: <region>
|
||||
endpoint: <endpoint>
|
||||
# The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.access.key.id=<YOUR AWS ACCESS KEY>
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key=<YOUR AWS SECRET KEY>
|
||||
# The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region=<AWS REGION>
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
#### Setup instructions, are available for each stable version of Apache DolphinScheduler below:
|
||||
|
||||
### Versions: 3.2.2
|
||||
|
||||
#### Links: [3.2.2 Document](../3.2.2/user_doc/about/introduction.md)
|
||||
|
||||
### Versions: 3.2.1
|
||||
|
||||
#### Links: [3.2.1 Document](../3.2.1/user_doc/about/introduction.md)
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ svn --username="${A_USERNAME}" commit -m "release ${VERSION}"
|
|||
|
||||
#### 检查源码包的文件内容
|
||||
|
||||
解压缩`apache-dolphinscheduler-3.2.2-src.tar.gz`,进行如下检查:
|
||||
解压缩`apache-dolphinscheduler-<VERSION>-src.tar.gz`,进行如下检查:
|
||||
|
||||
- 检查源码包是否包含由于包含不必要文件,致使 tarball 过于庞大
|
||||
- 存在`LICENSE`和`NOTICE`文件
|
||||
|
|
@ -359,7 +359,7 @@ svn --username="${A_USERNAME}" commit -m "release ${VERSION}"
|
|||
|
||||
#### 检查二进制包的文件内容
|
||||
|
||||
解压缩`apache-dolphinscheduler-3.2.2-bin.tar.gz`进行如下检查:
|
||||
解压缩`apache-dolphinscheduler-<VERSION>-bin.tar.gz`进行如下检查:
|
||||
|
||||
- 存在`LICENSE`和`NOTICE`文件
|
||||
- 所有文本文件开头都有 ASF 许可证
|
||||
|
|
@ -394,7 +394,7 @@ DolphinScheduler 社区投票,发起投票邮件到`dev@dolphinscheduler.apach
|
|||
标题:
|
||||
|
||||
```txt
|
||||
[VOTE] Release Apache DolphinScheduler 3.2.2
|
||||
[VOTE] Release Apache DolphinScheduler <VERSION>
|
||||
```
|
||||
|
||||
正文:
|
||||
|
|
@ -402,15 +402,15 @@ DolphinScheduler 社区投票,发起投票邮件到`dev@dolphinscheduler.apach
|
|||
```txt
|
||||
Hello DolphinScheduler Community,
|
||||
|
||||
This is a call for vote to release Apache DolphinScheduler version 3.2.2
|
||||
This is a call for vote to release Apache DolphinScheduler version <VERSION>
|
||||
|
||||
Release notes: https://github.com/apache/dolphinscheduler/releases/tag/3.2.2
|
||||
Release notes: https://github.com/apache/dolphinscheduler/releases/tag/<VERSION>
|
||||
|
||||
The release candidates: https://dist.apache.org/repos/dist/dev/dolphinscheduler/3.2.2/
|
||||
The release candidates: https://dist.apache.org/repos/dist/dev/dolphinscheduler/<VERSION>/
|
||||
|
||||
Maven 2 staging repository: https://repository.apache.org/content/repositories/<STAGING.REPOSITORY>/org/apache/dolphinscheduler/
|
||||
|
||||
Git tag for the release: https://github.com/apache/dolphinscheduler/tree/3.2.2
|
||||
Git tag for the release: https://github.com/apache/dolphinscheduler/tree/<VERSION>
|
||||
|
||||
Release Commit ID: https://github.com/apache/dolphinscheduler/commit/<SHA-VALUE>
|
||||
|
||||
|
|
@ -441,11 +441,11 @@ Checklist for reference:
|
|||
Title:
|
||||
|
||||
```txt
|
||||
[RESULT][VOTE] Release Apache DolphinScheduler 3.2.2
|
||||
[RESULT][VOTE] Release Apache DolphinScheduler <VERSION>
|
||||
```
|
||||
|
||||
```txt
|
||||
The vote to release Apache DolphinScheduler 3.2.2 has passed.Here is the vote result,
|
||||
The vote to release Apache DolphinScheduler <VERSION> has passed.Here is the vote result,
|
||||
|
||||
4 PMC member +1 votes:
|
||||
|
||||
|
|
@ -480,17 +480,17 @@ git push --delete "${GH_REMOTE}" "${VERSION}-prepare"
|
|||
|
||||
### 更新文档
|
||||
|
||||
官网应该在您发送通知邮件之前完成更新,本节将告诉您如何更改网站。假设发版的版本是 `3.2.2`,需要进行以下更新(注意,当修改 pull requests 被 merge 后就会生效):
|
||||
官网应该在您发送通知邮件之前完成更新,本节将告诉您如何更改网站。假设发版的版本是 `<VERSION>`,需要进行以下更新(注意,当修改 pull requests 被 merge 后就会生效):
|
||||
|
||||
- **apache/dolphinscheduler-website** 仓库:
|
||||
- `config/download.json`: 增加 `3.2.2` 版本发布包的下载
|
||||
- `scripts/conf.sh`: 在变量 `DEV_RELEASE_DOCS_VERSIONS` 中增加版本为 `3.2.2` 的新键值对
|
||||
- `config/download.json`: 增加 `<VERSION>` 版本发布包的下载
|
||||
- `scripts/conf.sh`: 在变量 `DEV_RELEASE_DOCS_VERSIONS` 中增加版本为 `<VERSION>` 的新键值对
|
||||
- **apache/dolphinscheduler** 仓库 (dev 分支):
|
||||
- `docs/configs/site.js`:
|
||||
- `docsLatest`: 更新为 `3.2.2`
|
||||
- `docs0`: 两处 `en-us/zh-cn` 的 `text` 更新为 `latest(3.2.2)`
|
||||
- `docs/configs/index.md.jsx`: 增加 `'3.2.2': docsxyzConfig,` 以及新的 `import`
|
||||
- `docs/docs/en/history-versions.md` 和 `docs/docs/zh/history-versions.md`: 增加新的发版版本 `3.2.2` 的链接
|
||||
- `docsLatest`: 更新为 `<VERSION>`
|
||||
- `docs0`: 两处 `en-us/zh-cn` 的 `text` 更新为 `latest(<VERSION>)`
|
||||
- `docs/configs/index.md.jsx`: 增加 `'<VERSION>': docsxyzConfig,` 以及新的 `import`
|
||||
- `docs/docs/en/history-versions.md` 和 `docs/docs/zh/history-versions.md`: 增加新的发版版本 `<VERSION>` 的链接
|
||||
- `.github/ISSUE_TEMPLATE/bug-report.yml`: DolphinScheduler 在 GitHub bug report 的 issue 中有版本选择,当有新的版本发版后,需要更新
|
||||
[bug-report](https://github.com/apache/dolphinscheduler/blob/dev/.github/ISSUE_TEMPLATE/bug-report.yml) 中的 **Version** 部分。
|
||||
|
||||
|
|
@ -510,7 +510,7 @@ git push --delete "${GH_REMOTE}" "${VERSION}-prepare"
|
|||
标题:
|
||||
|
||||
```txt
|
||||
[ANNOUNCE] Release Apache DolphinScheduler 3.2.2
|
||||
[ANNOUNCE] Release Apache DolphinScheduler <VERSION>
|
||||
```
|
||||
|
||||
正文:
|
||||
|
|
@ -518,7 +518,7 @@ git push --delete "${GH_REMOTE}" "${VERSION}-prepare"
|
|||
```txt
|
||||
Hi all,
|
||||
|
||||
We are glad to announce the release of Apache DolphinScheduler 3.2.2. Once again I would like to express my thanks to your help.
|
||||
We are glad to announce the release of Apache DolphinScheduler <VERSION>. Once again I would like to express my thanks to your help.
|
||||
|
||||
Dolphin Scheduler is a distributed and easy-to-extend visual workflow scheduler system,
|
||||
dedicated to solving the complex task dependencies in data processing, making the scheduler system out of the box for data processing.
|
||||
|
|
@ -526,14 +526,14 @@ dedicated to solving the complex task dependencies in data processing, making th
|
|||
|
||||
Download Links: https://dolphinscheduler.apache.org/zh-cn/download
|
||||
|
||||
Release Notes: https://github.com/apache/dolphinscheduler/releases/tag/3.2.2
|
||||
Release Notes: https://github.com/apache/dolphinscheduler/releases/tag/<VERSION>
|
||||
|
||||
Website: https://dolphinscheduler.apache.org/
|
||||
|
||||
DolphinScheduler Resources:
|
||||
- Issue: https://github.com/apache/dolphinscheduler/issues/
|
||||
- Mailing list: dev@dolphinscheduler.apache.org
|
||||
- Documents: https://dolphinscheduler.apache.org/zh-cn/docs/3.2.2/about/introduction
|
||||
- Documents: https://dolphinscheduler.apache.org/zh-cn/docs/<VERSION>/about/introduction
|
||||
```
|
||||
|
||||
## News
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@
|
|||
mkdir -p /opt
|
||||
cd /opt
|
||||
# 解压缩
|
||||
tar -zxvf apache-dolphinscheduler-3.2.2-bin.tar.gz -C /opt
|
||||
tar -zxvf apache-dolphinscheduler-<version>-bin.tar.gz -C /opt
|
||||
cd /opt
|
||||
mv apache-dolphinscheduler-3.2.2-bin dolphinscheduler
|
||||
mv apache-dolphinscheduler-<version>-bin dolphinscheduler
|
||||
```
|
||||
|
||||
```markdown
|
||||
|
|
|
|||
|
|
@ -232,9 +232,9 @@ kubectl scale --replicas=6 sts dolphinscheduler-worker -n test # with test names
|
|||
2. 创建一个新的 `Dockerfile`,用于添加 MySQL 的驱动包:
|
||||
|
||||
```
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:3.2.2
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:<version>
|
||||
# 例如
|
||||
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-tools:3.2.2
|
||||
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-tools:<version>
|
||||
|
||||
# 注意,如果构建的是dolphinscheduler-tools镜像
|
||||
# 需要将下面一行修改为COPY mysql-connector-java-8.0.16.jar /opt/dolphinscheduler/tools/libs
|
||||
|
|
@ -283,9 +283,9 @@ externalDatabase:
|
|||
2. 创建一个新的 `Dockerfile`,用于添加 MySQL 或者 Oracle 驱动包:
|
||||
|
||||
```
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:3.2.2
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:<version>
|
||||
# 例如
|
||||
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:3.2.2
|
||||
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:<version>
|
||||
|
||||
# 如果你想支持 MySQL 数据源
|
||||
COPY mysql-connector-java-8.0.16.jar /opt/dolphinscheduler/libs
|
||||
|
|
@ -315,7 +315,7 @@ docker build -t apache/dolphinscheduler-<service>:new-driver .
|
|||
1. 创建一个新的 `Dockerfile`,用于安装 pip:
|
||||
|
||||
```
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:3.2.2
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:<version>
|
||||
COPY requirements.txt /tmp
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends python-pip && \
|
||||
|
|
@ -350,7 +350,7 @@ docker build -t apache/dolphinscheduler-worker:pip .
|
|||
1. 创建一个新的 `Dockerfile`,用于安装 Python 3:
|
||||
|
||||
```
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:3.2.2
|
||||
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:<version>
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends python3 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Standalone 仅适用于 DolphinScheduler 的快速体验.
|
|||
## 前置准备工作
|
||||
|
||||
- JDK:下载[JDK][jdk] (1.8+),安装并配置 `JAVA_HOME` 环境变量,并将其下的 `bin` 目录追加到 `PATH` 环境变量中。如果你的环境中已存在,可以跳过这步。
|
||||
- 二进制包:在[下载页面](https://dolphinscheduler.apache.org/en-us/download/3.2.2)下载 DolphinScheduler 二进制包 <!-- markdown-link-check-disable-line -->
|
||||
- 二进制包:在[下载页面](https://dolphinscheduler.apache.org/en-us/download/<version>)下载 DolphinScheduler 二进制包 <!-- markdown-link-check-disable-line -->
|
||||
|
||||
## 启动 DolphinScheduler Standalone Server
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
### 保存工作流,并设置全局参数
|
||||
|
||||
全局参数配置方式如下:在工作流定义页面,点击“设置全局”右边的加号,填写对应的变量名称和对应的值,选择相应的参数值类型,保存即可。如下图所示:
|
||||
全局参数配置方式如下:在工作流定义页面,点击“设置全局”右边的加号,填写对应的变量名称和对应的值,保存即可。如下图所示:
|
||||
|
||||

|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
### 定义项目级别参数
|
||||
|
||||
在项目管理页面,点击项目级别参数,点击创建项目级别参数,填写参数名称和参数值,选择相应的参数值类型。如下图所示:
|
||||
在项目管理页面,点击项目级别参数,点击创建项目级别参数,填写参数名称和参数值。如下图所示:
|
||||
|
||||

|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
## 使用方式
|
||||
|
||||
启动参数配置方式如下:在启动前参数设置界面,点击“启动参数“下面的加号,填写对应的参数名称和对应的值,选择相应的参数值类型,点击确定,工作流会将启动参数加入全局参数中。
|
||||
启动参数配置方式如下:在启动前参数设置界面,点击“启动参数“下面的加号,填写对应的参数名称和对应的值,点击确定,工作流会将启动参数加入全局参数中。
|
||||
|
||||
## 任务样例
|
||||
|
||||
|
|
|
|||
|
|
@ -26,35 +26,77 @@ Dolphinscheduler 资源中心使用本地系统默认是开启的,不需要用
|
|||
|
||||
## 对接AWS S3
|
||||
|
||||
如果需要使用到资源中心的 S3 上传资源,我们需要对以下路径的进行配置:`api-server/conf/common.properties`, `api-server/conf/aws.yaml` 和 `worker-server/conf/common.properties`, `worker-server/conf/aws.yaml`。可参考如下:
|
||||
如果需要使用到资源中心的 S3 上传资源,我们需要对以下路径的进行配置:`api-server/conf/common.properties` 和 `worker-server/conf/common.properties`。可参考如下:
|
||||
|
||||
配置以下字段
|
||||
|
||||
```properties
|
||||
......
|
||||
|
||||
resource.storage.type=S3
|
||||
|
||||
......
|
||||
|
||||
resource.aws.access.key.id=aws_access_key_id
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key=aws_secret_access_key
|
||||
# The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region=us-west-2
|
||||
# The name of the bucket. You need to create them by yourself. Otherwise, the system cannot start. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name.
|
||||
resource.aws.s3.bucket.name=dolphinscheduler
|
||||
# You need to set this parameter when private cloud s4. If S3 uses public cloud, you only need to set resource.aws.region or set to the endpoint of a public cloud such as S3.cn-north-1.amazonaws.com.cn
|
||||
resource.aws.s3.endpoint=
|
||||
|
||||
......
|
||||
```
|
||||
|
||||
```yaml
|
||||
aws:
|
||||
s3:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: <access.key.id>
|
||||
access.key.secret: <access.key.secret>
|
||||
region: <region>
|
||||
bucket.name: <bucket.name>
|
||||
endpoint: <endpoint>
|
||||
## 对接分布式或远端对象存储
|
||||
|
||||
```
|
||||
当需要使用资源中心进行相关文件的创建或者上传操作时,所有的文件和资源都会被存储在分布式文件系统`HDFS`或者远端的对象存储,如`S3`上。所以需要进行以下配置:
|
||||
|
||||
## 对接阿里云 OSS
|
||||
### 配置 common.properties 文件
|
||||
|
||||
如果需要使用到资源中心的 OSS 上传资源,我们需要对以下路径的进行配置:`api-server/conf/common.properties` 和 `worker-server/conf/common.properties`。可参考如下:
|
||||
在 3.0.0-alpha 版本之后,如果需要使用到资源中心的 HDFS 或 S3 上传资源,我们需要对以下路径的进行配置:`api-server/conf/common.properties` 和 `worker-server/conf/common.properties`。可参考如下:
|
||||
|
||||
```properties
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# user data local directory path, please make sure the directory exists and have read write permissions
|
||||
data.basedir.path=/tmp/dolphinscheduler
|
||||
|
||||
# resource storage type: LOCAL, HDFS, S3, OSS, GCS, ABS, OBS
|
||||
resource.storage.type=LOCAL
|
||||
|
||||
# resource store on HDFS/S3/OSS path, resource file will store to this hadoop hdfs path, self configuration,
|
||||
# please make sure the directory exists on hdfs and have read write permissions. "/dolphinscheduler" is recommended
|
||||
resource.storage.upload.base.path=/tmp/dolphinscheduler
|
||||
|
||||
# The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.access.key.id=minioadmin
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key=minioadmin
|
||||
# The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region=cn-north-1
|
||||
# The name of the bucket. You need to create them by yourself. Otherwise, the system cannot start. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name.
|
||||
resource.aws.s3.bucket.name=dolphinscheduler
|
||||
# You need to set this parameter when private cloud s3. If S3 uses public cloud, you only need to set resource.aws.region or set to the endpoint of a public cloud such as S3.cn-north-1.amazonaws.com.cn
|
||||
resource.aws.s3.endpoint=http://localhost:9000
|
||||
|
||||
# alibaba cloud access key id, required if you set resource.storage.type=OSS
|
||||
resource.alibaba.cloud.access.key.id=<your-access-key-id>
|
||||
# alibaba cloud access key secret, required if you set resource.storage.type=OSS
|
||||
|
|
@ -66,22 +108,87 @@ resource.alibaba.cloud.oss.bucket.name=dolphinscheduler
|
|||
# oss bucket endpoint, required if you set resource.storage.type=OSS
|
||||
resource.alibaba.cloud.oss.endpoint=https://oss-cn-hangzhou.aliyuncs.com
|
||||
|
||||
```
|
||||
|
||||
## 对接华为云 OBS
|
||||
|
||||
如果需要使用到资源中心的 OBS 上传资源,我们需要对以下路径的进行配置:`api-server/conf/common.properties` 和 `worker-server/conf/common.properties`。可参考如下:
|
||||
|
||||
```properties
|
||||
# access key id, required if you set resource.storage.type=OBS
|
||||
# alibaba cloud access key id, required if you set resource.storage.type=OBS
|
||||
resource.huawei.cloud.access.key.id=<your-access-key-id>
|
||||
# access key secret, required if you set resource.storage.type=OBS
|
||||
# alibaba cloud access key secret, required if you set resource.storage.type=OBS
|
||||
resource.huawei.cloud.access.key.secret=<your-access-key-secret>
|
||||
# oss bucket name, required if you set resource.storage.type=OBS
|
||||
resource.huawei.cloud.obs.bucket.name=dolphinscheduler
|
||||
# oss bucket endpoint, required if you set resource.storage.type=OBS
|
||||
resource.huawei.cloud.obs.endpoint=obs.cn-southwest-2.huaweicloud.com
|
||||
|
||||
# if resource.storage.type=HDFS, the user must have the permission to create directories under the HDFS root path
|
||||
resource.hdfs.root.user=root
|
||||
# if resource.storage.type=S3, the value like: s3a://dolphinscheduler;
|
||||
# if resource.storage.type=HDFS and namenode HA is enabled, you need to copy core-site.xml and hdfs-site.xml to conf dir
|
||||
resource.hdfs.fs.defaultFS=hdfs://localhost:8020
|
||||
|
||||
# whether to startup kerberos
|
||||
hadoop.security.authentication.startup.state=false
|
||||
|
||||
# java.security.krb5.conf path
|
||||
java.security.krb5.conf.path=/opt/krb5.conf
|
||||
|
||||
# login user from keytab username
|
||||
login.user.keytab.username=hdfs-mycluster@ESZ.COM
|
||||
|
||||
# login user from keytab path
|
||||
login.user.keytab.path=/opt/hdfs.headless.keytab
|
||||
|
||||
# kerberos expire time, the unit is hour
|
||||
kerberos.expire.time=2
|
||||
# resource view suffixs
|
||||
#resource.view.suffixs=txt,log,sh,bat,conf,cfg,py,java,sql,xml,hql,properties,json,yml,yaml,ini,js
|
||||
|
||||
# resourcemanager port, the default value is 8088 if not specified
|
||||
resource.manager.httpaddress.port=8088
|
||||
# if resourcemanager HA is enabled, please set the HA IPs; if resourcemanager is single, keep this value empty
|
||||
yarn.resourcemanager.ha.rm.ids=192.168.xx.xx,192.168.xx.xx
|
||||
# if resourcemanager HA is enabled or not use resourcemanager, please keep the default value;
|
||||
# If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname
|
||||
yarn.application.status.address=http://localhost:%s/ds/v1/cluster/apps/%s
|
||||
# job history status url when application number threshold is reached(default 10000, maybe it was set to 1000)
|
||||
yarn.job.history.status.address=http://localhost:19888/ds/v1/history/mapreduce/jobs/%s
|
||||
|
||||
# datasource encryption enable
|
||||
datasource.encryption.enable=false
|
||||
|
||||
# datasource encryption salt
|
||||
datasource.encryption.salt=!@#$%^&*
|
||||
|
||||
# data quality jar directory path, it would auto discovery data quality jar from this given dir. You should keep it empty if you do not change anything in
|
||||
# data-quality, it will auto discovery by dolphinscheduler itself. Change it only if you want to use your own data-quality jar and it is not in worker-server
|
||||
# libs directory(but may sure your jar name start with `dolphinscheduler-data-quality`).
|
||||
data-quality.jar.dir=
|
||||
|
||||
#data-quality.error.output.path=/tmp/data-quality-error-data
|
||||
|
||||
# Network IP gets priority, default inner outer
|
||||
|
||||
# Whether hive SQL is executed in the same session
|
||||
support.hive.oneSession=false
|
||||
|
||||
# use sudo or not, if set true, executing user is tenant user and deploy user needs sudo permissions;
|
||||
# if set false, executing user is the deploy user and doesn't need sudo permissions
|
||||
sudo.enable=true
|
||||
|
||||
# network interface preferred like eth0, default: empty
|
||||
#dolphin.scheduler.network.interface.preferred=
|
||||
|
||||
# network IP gets priority, default: inner outer
|
||||
#dolphin.scheduler.network.priority.strategy=default
|
||||
|
||||
# system env path
|
||||
#dolphinscheduler.env.path=env/dolphinscheduler_env.sh
|
||||
|
||||
# development state
|
||||
development.state=false
|
||||
|
||||
# rpc port
|
||||
alert.rpc.port=50052
|
||||
|
||||
# way to collect applicationId: log(original regex match), aop
|
||||
appId.collect: log
|
||||
```
|
||||
|
||||
> **注意**:
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
你可以最快速的体验到 DolphinScheduler 的大部分功能,了解主要和概念和内容。
|
||||
|
||||
```shell
|
||||
$ DOLPHINSCHEDULER_VERSION=3.2.2
|
||||
$ DOLPHINSCHEDULER_VERSION=<version>
|
||||
$ docker run --name dolphinscheduler-standalone-server -p 12345:12345 -p 25333:25333 -d apache/dolphinscheduler-standalone-server:"${DOLPHINSCHEDULER_VERSION}"
|
||||
```
|
||||
|
||||
|
|
@ -33,11 +33,11 @@ $ docker run --name dolphinscheduler-standalone-server -p 12345:12345 -p 25333:2
|
|||
服务重启的时候保留元数据(如需要挂载到本地路径需要做指定)。他更健壮,能保证用户体验更加完整的 DolphinScheduler 服务。这种方式需要先安装
|
||||
[docker-compose](https://docs.docker.com/compose/install/),链接适用于 Mac,Linux,Windows。
|
||||
|
||||
确保 docker-compose 顺利安装后,需要获取 `docker-compose.yaml` 文件,通过[下载页面](https://dolphinscheduler.apache.org/en-us/download/3.2.2)
|
||||
确保 docker-compose 顺利安装后,需要获取 `docker-compose.yaml` 文件,通过[下载页面](https://dolphinscheduler.apache.org/en-us/download/<version>)
|
||||
下载对应版本源码包可能是最快的方法,当下载完源码后就可以运行命令进行部署了。
|
||||
|
||||
```shell
|
||||
$ DOLPHINSCHEDULER_VERSION=3.2.2
|
||||
$ DOLPHINSCHEDULER_VERSION=<version>
|
||||
$ tar -zxf apache-dolphinscheduler-"${DOLPHINSCHEDULER_VERSION}"-src.tar.gz
|
||||
# Mac Linux 用户
|
||||
$ cd apache-dolphinscheduler-"${DOLPHINSCHEDULER_VERSION}"-src/deploy/docker
|
||||
|
|
@ -61,7 +61,7 @@ $ docker-compose --profile all up -d
|
|||
ZooKeeper 且不想启动新的服务,可以使用这个方式分别启动 DolphinScheduler 容器。
|
||||
|
||||
```shell
|
||||
$ DOLPHINSCHEDULER_VERSION=3.2.2
|
||||
$ DOLPHINSCHEDULER_VERSION=<version>
|
||||
# 初始化数据库,其确保数据库 <DATABASE> 已经存在
|
||||
$ docker run -d --name dolphinscheduler-tools \
|
||||
-e DATABASE="postgresql" \
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|----------|--------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| 任务名称 | 任务的名称,同一个工作流定义中的节点名称不能重复。 |
|
||||
| 运行标志 | 标识这个节点是否需要调度执行,如果不需要执行,可以打开禁止执行开关。 |
|
||||
| 缓存执行 | 标识这个节点是否需要进行缓存,如果缓存,则对于相同标识(相同任务版本,相同任务定义,相同参数传入)的任务进行缓存,运行时若已经存在缓存过的任务时,不再重复执行,直接复用结果。 |
|
||||
| 缓存执行 | 标识这个节点是否需要进行缓存,如果缓存,则对于相同标识(相同任务版本,相同任务定义,相同参数传入)的任务进行缓存,运行时若已经存在缓存过的任务时,不在重复执行,直接复用结果。 |
|
||||
| 描述 | 当前节点的功能描述。 |
|
||||
| 任务优先级 | worker线程数不足时,根据优先级从高到低依次执行任务,优先级一样时根据先到先得原则执行。 |
|
||||
| Worker分组 | 设置分组后,任务会被分配给worker组的机器机执行。若选择Default,则会随机选择一个worker执行。 |
|
||||
|
|
|
|||
|
|
@ -73,17 +73,14 @@ DolphinScheduler 在 启动DMS 任务后,会跟中DMS任务状态,直至DMS
|
|||
|
||||
## 环境配置
|
||||
|
||||
需要进行AWS的一些配置,修改`aws.yml`中的以下配置信息
|
||||
需要进行AWS的一些配置,修改`common.properties`中的以下配置信息
|
||||
|
||||
```yaml
|
||||
dms:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: <access.key.id>
|
||||
access.key.secret: <access.key.secret>
|
||||
region: <region>
|
||||
endpoint: <endpoint>
|
||||
# The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.access.key.id=<YOUR AWS ACCESS KEY>
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key=<YOUR AWS SECRET KEY>
|
||||
# The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region=<AWS REGION>
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -33,17 +33,14 @@ DolphinScheduler SageMaker 组件的功能:
|
|||
|
||||
## 环境配置
|
||||
|
||||
需要进行AWS的一些配置,修改`aws.yml`中的以下配置信息
|
||||
需要进行AWS的一些配置,修改`common.properties`中的`xxxxx`为你的配置信息
|
||||
|
||||
```yaml
|
||||
sagemaker:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: <access.key.id>
|
||||
access.key.secret: <access.key.secret>
|
||||
region: <region>
|
||||
endpoint: <endpoint>
|
||||
# The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.access.key.id=<YOUR AWS ACCESS KEY>
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key=<YOUR AWS SECRET KEY>
|
||||
# The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region=<AWS REGION>
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,6 @@
|
|||
|
||||
#### 以下是Apache DolphinScheduler每个稳定版本的设置说明。
|
||||
|
||||
### Versions: 3.2.2
|
||||
|
||||
#### Links: [3.2.2 Document](../3.2.2/user_doc/about/introduction.md)
|
||||
|
||||
### Versions: 3.2.1
|
||||
|
||||
#### Links: [3.2.1 Document](../3.2.1/user_doc/about/introduction.md)
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 327 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 338 KiB After Width: | Height: | Size: 166 KiB |
|
Before Width: | Height: | Size: 326 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 3.1 MiB |
|
Before Width: | Height: | Size: 196 KiB After Width: | Height: | Size: 346 KiB |
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 347 KiB |
|
|
@ -41,12 +41,6 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-dao</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-storage-api</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -56,13 +56,6 @@
|
|||
</includes>
|
||||
<outputDirectory>conf</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${basedir}/../dolphinscheduler-authentication/dolphinscheduler-aws-authentication/src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yaml</include>
|
||||
</includes>
|
||||
<outputDirectory>conf</outputDirectory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
-XX:+PrintGCDetails
|
||||
-Xloggc:gc.log
|
||||
|
||||
-XX:-OmitStackTraceInFastThrow
|
||||
-XX:+ExitOnOutOfMemoryError
|
||||
-XX:+HeapDumpOnOutOfMemoryError
|
||||
-XX:HeapDumpPath=dump.hprof
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@
|
|||
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-task-all-prune</artifactId>
|
||||
<artifactId>dolphinscheduler-task-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -57,13 +57,6 @@
|
|||
</includes>
|
||||
<outputDirectory>conf</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${basedir}/../dolphinscheduler-authentication/dolphinscheduler-aws-authentication/src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yaml</include>
|
||||
</includes>
|
||||
<outputDirectory>conf</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${basedir}/../dolphinscheduler-ui/dist</directory>
|
||||
<outputDirectory>./ui</outputDirectory>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
-XX:+PrintGCDetails
|
||||
-Xloggc:gc.log
|
||||
|
||||
-XX:-OmitStackTraceInFastThrow
|
||||
-XX:+ExitOnOutOfMemoryError
|
||||
-XX:+HeapDumpOnOutOfMemoryError
|
||||
-XX:HeapDumpPath=dump.hprof
|
||||
|
|
|
|||
|
|
@ -44,8 +44,6 @@ import org.apache.dolphinscheduler.common.enums.WarningType;
|
|||
import org.apache.dolphinscheduler.common.utils.JSONUtils;
|
||||
import org.apache.dolphinscheduler.dao.entity.User;
|
||||
import org.apache.dolphinscheduler.extract.master.dto.WorkflowExecuteDto;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.utils.PropertyUtils;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
|
|
@ -165,8 +163,10 @@ public class ExecutorController extends BaseController {
|
|||
if (timeout == null) {
|
||||
timeout = Constants.MAX_TASK_TIMEOUT;
|
||||
}
|
||||
|
||||
List<Property> startParamList = PropertyUtils.startParamsTransformPropertyList(startParams);
|
||||
Map<String, String> startParamMap = null;
|
||||
if (startParams != null) {
|
||||
startParamMap = JSONUtils.toMap(startParams);
|
||||
}
|
||||
|
||||
if (complementDependentMode == null) {
|
||||
complementDependentMode = ComplementDependentMode.OFF_MODE;
|
||||
|
|
@ -175,7 +175,7 @@ public class ExecutorController extends BaseController {
|
|||
Map<String, Object> result = execService.execProcessInstance(loginUser, projectCode, processDefinitionCode,
|
||||
scheduleTime, execType, failureStrategy,
|
||||
startNodeList, taskDependType, warningType, warningGroupId, runMode, processInstancePriority,
|
||||
workerGroup, tenantCode, environmentCode, timeout, startParamList, expectedParallelismNumber, dryRun,
|
||||
workerGroup, tenantCode, environmentCode, timeout, startParamMap, expectedParallelismNumber, dryRun,
|
||||
testFlag,
|
||||
complementDependentMode, version, allLevelDependent, executionOrder);
|
||||
return returnDataList(result);
|
||||
|
|
@ -262,7 +262,10 @@ public class ExecutorController extends BaseController {
|
|||
timeout = Constants.MAX_TASK_TIMEOUT;
|
||||
}
|
||||
|
||||
List<Property> startParamList = PropertyUtils.startParamsTransformPropertyList(startParams);
|
||||
Map<String, String> startParamMap = null;
|
||||
if (startParams != null) {
|
||||
startParamMap = JSONUtils.toMap(startParams);
|
||||
}
|
||||
|
||||
if (complementDependentMode == null) {
|
||||
log.debug("Parameter complementDependentMode set to {} due to null.", ComplementDependentMode.OFF_MODE);
|
||||
|
|
@ -280,8 +283,7 @@ public class ExecutorController extends BaseController {
|
|||
result = execService.execProcessInstance(loginUser, projectCode, processDefinitionCode, scheduleTime,
|
||||
execType, failureStrategy,
|
||||
startNodeList, taskDependType, warningType, warningGroupId, runMode, processInstancePriority,
|
||||
workerGroup, tenantCode, environmentCode, timeout, startParamList, expectedParallelismNumber,
|
||||
dryRun,
|
||||
workerGroup, tenantCode, environmentCode, timeout, startParamMap, expectedParallelismNumber, dryRun,
|
||||
testFlag,
|
||||
complementDependentMode, null, allLevelDependent, executionOrder);
|
||||
|
||||
|
|
|
|||
|
|
@ -61,8 +61,7 @@ public class ProjectParameterController extends BaseController {
|
|||
@Operation(summary = "createProjectParameter", description = "CREATE_PROJECT_PARAMETER_NOTES")
|
||||
@Parameters({
|
||||
@Parameter(name = "projectParameterName", description = "PROJECT_PARAMETER_NAME", schema = @Schema(implementation = String.class)),
|
||||
@Parameter(name = "projectParameterValue", description = "PROJECT_PARAMETER_VALUE", schema = @Schema(implementation = String.class)),
|
||||
@Parameter(name = "projectParameterDataType", description = "PROJECT_PARAMETER_DATA_TYPE", schema = @Schema(implementation = String.class))
|
||||
@Parameter(name = "projectParameterValue", description = "PROJECT_PARAMETER_VALUE", schema = @Schema(implementation = String.class))
|
||||
})
|
||||
@PostMapping()
|
||||
@ResponseStatus(HttpStatus.CREATED)
|
||||
|
|
@ -70,10 +69,9 @@ public class ProjectParameterController extends BaseController {
|
|||
public Result createProjectParameter(@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
|
||||
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
|
||||
@RequestParam("projectParameterName") String projectParameterName,
|
||||
@RequestParam(value = "projectParameterValue") String projectParameterValue,
|
||||
@RequestParam(value = "projectParameterDataType", defaultValue = "VARCHAR") String projectParameterDataType) {
|
||||
@RequestParam(value = "projectParameterValue") String projectParameterValue) {
|
||||
return projectParameterService.createProjectParameter(loginUser, projectCode, projectParameterName,
|
||||
projectParameterValue, projectParameterDataType);
|
||||
projectParameterValue);
|
||||
}
|
||||
|
||||
@Operation(summary = "updateProjectParameter", description = "UPDATE_PROJECT_PARAMETER_NOTES")
|
||||
|
|
@ -81,7 +79,6 @@ public class ProjectParameterController extends BaseController {
|
|||
@Parameter(name = "code", description = "PROJECT_PARAMETER_CODE", schema = @Schema(implementation = long.class, example = "123456")),
|
||||
@Parameter(name = "projectParameterName", description = "PROJECT_PARAMETER_NAME", schema = @Schema(implementation = String.class)),
|
||||
@Parameter(name = "projectParameterValue", description = "PROJECT_PARAMETER_VALUE", schema = @Schema(implementation = String.class)),
|
||||
@Parameter(name = "projectParameterDataType", description = "PROJECT_PARAMETER_DATA_TYPE", schema = @Schema(implementation = String.class))
|
||||
})
|
||||
@PutMapping(value = "/{code}")
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
|
|
@ -90,10 +87,9 @@ public class ProjectParameterController extends BaseController {
|
|||
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
|
||||
@PathVariable("code") Long code,
|
||||
@RequestParam("projectParameterName") String projectParameterName,
|
||||
@RequestParam(value = "projectParameterValue") String projectParameterValue,
|
||||
@RequestParam(value = "projectParameterDataType") String projectParameterDataType) {
|
||||
@RequestParam(value = "projectParameterValue") String projectParameterValue) {
|
||||
return projectParameterService.updateProjectParameter(loginUser, projectCode, code, projectParameterName,
|
||||
projectParameterValue, projectParameterDataType);
|
||||
projectParameterValue);
|
||||
}
|
||||
|
||||
@Operation(summary = "deleteProjectParametersByCode", description = "DELETE_PROJECT_PARAMETER_NOTES")
|
||||
|
|
@ -137,14 +133,13 @@ public class ProjectParameterController extends BaseController {
|
|||
@Parameter(hidden = true) @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
|
||||
@Parameter(name = "projectCode", description = "PROJECT_CODE", required = true) @PathVariable long projectCode,
|
||||
@RequestParam(value = "searchVal", required = false) String searchVal,
|
||||
@RequestParam(value = "projectParameterDataType", required = false) String projectParameterDataType,
|
||||
@RequestParam("pageNo") Integer pageNo,
|
||||
@RequestParam("pageSize") Integer pageSize) {
|
||||
|
||||
checkPageParams(pageNo, pageSize);
|
||||
searchVal = ParameterUtils.handleEscapes(searchVal);
|
||||
return projectParameterService.queryProjectParameterListPaging(loginUser, projectCode, pageSize, pageNo,
|
||||
searchVal, projectParameterDataType);
|
||||
searchVal);
|
||||
}
|
||||
|
||||
@Operation(summary = "queryProjectParameterByCode", description = "QUERY_PROJECT_PARAMETER_NOTES")
|
||||
|
|
|
|||
|
|
@ -30,9 +30,7 @@ import org.apache.dolphinscheduler.common.enums.WarningType;
|
|||
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
|
||||
import org.apache.dolphinscheduler.dao.entity.User;
|
||||
import org.apache.dolphinscheduler.extract.master.dto.WorkflowExecuteDto;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
|
@ -59,7 +57,7 @@ public interface ExecutorService {
|
|||
* @param environmentCode environment code
|
||||
* @param runMode run mode
|
||||
* @param timeout timeout
|
||||
* @param startParamList the global param values which pass to new process instance
|
||||
* @param startParams the global param values which pass to new process instance
|
||||
* @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode
|
||||
* @param executionOrder the execution order when complementing data
|
||||
* @return execute process instance code
|
||||
|
|
@ -73,7 +71,7 @@ public interface ExecutorService {
|
|||
Priority processInstancePriority, String workerGroup, String tenantCode,
|
||||
Long environmentCode,
|
||||
Integer timeout,
|
||||
List<Property> startParamList, Integer expectedParallelismNumber,
|
||||
Map<String, String> startParams, Integer expectedParallelismNumber,
|
||||
int dryRun, int testFlag,
|
||||
ComplementDependentMode complementDependentMode, Integer version,
|
||||
boolean allLevelDependent, ExecutionOrder executionOrder);
|
||||
|
|
|
|||
|
|
@ -23,17 +23,17 @@ import org.apache.dolphinscheduler.dao.entity.User;
|
|||
public interface ProjectParameterService {
|
||||
|
||||
Result createProjectParameter(User loginUser, long projectCode, String projectParameterName,
|
||||
String projectParameterValue, String projectParameterDataType);
|
||||
String projectParameterValue);
|
||||
|
||||
Result updateProjectParameter(User loginUser, long projectCode, long code, String projectParameterName,
|
||||
String projectParameterValue, String projectParameterDataType);
|
||||
String projectParameterValue);
|
||||
|
||||
Result deleteProjectParametersByCode(User loginUser, long projectCode, long code);
|
||||
|
||||
Result batchDeleteProjectParametersByCodes(User loginUser, long projectCode, String codes);
|
||||
|
||||
Result queryProjectParameterListPaging(User loginUser, long projectCode, Integer pageSize, Integer pageNo,
|
||||
String searchVal, String projectParameterDataType);
|
||||
String searchVal);
|
||||
|
||||
Result queryProjectParameterByCode(User loginUser, long projectCode, long code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@ import org.apache.dolphinscheduler.extract.master.transportor.StreamingTaskTrigg
|
|||
import org.apache.dolphinscheduler.extract.master.transportor.StreamingTaskTriggerResponse;
|
||||
import org.apache.dolphinscheduler.extract.master.transportor.WorkflowInstanceStateChangeEvent;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
|
||||
import org.apache.dolphinscheduler.registry.api.enums.RegistryNodeType;
|
||||
import org.apache.dolphinscheduler.service.command.CommandService;
|
||||
import org.apache.dolphinscheduler.service.cron.CronUtils;
|
||||
|
|
@ -205,7 +204,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|||
* @param environmentCode environment code
|
||||
* @param runMode run mode
|
||||
* @param timeout timeout
|
||||
* @param startParamList the global param values which pass to new process instance
|
||||
* @param startParams the global param values which pass to new process instance
|
||||
* @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode
|
||||
* @param testFlag testFlag
|
||||
* @param executionOrder the execution order when complementing data
|
||||
|
|
@ -221,7 +220,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|||
Priority processInstancePriority, String workerGroup,
|
||||
String tenantCode,
|
||||
Long environmentCode, Integer timeout,
|
||||
List<Property> startParamList, Integer expectedParallelismNumber,
|
||||
Map<String, String> startParams, Integer expectedParallelismNumber,
|
||||
int dryRun, int testFlag,
|
||||
ComplementDependentMode complementDependentMode, Integer version,
|
||||
boolean allLevelDependent, ExecutionOrder executionOrder) {
|
||||
|
|
@ -271,7 +270,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|||
startNodeList,
|
||||
cronTime, warningType, loginUser.getId(), warningGroupId, runMode, processInstancePriority,
|
||||
workerGroup, tenantCode,
|
||||
environmentCode, startParamList, expectedParallelismNumber, dryRun, testFlag,
|
||||
environmentCode, startParams, expectedParallelismNumber, dryRun, testFlag,
|
||||
complementDependentMode, allLevelDependent, executionOrder);
|
||||
|
||||
if (create > 0) {
|
||||
|
|
@ -733,7 +732,7 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|||
WarningType warningType, int executorId, Integer warningGroupId, RunMode runMode,
|
||||
Priority processInstancePriority, String workerGroup, String tenantCode,
|
||||
Long environmentCode,
|
||||
List<Property> startParamList, Integer expectedParallelismNumber, int dryRun,
|
||||
Map<String, String> startParams, Integer expectedParallelismNumber, int dryRun,
|
||||
int testFlag, ComplementDependentMode complementDependentMode,
|
||||
boolean allLevelDependent, ExecutionOrder executionOrder) {
|
||||
|
||||
|
|
@ -762,8 +761,8 @@ public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorServ
|
|||
if (warningType != null) {
|
||||
command.setWarningType(warningType);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(startParamList)) {
|
||||
cmdParam.put(CMD_PARAM_START_PARAMS, JSONUtils.toJsonString(startParamList));
|
||||
if (startParams != null && startParams.size() > 0) {
|
||||
cmdParam.put(CMD_PARAM_START_PARAMS, JSONUtils.toJsonString(startParams));
|
||||
}
|
||||
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
|
||||
command.setExecutorId(executorId);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class ProjectParameterServiceImpl extends BaseServiceImpl implements Proj
|
|||
@Override
|
||||
@Transactional
|
||||
public Result createProjectParameter(User loginUser, long projectCode, String projectParameterName,
|
||||
String projectParameterValue, String projectParameterDataType) {
|
||||
String projectParameterValue) {
|
||||
Result result = new Result();
|
||||
|
||||
// check if user have write perm for project
|
||||
|
|
@ -97,7 +97,6 @@ public class ProjectParameterServiceImpl extends BaseServiceImpl implements Proj
|
|||
.builder()
|
||||
.paramName(projectParameterName)
|
||||
.paramValue(projectParameterValue)
|
||||
.paramDataType(projectParameterDataType)
|
||||
.code(CodeGenerateUtils.genCode())
|
||||
.projectCode(projectCode)
|
||||
.userId(loginUser.getId())
|
||||
|
|
@ -123,7 +122,7 @@ public class ProjectParameterServiceImpl extends BaseServiceImpl implements Proj
|
|||
|
||||
@Override
|
||||
public Result updateProjectParameter(User loginUser, long projectCode, long code, String projectParameterName,
|
||||
String projectParameterValue, String projectParameterDataType) {
|
||||
String projectParameterValue) {
|
||||
Result result = new Result();
|
||||
|
||||
// check if user have write perm for project
|
||||
|
|
@ -156,7 +155,6 @@ public class ProjectParameterServiceImpl extends BaseServiceImpl implements Proj
|
|||
|
||||
projectParameter.setParamName(projectParameterName);
|
||||
projectParameter.setParamValue(projectParameterValue);
|
||||
projectParameter.setParamDataType(projectParameterDataType);
|
||||
projectParameter.setUpdateTime(new Date());
|
||||
projectParameter.setOperator(loginUser.getId());
|
||||
|
||||
|
|
@ -238,7 +236,7 @@ public class ProjectParameterServiceImpl extends BaseServiceImpl implements Proj
|
|||
|
||||
@Override
|
||||
public Result queryProjectParameterListPaging(User loginUser, long projectCode, Integer pageSize, Integer pageNo,
|
||||
String searchVal, String projectParameterDataType) {
|
||||
String searchVal) {
|
||||
Result result = new Result();
|
||||
|
||||
Project project = projectMapper.queryByCode(projectCode);
|
||||
|
|
@ -251,8 +249,7 @@ public class ProjectParameterServiceImpl extends BaseServiceImpl implements Proj
|
|||
Page<ProjectParameter> page = new Page<>(pageNo, pageSize);
|
||||
|
||||
IPage<ProjectParameter> iPage =
|
||||
projectParameterMapper.queryProjectParameterListPaging(page, projectCode, null, searchVal,
|
||||
projectParameterDataType);
|
||||
projectParameterMapper.queryProjectParameterListPaging(page, projectCode, null, searchVal);
|
||||
|
||||
List<ProjectParameter> projectParameterList = iPage.getRecords();
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.facebook.presto.jdbc.internal.guava.base.Strings;
|
||||
|
||||
/**
|
||||
* worker group service impl
|
||||
|
|
@ -247,7 +248,7 @@ public class WorkerGroupServiceImpl extends BaseServiceImpl implements WorkerGro
|
|||
* @return boolean
|
||||
*/
|
||||
private String checkWorkerGroupAddrList(WorkerGroup workerGroup) {
|
||||
if (StringUtils.isEmpty(workerGroup.getAddrList())) {
|
||||
if (Strings.isNullOrEmpty(workerGroup.getAddrList())) {
|
||||
return null;
|
||||
}
|
||||
Map<String, String> serverMaps = registryClient.getServerMaps(RegistryNodeType.WORKER);
|
||||
|
|
|
|||
|
|
@ -38,13 +38,8 @@ import org.apache.dolphinscheduler.common.enums.RunMode;
|
|||
import org.apache.dolphinscheduler.common.enums.TaskDependType;
|
||||
import org.apache.dolphinscheduler.common.enums.WarningType;
|
||||
import org.apache.dolphinscheduler.dao.entity.User;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.enums.DataType;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.enums.Direct;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.model.Property;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
@ -80,8 +75,7 @@ public class ExecuteFunctionControllerTest extends AbstractControllerTest {
|
|||
final String tenantCode = "root";
|
||||
final Long environmentCode = 4L;
|
||||
final Integer timeout = 5;
|
||||
final List<Property> startParams =
|
||||
Collections.singletonList(new Property("start", Direct.IN, DataType.VARCHAR, "params"));
|
||||
final ImmutableMap<String, String> startParams = ImmutableMap.of("start", "params");
|
||||
final Integer expectedParallelismNumber = 6;
|
||||
final int dryRun = 7;
|
||||
final int testFlag = 0;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ import org.apache.dolphinscheduler.api.service.impl.ProjectParameterServiceImpl;
|
|||
import org.apache.dolphinscheduler.api.utils.Result;
|
||||
import org.apache.dolphinscheduler.common.enums.UserType;
|
||||
import org.apache.dolphinscheduler.dao.entity.User;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.enums.DataType;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
@ -49,9 +48,8 @@ public class ProjectParameterControllerTest {
|
|||
User loginUser = getGeneralUser();
|
||||
|
||||
Mockito.when(projectParameterService.createProjectParameter(Mockito.any(), Mockito.anyLong(), Mockito.any(),
|
||||
Mockito.any(), Mockito.any())).thenReturn(getSuccessResult());
|
||||
Result result = projectParameterController.createProjectParameter(loginUser, 1, "key", "value",
|
||||
DataType.VARCHAR.name());
|
||||
Mockito.any())).thenReturn(getSuccessResult());
|
||||
Result result = projectParameterController.createProjectParameter(loginUser, 1, "key", "value");
|
||||
Assertions.assertEquals(Status.SUCCESS.getCode(), result.getCode());
|
||||
}
|
||||
|
||||
|
|
@ -60,9 +58,8 @@ public class ProjectParameterControllerTest {
|
|||
User loginUser = getGeneralUser();
|
||||
|
||||
Mockito.when(projectParameterService.updateProjectParameter(Mockito.any(), Mockito.anyLong(), Mockito.anyLong(),
|
||||
Mockito.any(), Mockito.any(), Mockito.any())).thenReturn(getSuccessResult());
|
||||
Result result = projectParameterController.updateProjectParameter(loginUser, 1, 1L, "key", "value",
|
||||
DataType.LONG.name());
|
||||
Mockito.any(), Mockito.any())).thenReturn(getSuccessResult());
|
||||
Result result = projectParameterController.updateProjectParameter(loginUser, 1, 1L, "key", "value");
|
||||
Assertions.assertEquals(Status.SUCCESS.getCode(), result.getCode());
|
||||
}
|
||||
|
||||
|
|
@ -91,9 +88,8 @@ public class ProjectParameterControllerTest {
|
|||
User loginUser = getGeneralUser();
|
||||
|
||||
Mockito.when(projectParameterService.queryProjectParameterListPaging(Mockito.any(), Mockito.anyLong(),
|
||||
Mockito.anyInt(), Mockito.anyInt(), Mockito.any(), Mockito.any())).thenReturn(getSuccessResult());
|
||||
Result result = projectParameterController.queryProjectParameterListPaging(loginUser, 1, "1",
|
||||
DataType.VARCHAR.name(), 1, 10);
|
||||
Mockito.anyInt(), Mockito.anyInt(), Mockito.any())).thenReturn(getSuccessResult());
|
||||
Result result = projectParameterController.queryProjectParameterListPaging(loginUser, 1, "1", 1, 10);
|
||||
Assertions.assertEquals(Status.SUCCESS.getCode(), result.getCode());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ import org.apache.dolphinscheduler.dao.entity.ProjectParameter;
|
|||
import org.apache.dolphinscheduler.dao.entity.User;
|
||||
import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
|
||||
import org.apache.dolphinscheduler.dao.mapper.ProjectParameterMapper;
|
||||
import org.apache.dolphinscheduler.plugin.task.api.enums.DataType;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
|
|
@ -77,8 +76,7 @@ public class ProjectParameterServiceTest {
|
|||
// PERMISSION DENIED
|
||||
when(projectService.hasProjectAndWritePerm(Mockito.any(), Mockito.any(), Mockito.any(Result.class)))
|
||||
.thenReturn(false);
|
||||
Result result = projectParameterService.createProjectParameter(loginUser, projectCode, "key", "value",
|
||||
DataType.VARCHAR.name());
|
||||
Result result = projectParameterService.createProjectParameter(loginUser, projectCode, "key", "value");
|
||||
assertNull(result.getData());
|
||||
assertNull(result.getCode());
|
||||
assertNull(result.getMsg());
|
||||
|
|
@ -90,29 +88,25 @@ public class ProjectParameterServiceTest {
|
|||
try (MockedStatic<CodeGenerateUtils> ignored = Mockito.mockStatic(CodeGenerateUtils.class)) {
|
||||
when(CodeGenerateUtils.genCode()).thenThrow(CodeGenerateUtils.CodeGenerateException.class);
|
||||
|
||||
result = projectParameterService.createProjectParameter(loginUser, projectCode, "key", "value",
|
||||
DataType.VARCHAR.name());
|
||||
result = projectParameterService.createProjectParameter(loginUser, projectCode, "key", "value");
|
||||
assertEquals(Status.CREATE_PROJECT_PARAMETER_ERROR.getCode(), result.getCode());
|
||||
}
|
||||
|
||||
// PROJECT_PARAMETER_ALREADY_EXISTS
|
||||
when(projectMapper.queryByCode(projectCode)).thenReturn(getProject(projectCode));
|
||||
when(projectParameterMapper.selectOne(Mockito.any())).thenReturn(getProjectParameter());
|
||||
result = projectParameterService.createProjectParameter(loginUser, projectCode, "key", "value",
|
||||
DataType.VARCHAR.name());
|
||||
result = projectParameterService.createProjectParameter(loginUser, projectCode, "key", "value");
|
||||
assertEquals(Status.PROJECT_PARAMETER_ALREADY_EXISTS.getCode(), result.getCode());
|
||||
|
||||
// INSERT DATA ERROR
|
||||
when(projectParameterMapper.selectOne(Mockito.any())).thenReturn(null);
|
||||
when(projectParameterMapper.insert(Mockito.any())).thenReturn(-1);
|
||||
result = projectParameterService.createProjectParameter(loginUser, projectCode, "key1", "value",
|
||||
DataType.VARCHAR.name());
|
||||
result = projectParameterService.createProjectParameter(loginUser, projectCode, "key1", "value");
|
||||
assertEquals(Status.CREATE_PROJECT_PARAMETER_ERROR.getCode(), result.getCode());
|
||||
|
||||
// SUCCESS
|
||||
when(projectParameterMapper.insert(Mockito.any())).thenReturn(1);
|
||||
result = projectParameterService.createProjectParameter(loginUser, projectCode, "key1", "value",
|
||||
DataType.VARCHAR.name());
|
||||
result = projectParameterService.createProjectParameter(loginUser, projectCode, "key1", "value");
|
||||
assertEquals(Status.SUCCESS.getCode(), result.getCode());
|
||||
}
|
||||
|
||||
|
|
@ -123,8 +117,7 @@ public class ProjectParameterServiceTest {
|
|||
// NO PERMISSION
|
||||
when(projectService.hasProjectAndWritePerm(Mockito.any(), Mockito.any(), Mockito.any(Result.class)))
|
||||
.thenReturn(false);
|
||||
Result result = projectParameterService.updateProjectParameter(loginUser, projectCode, 1, "key", "value",
|
||||
DataType.VARCHAR.name());
|
||||
Result result = projectParameterService.updateProjectParameter(loginUser, projectCode, 1, "key", "value");
|
||||
assertNull(result.getData());
|
||||
assertNull(result.getCode());
|
||||
assertNull(result.getMsg());
|
||||
|
|
@ -134,33 +127,28 @@ public class ProjectParameterServiceTest {
|
|||
when(projectService.hasProjectAndWritePerm(Mockito.any(), Mockito.any(), Mockito.any(Result.class)))
|
||||
.thenReturn(true);
|
||||
when(projectParameterMapper.queryByCode(Mockito.anyLong())).thenReturn(null);
|
||||
result = projectParameterService.updateProjectParameter(loginUser, projectCode, 1, "key", "value",
|
||||
DataType.VARCHAR.name());
|
||||
result = projectParameterService.updateProjectParameter(loginUser, projectCode, 1, "key", "value");
|
||||
assertEquals(Status.PROJECT_PARAMETER_NOT_EXISTS.getCode(), result.getCode());
|
||||
|
||||
// PROJECT_PARAMETER_ALREADY_EXISTS
|
||||
when(projectParameterMapper.queryByCode(Mockito.anyLong())).thenReturn(getProjectParameter());
|
||||
when(projectParameterMapper.selectOne(Mockito.any())).thenReturn(getProjectParameter());
|
||||
result = projectParameterService.updateProjectParameter(loginUser, projectCode, 1, "key", "value",
|
||||
DataType.VARCHAR.name());
|
||||
result = projectParameterService.updateProjectParameter(loginUser, projectCode, 1, "key", "value");
|
||||
assertEquals(Status.PROJECT_PARAMETER_ALREADY_EXISTS.getCode(), result.getCode());
|
||||
|
||||
// PROJECT_UPDATE_ERROR
|
||||
when(projectParameterMapper.selectOne(Mockito.any())).thenReturn(null);
|
||||
when(projectParameterMapper.updateById(Mockito.any())).thenReturn(-1);
|
||||
result = projectParameterService.updateProjectParameter(loginUser, projectCode, 1, "key1", "value",
|
||||
DataType.VARCHAR.name());
|
||||
result = projectParameterService.updateProjectParameter(loginUser, projectCode, 1, "key1", "value");
|
||||
assertEquals(Status.UPDATE_PROJECT_PARAMETER_ERROR.getCode(), result.getCode());
|
||||
|
||||
// SUCCESS
|
||||
when(projectParameterMapper.updateById(Mockito.any())).thenReturn(1);
|
||||
result = projectParameterService.updateProjectParameter(loginUser, projectCode, 1, "key1", "value",
|
||||
DataType.LONG.name());
|
||||
result = projectParameterService.updateProjectParameter(loginUser, projectCode, 1, "key1", "value");
|
||||
assertEquals(Status.SUCCESS.getCode(), result.getCode());
|
||||
ProjectParameter projectParameter = (ProjectParameter) result.getData();
|
||||
assertNotNull(projectParameter.getOperator());
|
||||
assertNotNull(projectParameter.getUpdateTime());
|
||||
assertEquals(DataType.LONG.name(), projectParameter.getParamDataType());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -235,8 +223,7 @@ public class ProjectParameterServiceTest {
|
|||
.thenReturn(false);
|
||||
|
||||
Result result =
|
||||
projectParameterService.queryProjectParameterListPaging(loginUser, projectCode, pageSize, pageNo, null,
|
||||
DataType.VARCHAR.name());
|
||||
projectParameterService.queryProjectParameterListPaging(loginUser, projectCode, pageSize, pageNo, null);
|
||||
assertNull(result.getData());
|
||||
assertNull(result.getCode());
|
||||
assertNull(result.getMsg());
|
||||
|
|
@ -248,10 +235,9 @@ public class ProjectParameterServiceTest {
|
|||
Page<ProjectParameter> page = new Page<>(pageNo, pageSize);
|
||||
page.setRecords(Collections.singletonList(getProjectParameter()));
|
||||
|
||||
when(projectParameterMapper.queryProjectParameterListPaging(any(), anyLong(), any(), any(), any()))
|
||||
.thenReturn(page);
|
||||
when(projectParameterMapper.queryProjectParameterListPaging(any(), anyLong(), any(), any())).thenReturn(page);
|
||||
result = projectParameterService.queryProjectParameterListPaging(loginUser, projectCode, pageSize, pageNo,
|
||||
null, null);
|
||||
null);
|
||||
assertEquals(Status.SUCCESS.getCode(), result.getCode());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
~ contributor license agreements. See the NOTICE file distributed with
|
||||
~ this work for additional information regarding copyright ownership.
|
||||
~ The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
~ (the "License"); you may not use this file except in compliance with
|
||||
~ the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-authentication</artifactId>
|
||||
<version>dev-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dolphinscheduler-aws-authentication</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-emr</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-s3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-sagemaker</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.amazonaws</groupId>
|
||||
<artifactId>aws-java-sdk-dms</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>software.amazon.awssdk</groupId>
|
||||
<artifactId>datasync</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.authentication.aws;
|
||||
|
||||
import static org.apache.dolphinscheduler.authentication.aws.AwsConfigurationKeys.AWS_AUTHENTICATION_TYPE;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import com.amazonaws.auth.AWSCredentialsProvider;
|
||||
import com.amazonaws.auth.AWSStaticCredentialsProvider;
|
||||
import com.amazonaws.auth.BasicAWSCredentials;
|
||||
import com.amazonaws.auth.InstanceProfileCredentialsProvider;
|
||||
|
||||
@Slf4j
|
||||
@UtilityClass
|
||||
public class AWSCredentialsProviderFactor {
|
||||
|
||||
public static AWSCredentialsProvider credentialsProvider(Map<String, String> awsProperties) {
|
||||
String awsAuthenticationType = awsProperties.getOrDefault(
|
||||
AWS_AUTHENTICATION_TYPE, AWSCredentialsProviderType.STATIC_CREDENTIALS_PROVIDER.getName());
|
||||
AWSCredentialsProviderType awsCredentialsProviderType =
|
||||
AWSCredentialsProviderType.of(awsAuthenticationType).orElse(null);
|
||||
if (awsCredentialsProviderType == null) {
|
||||
throw new IllegalArgumentException(
|
||||
"The aws.credentials.provider.type: " + awsAuthenticationType + " is invalidated");
|
||||
}
|
||||
switch (awsCredentialsProviderType) {
|
||||
case STATIC_CREDENTIALS_PROVIDER:
|
||||
return createAWSStaticCredentialsProvider(awsProperties);
|
||||
case INSTANCE_PROFILE_CREDENTIALS_PROVIDER:
|
||||
return createInstanceProfileCredentialsProvider();
|
||||
default:
|
||||
throw new IllegalArgumentException(
|
||||
"The aws.credentials.provider.type: " + awsAuthenticationType + " is invalidated");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static AWSCredentialsProvider createAWSStaticCredentialsProvider(Map<String, String> awsProperties) {
|
||||
String awsAccessKeyId = awsProperties.get(AwsConfigurationKeys.AWS_ACCESS_KEY_ID);
|
||||
String awsSecretAccessKey = awsProperties.get(AwsConfigurationKeys.AWS_SECRET);
|
||||
final BasicAWSCredentials basicAWSCredentials = new BasicAWSCredentials(awsAccessKeyId, awsSecretAccessKey);
|
||||
AWSStaticCredentialsProvider awsStaticCredentialsProvider =
|
||||
new AWSStaticCredentialsProvider(basicAWSCredentials);
|
||||
log.info("AWSStaticCredentialsProvider created successfully");
|
||||
return awsStaticCredentialsProvider;
|
||||
}
|
||||
|
||||
private static AWSCredentialsProvider createInstanceProfileCredentialsProvider() {
|
||||
InstanceProfileCredentialsProvider instanceProfileCredentialsProvider =
|
||||
InstanceProfileCredentialsProvider.getInstance();
|
||||
log.info("InstanceProfileCredentialsProvider created successfully");
|
||||
return instanceProfileCredentialsProvider;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.authentication.aws;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum AWSCredentialsProviderType {
|
||||
|
||||
STATIC_CREDENTIALS_PROVIDER("AWSStaticCredentialsProvider"),
|
||||
INSTANCE_PROFILE_CREDENTIALS_PROVIDER("InstanceProfileCredentialsProvider"),
|
||||
;
|
||||
|
||||
private final String name;
|
||||
|
||||
AWSCredentialsProviderType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public static Optional<AWSCredentialsProviderType> of(String name) {
|
||||
if (name == null) {
|
||||
return Optional.empty();
|
||||
}
|
||||
for (AWSCredentialsProviderType type : values()) {
|
||||
if (type.getName().equalsIgnoreCase(name)) {
|
||||
return Optional.of(type);
|
||||
}
|
||||
}
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.authentication.aws;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
import com.amazonaws.auth.AWSCredentialsProvider;
|
||||
import com.amazonaws.client.builder.AwsClientBuilder;
|
||||
import com.amazonaws.regions.Regions;
|
||||
import com.amazonaws.services.databasemigrationservice.AWSDatabaseMigrationService;
|
||||
import com.amazonaws.services.databasemigrationservice.AWSDatabaseMigrationServiceClientBuilder;
|
||||
|
||||
@UtilityClass
|
||||
public class AWSDatabaseMigrationServiceClientFactory {
|
||||
|
||||
public AWSDatabaseMigrationService createAWSDatabaseMigrationServiceClient(Map<String, String> awsProperties) {
|
||||
AWSCredentialsProvider awsCredentialsProvider = AWSCredentialsProviderFactor.credentialsProvider(awsProperties);
|
||||
Regions regions = Regions.fromName(awsProperties.get(AwsConfigurationKeys.AWS_REGION));
|
||||
String endpoint = awsProperties.get(AwsConfigurationKeys.AWS_ENDPOINT);
|
||||
|
||||
if (endpoint != null && !endpoint.isEmpty()) {
|
||||
return AWSDatabaseMigrationServiceClientBuilder
|
||||
.standard()
|
||||
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpoint, regions.getName()))
|
||||
.withCredentials(awsCredentialsProvider)
|
||||
.build();
|
||||
} else {
|
||||
return AWSDatabaseMigrationServiceClientBuilder
|
||||
.standard()
|
||||
.withCredentials(awsCredentialsProvider)
|
||||
.withRegion(regions)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.authentication.aws;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
import com.amazonaws.auth.AWSCredentialsProvider;
|
||||
import com.amazonaws.client.builder.AwsClientBuilder;
|
||||
import com.amazonaws.regions.Regions;
|
||||
import com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduce;
|
||||
import com.amazonaws.services.elasticmapreduce.AmazonElasticMapReduceClientBuilder;
|
||||
|
||||
@UtilityClass
|
||||
public class AmazonElasticMapReduceClientFactory {
|
||||
|
||||
public AmazonElasticMapReduce createAmazonElasticMapReduceClient(Map<String, String> awsProperties) {
|
||||
AWSCredentialsProvider awsCredentialsProvider = AWSCredentialsProviderFactor.credentialsProvider(awsProperties);
|
||||
Regions regions = Regions.fromName(awsProperties.get(AwsConfigurationKeys.AWS_REGION));
|
||||
String endpoint = awsProperties.get(AwsConfigurationKeys.AWS_ENDPOINT);
|
||||
|
||||
if (endpoint != null && !endpoint.isEmpty()) {
|
||||
return AmazonElasticMapReduceClientBuilder
|
||||
.standard()
|
||||
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpoint, regions.getName()))
|
||||
.withCredentials(awsCredentialsProvider)
|
||||
.build();
|
||||
} else {
|
||||
return AmazonElasticMapReduceClientBuilder
|
||||
.standard()
|
||||
.withCredentials(awsCredentialsProvider)
|
||||
.withRegion(regions)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.authentication.aws;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
import com.amazonaws.auth.AWSCredentialsProvider;
|
||||
import com.amazonaws.client.builder.AwsClientBuilder;
|
||||
import com.amazonaws.regions.Regions;
|
||||
import com.amazonaws.services.s3.AmazonS3;
|
||||
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
|
||||
|
||||
@UtilityClass
|
||||
public class AmazonS3ClientFactory {
|
||||
|
||||
public AmazonS3 createAmazonS3Client(Map<String, String> awsProperties) {
|
||||
AWSCredentialsProvider awsCredentialsProvider = AWSCredentialsProviderFactor.credentialsProvider(awsProperties);
|
||||
Regions regions = Regions.fromName(awsProperties.get(AwsConfigurationKeys.AWS_REGION));
|
||||
String endpoint = awsProperties.get(AwsConfigurationKeys.AWS_ENDPOINT);
|
||||
|
||||
if (endpoint != null && !endpoint.isEmpty()) {
|
||||
return AmazonS3ClientBuilder
|
||||
.standard()
|
||||
.withPathStyleAccessEnabled(true)
|
||||
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpoint, regions.getName()))
|
||||
.withCredentials(awsCredentialsProvider)
|
||||
.build();
|
||||
} else {
|
||||
return AmazonS3ClientBuilder
|
||||
.standard()
|
||||
.withCredentials(awsCredentialsProvider)
|
||||
.withRegion(regions)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.authentication.aws;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
import com.amazonaws.auth.AWSCredentialsProvider;
|
||||
import com.amazonaws.client.builder.AwsClientBuilder;
|
||||
import com.amazonaws.regions.Regions;
|
||||
import com.amazonaws.services.sagemaker.AmazonSageMaker;
|
||||
import com.amazonaws.services.sagemaker.AmazonSageMakerClientBuilder;
|
||||
|
||||
@UtilityClass
|
||||
public class AmazonSageMakerClientFactory {
|
||||
|
||||
public AmazonSageMaker createAmazonSageMakerClient(Map<String, String> awsProperties) {
|
||||
AWSCredentialsProvider awsCredentialsProvider = AWSCredentialsProviderFactor.credentialsProvider(awsProperties);
|
||||
Regions regions = Regions.fromName(awsProperties.get(AwsConfigurationKeys.AWS_REGION));
|
||||
String endpoint = awsProperties.get(AwsConfigurationKeys.AWS_ENDPOINT);
|
||||
|
||||
if (endpoint != null && !endpoint.isEmpty()) {
|
||||
return AmazonSageMakerClientBuilder
|
||||
.standard()
|
||||
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpoint, regions.getName()))
|
||||
.withCredentials(awsCredentialsProvider)
|
||||
.build();
|
||||
} else {
|
||||
return AmazonSageMakerClientBuilder
|
||||
.standard()
|
||||
.withCredentials(awsCredentialsProvider)
|
||||
.withRegion(regions)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.authentication.aws;
|
||||
|
||||
public class AwsConfigurationKeys {
|
||||
|
||||
public static final String AWS_AUTHENTICATION_TYPE = "credentials.provider.type";
|
||||
public static final String AWS_REGION = "region";
|
||||
public static final String AWS_ENDPOINT = "endpoint";
|
||||
|
||||
public static final String AWS_ACCESS_KEY_ID = "access.key.id";
|
||||
public static final String AWS_SECRET = "access.key.secret";
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.authentication.aws;
|
||||
|
||||
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
|
||||
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
|
||||
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
|
||||
import software.amazon.awssdk.regions.Region;
|
||||
import software.amazon.awssdk.services.datasync.DataSyncClient;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
@UtilityClass
|
||||
public class DataSyncClientFactory {
|
||||
|
||||
public DataSyncClient createDataSyncClient(Map<String, String> awsProperties) {
|
||||
// todo: upgrade the version of aws sdk
|
||||
String awsAccessKeyId = awsProperties.get(AwsConfigurationKeys.AWS_ACCESS_KEY_ID);
|
||||
String awsSecretAccessKey = awsProperties.get(AwsConfigurationKeys.AWS_SECRET);
|
||||
final AwsBasicCredentials basicAWSCredentials = AwsBasicCredentials.create(awsAccessKeyId, awsSecretAccessKey);
|
||||
final AwsCredentialsProvider awsCredentialsProvider = StaticCredentialsProvider.create(basicAWSCredentials);
|
||||
|
||||
// create a datasync client
|
||||
return DataSyncClient.builder()
|
||||
.region(Region.of(awsProperties.get(AwsConfigurationKeys.AWS_REGION)))
|
||||
.credentialsProvider(awsCredentialsProvider)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
aws:
|
||||
s3:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: accessKey123
|
||||
access.key.secret: secretKey123
|
||||
region: us-east-1
|
||||
bucket.name: dolphinscheduler
|
||||
endpoint: http://s3:9000
|
||||
emr:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: minioadmin
|
||||
access.key.secret: minioadmin
|
||||
region: cn-north-1
|
||||
endpoint: http://localhost:9000
|
||||
sagemaker:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: minioadmin
|
||||
access.key.secret: minioadmin
|
||||
region: cn-north-1
|
||||
endpoint: http://localhost:9000
|
||||
dms:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: minioadmin
|
||||
access.key.secret: minioadmin
|
||||
region: cn-north-1
|
||||
endpoint: http://localhost:9000
|
||||
datasync:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: minioadmin
|
||||
access.key.secret: minioadmin
|
||||
region: cn-north-1
|
||||
endpoint: http://localhost:9000
|
||||
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
~ contributor license agreements. See the NOTICE file distributed with
|
||||
~ this work for additional information regarding copyright ownership.
|
||||
~ The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
~ (the "License"); you may not use this file except in compliance with
|
||||
~ the License. You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler</artifactId>
|
||||
<version>dev-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dolphinscheduler-authentication</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>dolphinscheduler-aws-authentication</module>
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-bom</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
</project>
|
||||
|
|
@ -41,10 +41,6 @@
|
|||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- dolphinscheduler -->
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-aws-authentication</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ public final class Constants {
|
|||
public static final String COMMON_PROPERTIES_PATH = "/common.properties";
|
||||
|
||||
public static final String REMOTE_LOGGING_YAML_PATH = "/remote-logging.yaml";
|
||||
public static final String AWS_YAML_PATH = "/aws.yaml";
|
||||
|
||||
public static final String FORMAT_SS = "%s%s";
|
||||
public static final String FORMAT_S_S = "%s/%s";
|
||||
|
|
@ -131,7 +130,8 @@ public final class Constants {
|
|||
*/
|
||||
public static final String RESOURCE_STORAGE_TYPE = "resource.storage.type";
|
||||
|
||||
public static final String AWS_S3_BUCKET_NAME = "aws.s3.bucket.name";
|
||||
public static final String AWS_S3_BUCKET_NAME = "resource.aws.s3.bucket.name";
|
||||
public static final String AWS_END_POINT = "resource.aws.s3.endpoint";
|
||||
|
||||
public static final String ALIBABA_CLOUD_OSS_BUCKET_NAME = "resource.alibaba.cloud.oss.bucket.name";
|
||||
public static final String ALIBABA_CLOUD_OSS_END_POINT = "resource.alibaba.cloud.oss.endpoint";
|
||||
|
|
@ -704,8 +704,19 @@ public final class Constants {
|
|||
|
||||
public static final String REMOTE_LOGGING_OSS_ENDPOINT = "remote.logging.oss.endpoint";
|
||||
|
||||
/**
|
||||
* remote logging for S3
|
||||
*/
|
||||
public static final String REMOTE_LOGGING_S3_ACCESS_KEY_ID = "remote.logging.s3.access.key.id";
|
||||
|
||||
public static final String REMOTE_LOGGING_S3_ACCESS_KEY_SECRET = "remote.logging.s3.access.key.secret";
|
||||
|
||||
public static final String REMOTE_LOGGING_S3_BUCKET_NAME = "remote.logging.s3.bucket.name";
|
||||
|
||||
public static final String REMOTE_LOGGING_S3_ENDPOINT = "remote.logging.s3.endpoint";
|
||||
|
||||
public static final String REMOTE_LOGGING_S3_REGION = "remote.logging.s3.region";
|
||||
|
||||
/**
|
||||
* remote logging for GCS
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
package org.apache.dolphinscheduler.common.log.remote;
|
||||
|
||||
import org.apache.dolphinscheduler.authentication.aws.AmazonS3ClientFactory;
|
||||
import org.apache.dolphinscheduler.common.constants.Constants;
|
||||
import org.apache.dolphinscheduler.common.utils.PropertyUtils;
|
||||
|
||||
|
|
@ -27,25 +26,41 @@ import java.io.Closeable;
|
|||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import com.amazonaws.auth.AWSStaticCredentialsProvider;
|
||||
import com.amazonaws.auth.BasicAWSCredentials;
|
||||
import com.amazonaws.client.builder.AwsClientBuilder;
|
||||
import com.amazonaws.regions.Regions;
|
||||
import com.amazonaws.services.s3.AmazonS3;
|
||||
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
|
||||
import com.amazonaws.services.s3.model.S3Object;
|
||||
import com.amazonaws.services.s3.model.S3ObjectInputStream;
|
||||
|
||||
@Slf4j
|
||||
public class S3RemoteLogHandler implements RemoteLogHandler, Closeable {
|
||||
|
||||
private final String bucketName;
|
||||
private String accessKeyId;
|
||||
|
||||
private final AmazonS3 s3Client;
|
||||
private String accessKeySecret;
|
||||
|
||||
private String region;
|
||||
|
||||
private String bucketName;
|
||||
|
||||
private String endPoint;
|
||||
|
||||
private AmazonS3 s3Client;
|
||||
|
||||
private static S3RemoteLogHandler instance;
|
||||
|
||||
private S3RemoteLogHandler() {
|
||||
accessKeyId = readAccessKeyID();
|
||||
accessKeySecret = readAccessKeySecret();
|
||||
region = readRegion();
|
||||
bucketName = readBucketName();
|
||||
endPoint = readEndPoint();
|
||||
s3Client = buildS3Client();
|
||||
checkBucketNameExists(bucketName);
|
||||
}
|
||||
|
|
@ -59,8 +74,23 @@ public class S3RemoteLogHandler implements RemoteLogHandler, Closeable {
|
|||
}
|
||||
|
||||
protected AmazonS3 buildS3Client() {
|
||||
Map<String, String> awsProperties = PropertyUtils.getByPrefix("aws.s3.", "");
|
||||
return AmazonS3ClientFactory.createAmazonS3Client(awsProperties);
|
||||
if (StringUtils.isNotEmpty(endPoint)) {
|
||||
return AmazonS3ClientBuilder
|
||||
.standard()
|
||||
.withPathStyleAccessEnabled(true)
|
||||
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(
|
||||
endPoint, Regions.fromName(region).getName()))
|
||||
.withCredentials(
|
||||
new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKeyId, accessKeySecret)))
|
||||
.build();
|
||||
} else {
|
||||
return AmazonS3ClientBuilder
|
||||
.standard()
|
||||
.withCredentials(
|
||||
new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKeyId, accessKeySecret)))
|
||||
.withRegion(Regions.fromName(region))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -101,8 +131,24 @@ public class S3RemoteLogHandler implements RemoteLogHandler, Closeable {
|
|||
}
|
||||
}
|
||||
|
||||
protected String readAccessKeyID() {
|
||||
return PropertyUtils.getString(Constants.REMOTE_LOGGING_S3_ACCESS_KEY_ID);
|
||||
}
|
||||
|
||||
protected String readAccessKeySecret() {
|
||||
return PropertyUtils.getString(Constants.REMOTE_LOGGING_S3_ACCESS_KEY_SECRET);
|
||||
}
|
||||
|
||||
protected String readRegion() {
|
||||
return PropertyUtils.getString(Constants.REMOTE_LOGGING_S3_REGION);
|
||||
}
|
||||
|
||||
protected String readBucketName() {
|
||||
return PropertyUtils.getString(Constants.AWS_S3_BUCKET_NAME);
|
||||
return PropertyUtils.getString(Constants.REMOTE_LOGGING_S3_BUCKET_NAME);
|
||||
}
|
||||
|
||||
protected String readEndPoint() {
|
||||
return PropertyUtils.getString(Constants.REMOTE_LOGGING_S3_ENDPOINT);
|
||||
}
|
||||
|
||||
public void checkBucketNameExists(String bucketName) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
|
||||
package org.apache.dolphinscheduler.common.utils;
|
||||
|
||||
import static org.apache.dolphinscheduler.common.constants.Constants.AWS_YAML_PATH;
|
||||
import static org.apache.dolphinscheduler.common.constants.Constants.COMMON_PROPERTIES_PATH;
|
||||
import static org.apache.dolphinscheduler.common.constants.Constants.REMOTE_LOGGING_YAML_PATH;
|
||||
|
||||
|
|
@ -43,7 +42,7 @@ public class PropertyUtils {
|
|||
private final ImmutablePriorityPropertyDelegate propertyDelegate =
|
||||
new ImmutablePriorityPropertyDelegate(
|
||||
new ImmutablePropertyDelegate(COMMON_PROPERTIES_PATH),
|
||||
new ImmutableYamlDelegate(REMOTE_LOGGING_YAML_PATH, AWS_YAML_PATH));
|
||||
new ImmutableYamlDelegate(REMOTE_LOGGING_YAML_PATH));
|
||||
|
||||
public static String getString(String key) {
|
||||
return propertyDelegate.get(key.trim());
|
||||
|
|
@ -107,19 +106,6 @@ public class PropertyUtils {
|
|||
return matchedProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all properties with specified prefix, like: fs., will replace the prefix with newPrefix
|
||||
*/
|
||||
public static Map<String, String> getByPrefix(String prefix, String newPrefix) {
|
||||
Map<String, String> matchedProperties = new HashMap<>();
|
||||
for (String propName : propertyDelegate.getPropertyKeys()) {
|
||||
if (propName.startsWith(prefix)) {
|
||||
matchedProperties.put(propName.replace(prefix, newPrefix), propertyDelegate.get(propName));
|
||||
}
|
||||
}
|
||||
return matchedProperties;
|
||||
}
|
||||
|
||||
public static <T> Set<T> getSet(String key, Function<String, Set<T>> transformFunction, Set<T> defaultValue) {
|
||||
return propertyDelegate.get(key, transformFunction, defaultValue);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ resource.azure.tenant.id=minioadmin
|
|||
# The query interval
|
||||
resource.query.interval=10000
|
||||
|
||||
# The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.access.key.id=minioadmin
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key=minioadmin
|
||||
# The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region=cn-north-1
|
||||
# The name of the bucket. You need to create them by yourself. Otherwise, the system cannot start. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name.
|
||||
resource.aws.s3.bucket.name=dolphinscheduler
|
||||
# You need to set this parameter when private cloud s3. If S3 uses public cloud, you only need to set resource.aws.region or set to the endpoint of a public cloud such as S3.cn-north-1.amazonaws.com.cn
|
||||
resource.aws.s3.endpoint=http://localhost:9000
|
||||
|
||||
# alibaba cloud access key id, required if you set resource.storage.type=OSS
|
||||
resource.alibaba.cloud.access.key.id=<your-access-key-id>
|
||||
# alibaba cloud access key secret, required if you set resource.storage.type=OSS
|
||||
|
|
@ -177,7 +188,16 @@ remote.logging.oss.access.key.secret=<access.key.secret>
|
|||
remote.logging.oss.bucket.name=<bucket.name>
|
||||
# oss endpoint, required if you set remote.logging.target=OSS
|
||||
remote.logging.oss.endpoint=<endpoint>
|
||||
|
||||
# s3 access key id, required if you set remote.logging.target=S3
|
||||
remote.logging.s3.access.key.id=<access.key.id>
|
||||
# s3 access key secret, required if you set remote.logging.target=S3
|
||||
remote.logging.s3.access.key.secret=<access.key.secret>
|
||||
# s3 bucket name, required if you set remote.logging.target=S3
|
||||
remote.logging.s3.bucket.name=<bucket.name>
|
||||
# s3 endpoint, required if you set remote.logging.target=S3
|
||||
remote.logging.s3.endpoint=<endpoint>
|
||||
# s3 region, required if you set remote.logging.target=S3
|
||||
remote.logging.s3.region=<region>
|
||||
# the location of the google cloud credential, required if you set remote.logging.target=GCS
|
||||
remote.logging.google.cloud.storage.credential=/path/to/credential
|
||||
# gcs bucket name, required if you set remote.logging.target=GCS
|
||||
|
|
|
|||
|
|
@ -34,16 +34,28 @@ remote-logging:
|
|||
bucket.name: <bucket.name>
|
||||
# oss endpoint, required if you set remote-logging.target=OSS
|
||||
endpoint: <endpoint>
|
||||
# required if you set remote-logging.target=S3
|
||||
s3:
|
||||
# s3 access key id, required if you set remote-logging.target=S3
|
||||
access.key.id: <access.key.id>
|
||||
# s3 access key secret, required if you set remote-logging.target=S3
|
||||
access.key.secret: <access.key.secret>
|
||||
# s3 bucket name, required if you set remote-logging.target=S3
|
||||
bucket.name: <bucket.name>
|
||||
# s3 endpoint, required if you set remote-logging.target=S3
|
||||
endpoint: <endpoint>
|
||||
# s3 region, required if you set remote-logging.target=S3
|
||||
region: <region>
|
||||
google.cloud.storage:
|
||||
# the location of the google cloud credential, required if you set remote-logging.target=GCS
|
||||
credential: /path/to/credential
|
||||
# gcs bucket name, required if you set remote-logging.target=GCS
|
||||
# gcs bucket name, required if you set remote-logging.target=GCS
|
||||
bucket.name: <your-bucket>
|
||||
abs:
|
||||
# abs account name, required if you set resource.storage.type=ABS
|
||||
account.name: <your-account-name>
|
||||
# abs account key, required if you set resource.storage.type=ABS
|
||||
# abs account key, required if you set resource.storage.type=ABS
|
||||
account.key: <your-account-key>
|
||||
# abs container name, required if you set resource.storage.type=ABS
|
||||
# abs container name, required if you set resource.storage.type=ABS
|
||||
container.name: <your-container-name>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,15 +17,12 @@
|
|||
|
||||
package org.apache.dolphinscheduler.common.utils;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import org.apache.dolphinscheduler.common.constants.Constants;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -51,14 +48,4 @@ public class PropertyUtilsTest {
|
|||
}, Sets.newHashSet("docker0"));
|
||||
Assertions.assertEquals(Sets.newHashSet("docker0"), networkInterface);
|
||||
}
|
||||
|
||||
@Test
|
||||
void getByPrefix() {
|
||||
Map<String, String> awsProperties = PropertyUtils.getByPrefix("resource.aws.", "");
|
||||
assertThat(awsProperties).containsEntry("access.key.id", "minioadmin");
|
||||
assertThat(awsProperties).containsEntry("secret.access.key", "minioadmin");
|
||||
assertThat(awsProperties).containsEntry("region", "cn-north-1");
|
||||
assertThat(awsProperties).containsEntry("s3.bucket.name", "dolphinscheduler");
|
||||
assertThat(awsProperties).containsEntry("endpoint", "http://localhost:9000");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,10 +45,6 @@ resource.azure.tenant.id=minioadmin
|
|||
# The query interval
|
||||
resource.query.interval=10000
|
||||
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
aws.credentials.provider.type=AWSStaticCredentialsProvider
|
||||
# The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.access.key.id=minioadmin
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
|
|
@ -58,7 +54,7 @@ resource.aws.region=cn-north-1
|
|||
# The name of the bucket. You need to create them by yourself. Otherwise, the system cannot start. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name.
|
||||
resource.aws.s3.bucket.name=dolphinscheduler
|
||||
# You need to set this parameter when private cloud s3. If S3 uses public cloud, you only need to set resource.aws.region or set to the endpoint of a public cloud such as S3.cn-north-1.amazonaws.com.cn
|
||||
resource.aws.endpoint=http://localhost:9000
|
||||
resource.aws.s3.endpoint=http://localhost:9000
|
||||
|
||||
# alibaba cloud access key id, required if you set resource.storage.type=OSS
|
||||
resource.alibaba.cloud.access.key.id=<your-access-key-id>
|
||||
|
|
|
|||
|
|
@ -55,9 +55,6 @@ public class ProjectParameter {
|
|||
@TableField("param_value")
|
||||
private String paramValue;
|
||||
|
||||
@TableField("param_data_type")
|
||||
private String paramDataType;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@ public interface ProjectParameterMapper extends BaseMapper<ProjectParameter> {
|
|||
IPage<ProjectParameter> queryProjectParameterListPaging(IPage<ProjectParameter> page,
|
||||
@Param("projectCode") long projectCode,
|
||||
@Param("projectParameterIds") List<Integer> projectParameterIds,
|
||||
@Param("searchName") String searchName,
|
||||
@Param("projectParameterDataType") String projectParameterDataType);
|
||||
@Param("searchName") String searchName);
|
||||
|
||||
List<ProjectParameter> queryByProjectCode(@Param("projectCode") long projectCode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="org.apache.dolphinscheduler.dao.mapper.ProjectParameterMapper">
|
||||
<sql id="baseSql">
|
||||
id, param_name, param_value, param_data_type, code, project_code, user_id, operator, create_time, update_time
|
||||
id, param_name, param_value, code, project_code, user_id, operator, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<select id="queryByCode" resultType="org.apache.dolphinscheduler.dao.entity.ProjectParameter">
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
<select id="queryProjectParameterListPaging" resultType="org.apache.dolphinscheduler.dao.entity.ProjectParameter">
|
||||
select
|
||||
pp.id, param_name, param_value, param_data_type, code, project_code, user_id, operator, pp.create_time, pp.update_time,
|
||||
pp.id, param_name, param_value, code, project_code, user_id, operator, pp.create_time, pp.update_time,
|
||||
u.user_name as create_user,
|
||||
u2.user_name as modify_user
|
||||
from t_ds_project_parameter pp
|
||||
|
|
@ -69,9 +69,6 @@
|
|||
OR param_value LIKE concat('%', #{searchName}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="projectParameterDataType!=null and projectParameterDataType != ''">
|
||||
AND param_data_type = #{projectParameterDataType}
|
||||
</if>
|
||||
order by pp.update_time desc
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -667,7 +667,6 @@ CREATE TABLE t_ds_project_parameter
|
|||
id int(11) NOT NULL AUTO_INCREMENT,
|
||||
param_name varchar(255) NOT NULL,
|
||||
param_value text NOT NULL,
|
||||
param_data_type varchar(50) DEFAULT 'VARCHAR',
|
||||
code bigint(20) NOT NULL,
|
||||
project_code bigint(20) NOT NULL,
|
||||
user_id int(11) DEFAULT NULL,
|
||||
|
|
@ -1071,7 +1070,7 @@ CREATE TABLE t_ds_version
|
|||
-- Records of t_ds_version
|
||||
-- ----------------------------
|
||||
INSERT INTO t_ds_version
|
||||
VALUES ('1', '3.2.2');
|
||||
VALUES ('1', '3.3.0');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
|
|
|
|||
|
|
@ -668,7 +668,6 @@ CREATE TABLE `t_ds_project_parameter` (
|
|||
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key',
|
||||
`param_name` varchar(255) NOT NULL COMMENT 'project parameter name',
|
||||
`param_value` text NOT NULL COMMENT 'project parameter value',
|
||||
`param_data_type` varchar(50) DEFAULT 'VARCHAR' COMMENT 'project parameter data type',
|
||||
`code` bigint(20) NOT NULL COMMENT 'encoding',
|
||||
`project_code` bigint(20) NOT NULL COMMENT 'project code',
|
||||
`user_id` int(11) DEFAULT NULL COMMENT 'creator id',
|
||||
|
|
@ -1045,7 +1044,7 @@ CREATE TABLE `t_ds_version` (
|
|||
-- ----------------------------
|
||||
-- Records of t_ds_version
|
||||
-- ----------------------------
|
||||
INSERT IGNORE INTO `t_ds_version` VALUES ('1', '3.2.2');
|
||||
INSERT IGNORE INTO `t_ds_version` VALUES ('1', '3.3.0');
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
|
|
|
|||
|
|
@ -595,7 +595,6 @@ CREATE TABLE t_ds_project_parameter (
|
|||
id int NOT NULL ,
|
||||
param_name varchar(255) NOT NULL ,
|
||||
param_value text NOT NULL ,
|
||||
param_data_type varchar(50) DEFAULT 'VARCHAR',
|
||||
code bigint NOT NULL,
|
||||
project_code bigint NOT NULL,
|
||||
user_id int DEFAULT NULL ,
|
||||
|
|
@ -1064,7 +1063,7 @@ INSERT INTO t_ds_queue(queue_name, queue, create_time, update_time)
|
|||
VALUES ('default', 'default', '2018-11-29 10:22:33', '2018-11-29 10:22:33');
|
||||
|
||||
-- Records of t_ds_queue,default queue name : default
|
||||
INSERT INTO t_ds_version(version) VALUES ('3.2.2');
|
||||
INSERT INTO t_ds_version(version) VALUES ('3.3.0');
|
||||
|
||||
--
|
||||
-- Table structure for table t_ds_plugin_define
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.2.2
|
||||
3.3.0
|
||||
|
|
|
|||
|
|
@ -53,6 +53,4 @@ END;
|
|||
d//
|
||||
delimiter ;
|
||||
CALL modify_data_t_ds_audit_log_input_entry;
|
||||
DROP PROCEDURE modify_data_t_ds_audit_log_input_entry;
|
||||
|
||||
ALTER TABLE t_ds_project_parameter ADD `param_data_type` varchar (50) DEFAULT 'VARCHAR' COMMENT 'project parameter data type';
|
||||
DROP PROCEDURE modify_data_t_ds_audit_log_input_entry;
|
||||
|
|
@ -56,6 +56,4 @@ $$ LANGUAGE plpgsql;
|
|||
d//
|
||||
|
||||
select modify_data_t_ds_audit_log_input_entry();
|
||||
DROP FUNCTION IF EXISTS modify_data_t_ds_audit_log_input_entry();
|
||||
|
||||
ALTER TABLE t_ds_project_parameter ADD COLUMN IF NOT EXISTS param_data_type varchar(50) DEFAULT 'VARCHAR';
|
||||
DROP FUNCTION IF EXISTS modify_data_t_ds_audit_log_input_entry();
|
||||
|
|
@ -89,7 +89,7 @@ public class ProjectParameterMapperTest extends BaseDaoTest {
|
|||
insertOne(2, "name2", 2);
|
||||
|
||||
Page<ProjectParameter> page = new Page(1, 3);
|
||||
IPage<ProjectParameter> res = projectParameterMapper.queryProjectParameterListPaging(page, 1, null, null, null);
|
||||
IPage<ProjectParameter> res = projectParameterMapper.queryProjectParameterListPaging(page, 1, null, null);
|
||||
Assertions.assertEquals(1, res.getRecords().size());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,23 +67,6 @@
|
|||
<fileSet>
|
||||
<directory>${basedir}/../dolphinscheduler-tools/target/tools</directory>
|
||||
<outputDirectory>tools</outputDirectory>
|
||||
<excludes>
|
||||
<exclude>libs/</exclude>
|
||||
<exclude>bin/</exclude>
|
||||
<exclude>dist-bin/</exclude>
|
||||
</excludes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${basedir}/../dolphinscheduler-tools/target/tools/libs</directory>
|
||||
<outputDirectory>tools/libs</outputDirectory>
|
||||
<includes>
|
||||
<include>dolphinscheduler-*.jar</include>
|
||||
<include>spring-*.jar</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${basedir}/../dolphinscheduler-tools/target/tools/dist-bin</directory>
|
||||
<outputDirectory>tools/bin</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
|
|
@ -91,6 +74,11 @@
|
|||
<outputDirectory>.</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<directory>${basedir}/../dolphinscheduler-ui/dist</directory>
|
||||
<outputDirectory>./ui</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<fileSet>
|
||||
<directory>${basedir}/../script</directory>
|
||||
<outputDirectory>bin</outputDirectory>
|
||||
|
|
|
|||
|
|
@ -1,65 +0,0 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
aws:
|
||||
s3:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: accessKey123
|
||||
access.key.secret: secretKey123
|
||||
region: us-east-1
|
||||
bucket.name: dolphinscheduler
|
||||
endpoint: http://s3:9000
|
||||
emr:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: minioadmin
|
||||
access.key.secret: minioadmin
|
||||
region: cn-north-1
|
||||
endpoint: http://localhost:9000
|
||||
sagemaker:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: minioadmin
|
||||
access.key.secret: minioadmin
|
||||
region: cn-north-1
|
||||
endpoint: http://localhost:9000
|
||||
dms:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: minioadmin
|
||||
access.key.secret: minioadmin
|
||||
region: cn-north-1
|
||||
endpoint: http://localhost:9000
|
||||
datasync:
|
||||
# The AWS credentials provider type. support: AWSStaticCredentialsProvider, InstanceProfileCredentialsProvider
|
||||
# AWSStaticCredentialsProvider: use the access key and secret key to authenticate
|
||||
# InstanceProfileCredentialsProvider: use the IAM role to authenticate
|
||||
credentials.provider.type: AWSStaticCredentialsProvider
|
||||
access.key.id: minioadmin
|
||||
access.key.secret: minioadmin
|
||||
region: cn-north-1
|
||||
endpoint: http://localhost:9000
|
||||
|
||||
|
|
@ -37,6 +37,17 @@ resource.azure.tenant.id=minioadmin
|
|||
# The query interval
|
||||
resource.query.interval=10000
|
||||
|
||||
# The AWS access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.access.key.id=accessKey123
|
||||
# The AWS secret access key. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.secret.access.key=secretKey123
|
||||
# The AWS Region to use. if resource.storage.type=S3 or use EMR-Task, This configuration is required
|
||||
resource.aws.region=us-east-1
|
||||
# The name of the bucket. You need to create them by yourself. Otherwise, the system cannot start. All buckets in Amazon S3 share a single namespace; ensure the bucket is given a unique name.
|
||||
resource.aws.s3.bucket.name=dolphinscheduler
|
||||
# You need to set this parameter when private cloud s3. If S3 uses public cloud, you only need to set resource.aws.region or set to the endpoint of a public cloud such as S3.cn-north-1.amazonaws.com.cn
|
||||
resource.aws.s3.endpoint=http://s3:9000
|
||||
|
||||
# alibaba cloud access key id, required if you set resource.storage.type=OSS
|
||||
resource.alibaba.cloud.access.key.id=<your-access-key-id>
|
||||
# alibaba cloud access key secret, required if you set resource.storage.type=OSS
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ services:
|
|||
retries: 120
|
||||
volumes:
|
||||
- ./common.properties:/opt/dolphinscheduler/conf/common.properties
|
||||
- ./aws.yaml:/opt/dolphinscheduler/conf/aws.yaml
|
||||
depends_on:
|
||||
s3:
|
||||
condition: service_healthy
|
||||
|
|
|
|||
|
|
@ -31,12 +31,10 @@ import org.apache.dolphinscheduler.extract.base.utils.Host;
|
|||
import org.apache.dolphinscheduler.extract.base.utils.NettyUtils;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import io.netty.bootstrap.Bootstrap;
|
||||
|
|
@ -56,8 +54,7 @@ public class NettyRemotingClient implements AutoCloseable {
|
|||
|
||||
private final Bootstrap bootstrap = new Bootstrap();
|
||||
|
||||
private final ReentrantLock channelsLock = new ReentrantLock();
|
||||
private final Map<Host, Channel> channels = new ConcurrentHashMap<>();
|
||||
private final ConcurrentHashMap<Host, Channel> channels = new ConcurrentHashMap<>(128);
|
||||
|
||||
private final AtomicBoolean isStarted = new AtomicBoolean(false);
|
||||
|
||||
|
|
@ -107,10 +104,9 @@ public class NettyRemotingClient implements AutoCloseable {
|
|||
isStarted.compareAndSet(false, true);
|
||||
}
|
||||
|
||||
public IRpcResponse sendSync(final Host host,
|
||||
final Transporter transporter,
|
||||
public IRpcResponse sendSync(final Host host, final Transporter transporter,
|
||||
final long timeoutMillis) throws InterruptedException, RemotingException {
|
||||
final Channel channel = getOrCreateChannel(host);
|
||||
final Channel channel = getChannel(host);
|
||||
if (channel == null) {
|
||||
throw new RemotingException(String.format("connect to : %s fail", host));
|
||||
}
|
||||
|
|
@ -141,40 +137,36 @@ public class NettyRemotingClient implements AutoCloseable {
|
|||
return iRpcResponse;
|
||||
}
|
||||
|
||||
Channel getOrCreateChannel(Host host) {
|
||||
private Channel getChannel(Host host) {
|
||||
Channel channel = channels.get(host);
|
||||
if (channel != null && channel.isActive()) {
|
||||
return channel;
|
||||
}
|
||||
try {
|
||||
channelsLock.lock();
|
||||
channel = channels.get(host);
|
||||
if (channel != null && channel.isActive()) {
|
||||
return channel;
|
||||
}
|
||||
channel = createChannel(host);
|
||||
channels.put(host, channel);
|
||||
} finally {
|
||||
channelsLock.unlock();
|
||||
}
|
||||
return channel;
|
||||
return createChannel(host, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* create channel
|
||||
*
|
||||
* @param host host
|
||||
* @param host host
|
||||
* @param isSync sync flag
|
||||
* @return channel
|
||||
*/
|
||||
Channel createChannel(Host host) {
|
||||
private Channel createChannel(Host host, boolean isSync) {
|
||||
try {
|
||||
ChannelFuture future = bootstrap.connect(new InetSocketAddress(host.getIp(), host.getPort()));
|
||||
future = future.sync();
|
||||
if (future.isSuccess()) {
|
||||
return future.channel();
|
||||
} else {
|
||||
throw new IllegalArgumentException("connect to host: " + host + " failed", future.cause());
|
||||
ChannelFuture future;
|
||||
synchronized (bootstrap) {
|
||||
future = bootstrap.connect(new InetSocketAddress(host.getIp(), host.getPort()));
|
||||
}
|
||||
if (isSync) {
|
||||
future.sync();
|
||||
}
|
||||
if (future.isSuccess()) {
|
||||
Channel channel = future.channel();
|
||||
channels.put(host, channel);
|
||||
return channel;
|
||||
}
|
||||
throw new IllegalArgumentException("connect to host: " + host + " failed");
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new RuntimeException("Connect to host: " + host + " failed", e);
|
||||
|
|
@ -197,23 +189,16 @@ public class NettyRemotingClient implements AutoCloseable {
|
|||
}
|
||||
|
||||
private void closeChannels() {
|
||||
try {
|
||||
channelsLock.lock();
|
||||
channels.values().forEach(Channel::close);
|
||||
} finally {
|
||||
channelsLock.unlock();
|
||||
for (Channel channel : this.channels.values()) {
|
||||
channel.close();
|
||||
}
|
||||
this.channels.clear();
|
||||
}
|
||||
|
||||
public void closeChannel(Host host) {
|
||||
try {
|
||||
channelsLock.lock();
|
||||
Channel channel = this.channels.remove(host);
|
||||
if (channel != null) {
|
||||
channel.close();
|
||||
}
|
||||
} finally {
|
||||
channelsLock.unlock();
|
||||
Channel channel = this.channels.remove(host);
|
||||
if (channel != null) {
|
||||
channel.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,10 +46,6 @@
|
|||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-datasource-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-meter</artifactId>
|
||||
|
|
@ -70,7 +66,12 @@
|
|||
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-task-all-prune</artifactId>
|
||||
<artifactId>dolphinscheduler-task-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dolphinscheduler</groupId>
|
||||
<artifactId>dolphinscheduler-storage-all</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -56,13 +56,6 @@
|
|||
</includes>
|
||||
<outputDirectory>conf</outputDirectory>
|
||||
</fileSet>
|
||||
<fileSet>
|
||||
<directory>${basedir}/../dolphinscheduler-authentication/dolphinscheduler-aws-authentication/src/main/resources</directory>
|
||||
<includes>
|
||||
<include>**/*.yaml</include>
|
||||
</includes>
|
||||
<outputDirectory>conf</outputDirectory>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
-XX:+PrintGCDetails
|
||||
-Xloggc:gc.log
|
||||
|
||||
-XX:-OmitStackTraceInFastThrow
|
||||
-XX:+ExitOnOutOfMemoryError
|
||||
-XX:+HeapDumpOnOutOfMemoryError
|
||||
-XX:HeapDumpPath=dump.hprof
|
||||
|
|
|
|||
|
|
@ -15,17 +15,19 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.extract.base.utils;
|
||||
package org.apache.dolphinscheduler.server.master.event;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
/**
|
||||
* This exception represent the exception can be recovered, when we get this exception,
|
||||
* we will move the event to the fail of the queue.
|
||||
*/
|
||||
public class StateEventHandleFailure extends Exception {
|
||||
|
||||
import com.google.common.truth.Truth;
|
||||
|
||||
class HostTest {
|
||||
|
||||
@Test
|
||||
void testEquals() {
|
||||
Truth.assertThat(Host.of("localhost:8080")).isEqualTo(Host.of("localhost:8080"));
|
||||
public StateEventHandleFailure(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public StateEventHandleFailure(String message, Throwable throwable) {
|
||||
super(message, throwable);
|
||||
}
|
||||
}
|
||||