xiangzihao
1 month ago
committed by
GitHub
221 changed files with 3690 additions and 1518 deletions
@ -1,58 +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. |
||||
# |
||||
|
||||
# --------------------------------------------------------- |
||||
# INSTALL MACHINE |
||||
# --------------------------------------------------------- |
||||
# A comma separated list of machine hostname or IP would be installed DolphinScheduler, |
||||
# including master, worker, api, alert. If you want to deploy in pseudo-distributed |
||||
# mode, just write a pseudo-distributed hostname |
||||
# Example for hostnames: ips="ds1,ds2,ds3,ds4,ds5", Example for IPs: ips="192.168.8.1,192.168.8.2,192.168.8.3,192.168.8.4,192.168.8.5" |
||||
ips=${ips:-"localhost"} |
||||
|
||||
# Port of SSH protocol, default value is 22. For now we only support same port in all `ips` machine |
||||
# modify it if you use different ssh port |
||||
sshPort=${sshPort:-"22"} |
||||
|
||||
# A comma separated list of machine hostname or IP would be installed Master server, it |
||||
# must be a subset of configuration `ips`. |
||||
# Example for hostnames: masters="ds1,ds2", Example for IPs: masters="192.168.8.1,192.168.8.2" |
||||
masters=${masters:-"localhost"} |
||||
|
||||
# A comma separated list of machine <hostname>:<workerGroup> or <IP>:<workerGroup>.All hostname or IP must be a |
||||
# subset of configuration `ips`, And workerGroup have default value as `default`, but we recommend you declare behind the hosts |
||||
# Example for hostnames: workers="ds1:default,ds2:default,ds3:default", Example for IPs: workers="192.168.8.1:default,192.168.8.2:default,192.168.8.3:default" |
||||
workers=${workers:-"localhost:default"} |
||||
|
||||
# A comma separated list of machine hostname or IP would be installed Alert server, it |
||||
# must be a subset of configuration `ips`. |
||||
# Example for hostname: alertServer="ds3", Example for IP: alertServer="192.168.8.3" |
||||
alertServer=${alertServer:-"localhost"} |
||||
|
||||
# A comma separated list of machine hostname or IP would be installed API server, it |
||||
# must be a subset of configuration `ips`. |
||||
# Example for hostname: apiServers="ds1", Example for IP: apiServers="192.168.8.1" |
||||
apiServers=${apiServers:-"localhost"} |
||||
|
||||
# The directory to install DolphinScheduler for all machine we config above. It will automatically be created by `install.sh` script if not exists. |
||||
# Do not set this configuration same as the current path (pwd) |
||||
installPath=${installPath:-"/root/apache-dolphinscheduler-*-SNAPSHOT-bin"} |
||||
|
||||
# The user to deploy DolphinScheduler for all machine we config above. For now user must create by yourself before running `install.sh` |
||||
# script. The user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled than the root directory needs |
||||
# to be created by this user |
||||
deployUser=${deployUser:-"dolphinscheduler"} |
@ -1,58 +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. |
||||
# |
||||
|
||||
# --------------------------------------------------------- |
||||
# INSTALL MACHINE |
||||
# --------------------------------------------------------- |
||||
# A comma separated list of machine hostname or IP would be installed DolphinScheduler, |
||||
# including master, worker, api, alert. If you want to deploy in pseudo-distributed |
||||
# mode, just write a pseudo-distributed hostname |
||||
# Example for hostnames: ips="ds1,ds2,ds3,ds4,ds5", Example for IPs: ips="192.168.8.1,192.168.8.2,192.168.8.3,192.168.8.4,192.168.8.5" |
||||
ips=${ips:-"localhost"} |
||||
|
||||
# Port of SSH protocol, default value is 22. For now we only support same port in all `ips` machine |
||||
# modify it if you use different ssh port |
||||
sshPort=${sshPort:-"22"} |
||||
|
||||
# A comma separated list of machine hostname or IP would be installed Master server, it |
||||
# must be a subset of configuration `ips`. |
||||
# Example for hostnames: masters="ds1,ds2", Example for IPs: masters="192.168.8.1,192.168.8.2" |
||||
masters=${masters:-"localhost"} |
||||
|
||||
# A comma separated list of machine <hostname>:<workerGroup> or <IP>:<workerGroup>.All hostname or IP must be a |
||||
# subset of configuration `ips`, And workerGroup have default value as `default`, but we recommend you declare behind the hosts |
||||
# Example for hostnames: workers="ds1:default,ds2:default,ds3:default", Example for IPs: workers="192.168.8.1:default,192.168.8.2:default,192.168.8.3:default" |
||||
workers=${workers:-"localhost:default"} |
||||
|
||||
# A comma separated list of machine hostname or IP would be installed Alert server, it |
||||
# must be a subset of configuration `ips`. |
||||
# Example for hostname: alertServer="ds3", Example for IP: alertServer="192.168.8.3" |
||||
alertServer=${alertServer:-"localhost"} |
||||
|
||||
# A comma separated list of machine hostname or IP would be installed API server, it |
||||
# must be a subset of configuration `ips`. |
||||
# Example for hostname: apiServers="ds1", Example for IP: apiServers="192.168.8.1" |
||||
apiServers=${apiServers:-"localhost"} |
||||
|
||||
# The directory to install DolphinScheduler for all machine we config above. It will automatically be created by `install.sh` script if not exists. |
||||
# Do not set this configuration same as the current path (pwd) |
||||
installPath=${installPath:-"/root/apache-dolphinscheduler-*-SNAPSHOT-bin"} |
||||
|
||||
# The user to deploy DolphinScheduler for all machine we config above. For now user must create by yourself before running `install.sh` |
||||
# script. The user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled than the root directory needs |
||||
# to be created by this user |
||||
deployUser=${deployUser:-"dolphinscheduler"} |
@ -1,61 +0,0 @@
|
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
|
||||
# --------------------------------------------------------- |
||||
# INSTALL MACHINE |
||||
# --------------------------------------------------------- |
||||
# A comma separated list of machine hostname or IP would be installed DolphinScheduler, |
||||
# including master, worker, api, alert. If you want to deploy in pseudo-distributed |
||||
# mode, just write a pseudo-distributed hostname |
||||
# Example for hostnames: ips="ds1,ds2,ds3,ds4,ds5", Example for IPs: ips="192.168.8.1,192.168.8.2,192.168.8.3,192.168.8.4,192.168.8.5" |
||||
ips=${ips:-"localhost"} |
||||
|
||||
# Port of SSH protocol, default value is 22. For now we only support same port in all `ips` machine |
||||
# modify it if you use different ssh port |
||||
sshPort=${sshPort:-"22"} |
||||
|
||||
# A comma separated list of machine hostname or IP would be installed Master server, it |
||||
# must be a subset of configuration `ips`. |
||||
# Example for hostnames: masters="ds1,ds2", Example for IPs: masters="192.168.8.1,192.168.8.2" |
||||
masters=${masters:-"localhost"} |
||||
|
||||
# A comma separated list of machine <hostname>:<workerGroup> or <IP>:<workerGroup>.All hostname or IP must be a |
||||
# subset of configuration `ips`, And workerGroup have default value as `default`, but we recommend you declare behind the hosts |
||||
# Example for hostnames: workers="ds1:default,ds2:default,ds3:default", Example for IPs: workers="192.168.8.1:default,192.168.8.2:default,192.168.8.3:default" |
||||
workers=${workers:-"localhost:default"} |
||||
|
||||
# A comma separated list of machine hostname or IP would be installed Alert server, it |
||||
# must be a subset of configuration `ips`. |
||||
# Example for hostname: alertServer="ds3", Example for IP: alertServer="192.168.8.3" |
||||
alertServer=${alertServer:-"localhost"} |
||||
|
||||
# A comma separated list of machine hostname or IP would be installed API server, it |
||||
# must be a subset of configuration `ips`. |
||||
# Example for hostname: apiServers="ds1", Example for IP: apiServers="192.168.8.1" |
||||
apiServers=${apiServers:-"localhost"} |
||||
|
||||
# The directory to install DolphinScheduler for all machine we config above. It will automatically be created by `install.sh` script if not exists. |
||||
# Do not set this configuration same as the current path (pwd) |
||||
installPath=${installPath:-"/root/apache-dolphinscheduler-*-SNAPSHOT-bin"} |
||||
|
||||
# The user to deploy DolphinScheduler for all machine we config above. For now user must create by yourself before running `install.sh` |
||||
# script. The user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled than the root directory needs |
||||
# to be created by this user |
||||
deployUser=${deployUser:-"dolphinscheduler"} |
||||
|
||||
# The root of zookeeper, for now DolphinScheduler default registry server is zookeeper. |
||||
zkRoot=${zkRoot:-"/dolphinscheduler"} |
@ -0,0 +1,477 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.dolphinscheduler.plugin.datasource.api.constants; |
||||
|
||||
import org.apache.dolphinscheduler.common.constants.DateConstants; |
||||
|
||||
import java.time.Duration; |
||||
import java.util.Set; |
||||
import java.util.regex.Pattern; |
||||
|
||||
import lombok.experimental.UtilityClass; |
||||
|
||||
import com.google.common.collect.Sets; |
||||
|
||||
@UtilityClass |
||||
public class DataSourceConstants { |
||||
|
||||
public static final String ORG_POSTGRESQL_DRIVER = "org.postgresql.Driver"; |
||||
public static final String COM_MYSQL_CJ_JDBC_DRIVER = "com.mysql.cj.jdbc.Driver"; |
||||
public static final String COM_MYSQL_JDBC_DRIVER = "com.mysql.jdbc.Driver"; |
||||
public static final String ORG_APACHE_HIVE_JDBC_HIVE_DRIVER = "org.apache.hive.jdbc.HiveDriver"; |
||||
public static final String COM_CLICKHOUSE_JDBC_DRIVER = "com.clickhouse.jdbc.ClickHouseDriver"; |
||||
public static final String COM_DATABEND_JDBC_DRIVER = "com.databend.jdbc.DatabendDriver"; |
||||
public static final String COM_ORACLE_JDBC_DRIVER = "oracle.jdbc.OracleDriver"; |
||||
public static final String COM_SQLSERVER_JDBC_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; |
||||
public static final String COM_DB2_JDBC_DRIVER = "com.ibm.db2.jcc.DB2Driver"; |
||||
public static final String COM_PRESTO_JDBC_DRIVER = "com.facebook.presto.jdbc.PrestoDriver"; |
||||
public static final String COM_REDSHIFT_JDBC_DRIVER = "com.amazon.redshift.jdbc42.Driver"; |
||||
public static final String COM_ATHENA_JDBC_DRIVER = "com.simba.athena.jdbc.Driver"; |
||||
public static final String COM_TRINO_JDBC_DRIVER = "io.trino.jdbc.TrinoDriver"; |
||||
public static final String COM_DAMENG_JDBC_DRIVER = "dm.jdbc.driver.DmDriver"; |
||||
public static final String ORG_APACHE_KYUUBI_JDBC_DRIVER = "org.apache.kyuubi.jdbc.KyuubiHiveDriver"; |
||||
public static final String COM_OCEANBASE_JDBC_DRIVER = "com.oceanbase.jdbc.Driver"; |
||||
public static final String NET_SNOWFLAKE_JDBC_DRIVER = "net.snowflake.client.jdbc.SnowflakeDriver"; |
||||
public static final String COM_VERTICA_JDBC_DRIVER = "com.vertica.jdbc.Driver"; |
||||
public static final String COM_HANA_DB_JDBC_DRIVER = "com.sap.db.jdbc.Driver"; |
||||
|
||||
public static final String JDBC_MYSQL = "jdbc:mysql://"; |
||||
public static final String JDBC_MYSQL_LOADBALANCE = "jdbc:mysql:loadbalance://"; |
||||
public static final String JDBC_POSTGRESQL = "jdbc:postgresql://"; |
||||
public static final String JDBC_HIVE_2 = "jdbc:hive2://"; |
||||
public static final String JDBC_KYUUBI = "jdbc:kyuubi://"; |
||||
public static final String JDBC_CLICKHOUSE = "jdbc:clickhouse://"; |
||||
public static final String JDBC_DATABEND = "jdbc:databend://"; |
||||
public static final String JDBC_ORACLE_SID = "jdbc:oracle:thin:@"; |
||||
public static final String JDBC_ORACLE_SERVICE_NAME = "jdbc:oracle:thin:@//"; |
||||
public static final String JDBC_SQLSERVER = "jdbc:sqlserver://"; |
||||
public static final String JDBC_DB2 = "jdbc:db2://"; |
||||
public static final String JDBC_PRESTO = "jdbc:presto://"; |
||||
public static final String JDBC_REDSHIFT = "jdbc:redshift://"; |
||||
public static final String JDBC_REDSHIFT_IAM = "jdbc:redshift:iam://"; |
||||
public static final String JDBC_ATHENA = "jdbc:awsathena://"; |
||||
public static final String JDBC_TRINO = "jdbc:trino://"; |
||||
public static final String JDBC_DAMENG = "jdbc:dm://"; |
||||
public static final String JDBC_OCEANBASE = "jdbc:oceanbase://"; |
||||
public static final String JDBC_SNOWFLAKE = "jdbc:snowflake://"; |
||||
public static final String JDBC_VERTICA = "jdbc:vertica://"; |
||||
public static final String JDBC_HANA = "jdbc:sap://"; |
||||
|
||||
public static final String POSTGRESQL_VALIDATION_QUERY = "select version()"; |
||||
public static final String MYSQL_VALIDATION_QUERY = "select 1"; |
||||
public static final String HIVE_VALIDATION_QUERY = "select 1"; |
||||
public static final String CLICKHOUSE_VALIDATION_QUERY = "select 1"; |
||||
public static final String DATABEND_VALIDATION_QUERY = "select 1"; |
||||
public static final String ORACLE_VALIDATION_QUERY = "select 1 from dual"; |
||||
public static final String SQLSERVER_VALIDATION_QUERY = "select 1"; |
||||
public static final String DB2_VALIDATION_QUERY = "select 1 from sysibm.sysdummy1"; |
||||
public static final String PRESTO_VALIDATION_QUERY = "select 1"; |
||||
public static final String REDHIFT_VALIDATION_QUERY = "select 1"; |
||||
public static final String ATHENA_VALIDATION_QUERY = "select 1"; |
||||
public static final String TRINO_VALIDATION_QUERY = "select 1"; |
||||
public static final String DAMENG_VALIDATION_QUERY = "select 1"; |
||||
public static final String SNOWFLAKE_VALIDATION_QUERY = "select 1"; |
||||
|
||||
public static final String KYUUBI_VALIDATION_QUERY = "select 1"; |
||||
public static final String VERTICA_VALIDATION_QUERY = "select 1"; |
||||
|
||||
public static final String HANA_VALIDATION_QUERY = "select 1 from DUMMY"; |
||||
|
||||
public static final String SPRING_DATASOURCE_MIN_IDLE = "spring.datasource.minIdle"; |
||||
|
||||
public static final String SPRING_DATASOURCE_MAX_ACTIVE = "spring.datasource.maxActive"; |
||||
|
||||
public static final String SUPPORT_HIVE_ONE_SESSION = "support.hive.oneSession"; |
||||
/** |
||||
* QUESTION ? |
||||
*/ |
||||
public static final String QUESTION = "?"; |
||||
|
||||
/** |
||||
* comma , |
||||
*/ |
||||
public static final String COMMA = ","; |
||||
|
||||
/** |
||||
* hyphen |
||||
*/ |
||||
public static final String HYPHEN = "-"; |
||||
|
||||
/** |
||||
* slash / |
||||
*/ |
||||
public static final String SLASH = "/"; |
||||
|
||||
/** |
||||
* COLON : |
||||
*/ |
||||
public static final String COLON = ":"; |
||||
|
||||
/** |
||||
* SPACE " " |
||||
*/ |
||||
public static final String SPACE = " "; |
||||
|
||||
/** |
||||
* SINGLE_SLASH / |
||||
*/ |
||||
public static final String SINGLE_SLASH = "/"; |
||||
|
||||
/** |
||||
* DOUBLE_SLASH //
|
||||
*/ |
||||
public static final String DOUBLE_SLASH = "//"; |
||||
|
||||
/** |
||||
* SINGLE_QUOTES "'" |
||||
*/ |
||||
public static final String SINGLE_QUOTES = "'"; |
||||
/** |
||||
* DOUBLE_QUOTES "\"" |
||||
*/ |
||||
public static final String DOUBLE_QUOTES = "\""; |
||||
|
||||
/** |
||||
* SEMICOLON ; |
||||
*/ |
||||
public static final String SEMICOLON = ";"; |
||||
|
||||
/** |
||||
* EQUAL SIGN |
||||
*/ |
||||
public static final String EQUAL_SIGN = "="; |
||||
/** |
||||
* AT SIGN |
||||
*/ |
||||
public static final String AT_SIGN = "@"; |
||||
/** |
||||
* UNDERLINE |
||||
*/ |
||||
public static final String UNDERLINE = "_"; |
||||
|
||||
/** |
||||
* sleep time |
||||
*/ |
||||
public static final int SLEEP_TIME_MILLIS = 1000; |
||||
|
||||
/** |
||||
* exit code failure |
||||
*/ |
||||
public static final int EXIT_CODE_FAILURE = -1; |
||||
|
||||
/** |
||||
* exit code success |
||||
*/ |
||||
public static final int EXIT_CODE_SUCCESS = 0; |
||||
/** |
||||
* running code |
||||
*/ |
||||
public static final int RUNNING_CODE = 1; |
||||
|
||||
public static final String SH = "sh"; |
||||
|
||||
/** |
||||
* log flush interval?output when reach the interval |
||||
*/ |
||||
public static final int DEFAULT_LOG_FLUSH_INTERVAL = 1000; |
||||
|
||||
/** |
||||
* pstree, get pud and sub pid |
||||
*/ |
||||
public static final String PSTREE = "pstree"; |
||||
|
||||
public static final String RWXR_XR_X = "rwxr-xr-x"; |
||||
|
||||
/** |
||||
* date format of yyyyMMddHHmmss |
||||
*/ |
||||
public static final String PARAMETER_FORMAT_TIME = "yyyyMMddHHmmss"; |
||||
|
||||
/** |
||||
* new |
||||
* schedule time |
||||
*/ |
||||
public static final String PARAMETER_SHECDULE_TIME = "schedule.time"; |
||||
|
||||
/** |
||||
* system date(yyyyMMddHHmmss) |
||||
*/ |
||||
public static final String PARAMETER_DATETIME = DateConstants.PARAMETER_DATETIME; |
||||
|
||||
/** |
||||
* system date(yyyymmdd) today |
||||
*/ |
||||
public static final String PARAMETER_CURRENT_DATE = DateConstants.PARAMETER_CURRENT_DATE; |
||||
|
||||
/** |
||||
* system date(yyyymmdd) yesterday |
||||
*/ |
||||
public static final String PARAMETER_BUSINESS_DATE = DateConstants.PARAMETER_BUSINESS_DATE; |
||||
|
||||
/** |
||||
* the absolute path of current executing task |
||||
*/ |
||||
public static final String PARAMETER_TASK_EXECUTE_PATH = "system.task.execute.path"; |
||||
|
||||
/** |
||||
* the instance id of current task |
||||
*/ |
||||
public static final String PARAMETER_TASK_INSTANCE_ID = "system.task.instance.id"; |
||||
|
||||
/** |
||||
* the definition code of current task |
||||
*/ |
||||
public static final String PARAMETER_TASK_DEFINITION_CODE = "system.task.definition.code"; |
||||
|
||||
/** |
||||
* the definition name of current task |
||||
*/ |
||||
public static final String PARAMETER_TASK_DEFINITION_NAME = "system.task.definition.name"; |
||||
|
||||
/** |
||||
* the instance id of the workflow to which current task belongs |
||||
*/ |
||||
public static final String PARAMETER_WORKFLOW_INSTANCE_ID = "system.workflow.instance.id"; |
||||
|
||||
/** |
||||
* the definition code of the workflow to which current task belongs |
||||
*/ |
||||
public static final String PARAMETER_WORKFLOW_DEFINITION_CODE = "system.workflow.definition.code"; |
||||
|
||||
/** |
||||
* the definition name of the workflow to which current task belongs |
||||
*/ |
||||
public static final String PARAMETER_WORKFLOW_DEFINITION_NAME = "system.workflow.definition.name"; |
||||
|
||||
/** |
||||
* the code of the project to which current task belongs |
||||
*/ |
||||
public static final String PARAMETER_PROJECT_CODE = "system.project.code"; |
||||
|
||||
/** |
||||
* the name of the project to which current task belongs |
||||
*/ |
||||
public static final String PARAMETER_PROJECT_NAME = "system.project.name"; |
||||
/** |
||||
* month_begin |
||||
*/ |
||||
public static final String MONTH_BEGIN = "month_begin"; |
||||
/** |
||||
* add_months |
||||
*/ |
||||
public static final String ADD_MONTHS = "add_months"; |
||||
/** |
||||
* month_end |
||||
*/ |
||||
public static final String MONTH_END = "month_end"; |
||||
/** |
||||
* week_begin |
||||
*/ |
||||
public static final String WEEK_BEGIN = "week_begin"; |
||||
/** |
||||
* week_end |
||||
*/ |
||||
public static final String WEEK_END = "week_end"; |
||||
/** |
||||
* this_day |
||||
*/ |
||||
public static final String THIS_DAY = "this_day"; |
||||
/** |
||||
* last_day |
||||
*/ |
||||
public static final String LAST_DAY = "last_day"; |
||||
|
||||
/** |
||||
* month_first_day |
||||
*/ |
||||
public static final String MONTH_FIRST_DAY = "month_first_day"; |
||||
|
||||
/** |
||||
* month_last_day |
||||
*/ |
||||
public static final String MONTH_LAST_DAY = "month_last_day"; |
||||
|
||||
/** |
||||
* week_first_day |
||||
*/ |
||||
public static final String WEEK_FIRST_DAY = "week_first_day"; |
||||
|
||||
/** |
||||
* week_last_day |
||||
*/ |
||||
public static final String WEEK_LAST_DAY = "week_last_day"; |
||||
|
||||
/** |
||||
* year_week |
||||
*/ |
||||
public static final String YEAR_WEEK = "year_week"; |
||||
/** |
||||
* timestamp |
||||
*/ |
||||
public static final String TIMESTAMP = "timestamp"; |
||||
public static final char SUBTRACT_CHAR = '-'; |
||||
public static final char ADD_CHAR = '+'; |
||||
public static final char MULTIPLY_CHAR = '*'; |
||||
public static final char DIVISION_CHAR = '/'; |
||||
public static final char LEFT_BRACE_CHAR = '('; |
||||
public static final char RIGHT_BRACE_CHAR = ')'; |
||||
public static final String ADD_STRING = "+"; |
||||
public static final String MULTIPLY_STRING = "*"; |
||||
public static final String DIVISION_STRING = "/"; |
||||
public static final String LEFT_BRACE_STRING = "("; |
||||
public static final char P = 'P'; |
||||
public static final char N = 'N'; |
||||
public static final String SUBTRACT_STRING = "-"; |
||||
public static final String LOCAL_PARAMS_LIST = "localParamsList"; |
||||
public static final String TASK_TYPE = "taskType"; |
||||
public static final String QUEUE = "queue"; |
||||
/** |
||||
* default display rows |
||||
*/ |
||||
public static final int DEFAULT_DISPLAY_ROWS = 10; |
||||
|
||||
/** |
||||
* jar |
||||
*/ |
||||
public static final String JAR = "jar"; |
||||
|
||||
/** |
||||
* hadoop |
||||
*/ |
||||
public static final String HADOOP = "hadoop"; |
||||
|
||||
/** |
||||
* -D <property>=<value> |
||||
*/ |
||||
public static final String D = "-D"; |
||||
|
||||
/** |
||||
* datasource encryption salt |
||||
*/ |
||||
public static final String DATASOURCE_ENCRYPTION_SALT_DEFAULT = "!@#$%^&*"; |
||||
public static final String DATASOURCE_ENCRYPTION_ENABLE = "datasource.encryption.enable"; |
||||
public static final String DATASOURCE_ENCRYPTION_SALT = "datasource.encryption.salt"; |
||||
|
||||
/** |
||||
* kerberos |
||||
*/ |
||||
public static final String KERBEROS = "kerberos"; |
||||
|
||||
/** |
||||
* kerberos expire time |
||||
*/ |
||||
public static final String KERBEROS_EXPIRE_TIME = "kerberos.expire.time"; |
||||
|
||||
/** |
||||
* java.security.krb5.conf |
||||
*/ |
||||
public static final String JAVA_SECURITY_KRB5_CONF = "java.security.krb5.conf"; |
||||
|
||||
/** |
||||
* java.security.krb5.conf.path |
||||
*/ |
||||
public static final String JAVA_SECURITY_KRB5_CONF_PATH = "java.security.krb5.conf.path"; |
||||
|
||||
/** |
||||
* loginUserFromKeytab user |
||||
*/ |
||||
public static final String LOGIN_USER_KEY_TAB_USERNAME = "login.user.keytab.username"; |
||||
|
||||
/** |
||||
* loginUserFromKeytab path |
||||
*/ |
||||
public static final String LOGIN_USER_KEY_TAB_PATH = "login.user.keytab.path"; |
||||
|
||||
/** |
||||
* hadoop.security.authentication |
||||
*/ |
||||
public static final String HADOOP_SECURITY_AUTHENTICATION = "hadoop.security.authentication"; |
||||
|
||||
/** |
||||
* hadoop.security.authentication |
||||
*/ |
||||
public static final String HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE = |
||||
"hadoop.security.authentication.startup.state"; |
||||
|
||||
/** |
||||
* hdfs/s3 configuration |
||||
* resource.storage.upload.base.path |
||||
*/ |
||||
public static final String RESOURCE_UPLOAD_PATH = "resource.storage.upload.base.path"; |
||||
|
||||
/** |
||||
* data.quality.jar.dir |
||||
*/ |
||||
public static final String DATA_QUALITY_JAR_DIR = "data-quality.jar.dir"; |
||||
|
||||
public static final String TASK_TYPE_DATA_QUALITY = "DATA_QUALITY"; |
||||
|
||||
public static final Set<String> TASK_TYPE_SET_K8S = Sets.newHashSet("K8S", "KUBEFLOW"); |
||||
|
||||
/** |
||||
* azure config |
||||
*/ |
||||
public static final String AZURE_CLIENT_ID = "resource.azure.client.id"; |
||||
public static final String AZURE_CLIENT_SECRET = "resource.azure.client.secret"; |
||||
public static final String AZURE_ACCESS_SUB_ID = "resource.azure.subId"; |
||||
public static final String AZURE_SECRET_TENANT_ID = "resource.azure.tenant.id"; |
||||
public static final String QUERY_INTERVAL = "resource.query.interval"; |
||||
|
||||
/** |
||||
* use for k8s task |
||||
*/ |
||||
public static final String API_VERSION = "batch/v1"; |
||||
public static final String RESTART_POLICY = "Never"; |
||||
public static final String MEMORY = "memory"; |
||||
public static final String CPU = "cpu"; |
||||
public static final String LAYER_LABEL = "k8s.cn/layer"; |
||||
public static final String LAYER_LABEL_VALUE = "batch"; |
||||
public static final String NAME_LABEL = "k8s.cn/name"; |
||||
public static final String TASK_INSTANCE_ID = "taskInstanceId"; |
||||
public static final String MI = "Mi"; |
||||
public static final int JOB_TTL_SECONDS = 300; |
||||
public static final int LOG_LINES = 500; |
||||
public static final String NAMESPACE_NAME = "name"; |
||||
public static final String CLUSTER = "cluster"; |
||||
|
||||
/** |
||||
* spark / flink on k8s label name |
||||
*/ |
||||
public static final String UNIQUE_LABEL_NAME = "dolphinscheduler-label"; |
||||
|
||||
/** |
||||
* conda config used by jupyter task plugin |
||||
*/ |
||||
public static final String CONDA_PATH = "conda.path"; |
||||
|
||||
// Loop task constants
|
||||
public static final Duration DEFAULT_LOOP_STATUS_INTERVAL = Duration.ofSeconds(5L); |
||||
|
||||
/** |
||||
* sql params regex |
||||
*/ |
||||
public static final String GROUP_NAME1 = "paramName1"; |
||||
public static final String GROUP_NAME2 = "paramName2"; |
||||
public static final String SQL_PARAMS_REGEX = |
||||
String.format("['\"]\\$\\{(?<%s>.*?)}['\"]|\\$\\{(?<%s>.*?)}", GROUP_NAME1, GROUP_NAME2); |
||||
public static final Pattern SQL_PARAMS_PATTERN = Pattern.compile(SQL_PARAMS_REGEX); |
||||
|
||||
public static final String AZURE_SQL_DATABASE_SPN = "https://database.windows.net/"; |
||||
public static final String AZURE_SQL_DATABASE_TOKEN_SCOPE = "/.default"; |
||||
|
||||
} |
@ -1,202 +0,0 @@
|
||||
|
||||
Apache License |
||||
Version 2.0, January 2004 |
||||
http://www.apache.org/licenses/ |
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
||||
|
||||
1. Definitions. |
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction, |
||||
and distribution as defined by Sections 1 through 9 of this document. |
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by |
||||
the copyright owner that is granting the License. |
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all |
||||
other entities that control, are controlled by, or are under common |
||||
control with that entity. For the purposes of this definition, |
||||
"control" means (i) the power, direct or indirect, to cause the |
||||
direction or management of such entity, whether by contract or |
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the |
||||
outstanding shares, or (iii) beneficial ownership of such entity. |
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity |
||||
exercising permissions granted by this License. |
||||
|
||||
"Source" form shall mean the preferred form for making modifications, |
||||
including but not limited to software source code, documentation |
||||
source, and configuration files. |
||||
|
||||
"Object" form shall mean any form resulting from mechanical |
||||
transformation or translation of a Source form, including but |
||||
not limited to compiled object code, generated documentation, |
||||
and conversions to other media types. |
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or |
||||
Object form, made available under the License, as indicated by a |
||||
copyright notice that is included in or attached to the work |
||||
(an example is provided in the Appendix below). |
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object |
||||
form, that is based on (or derived from) the Work and for which the |
||||
editorial revisions, annotations, elaborations, or other modifications |
||||
represent, as a whole, an original work of authorship. For the purposes |
||||
of this License, Derivative Works shall not include works that remain |
||||
separable from, or merely link (or bind by name) to the interfaces of, |
||||
the Work and Derivative Works thereof. |
||||
|
||||
"Contribution" shall mean any work of authorship, including |
||||
the original version of the Work and any modifications or additions |
||||
to that Work or Derivative Works thereof, that is intentionally |
||||
submitted to Licensor for inclusion in the Work by the copyright owner |
||||
or by an individual or Legal Entity authorized to submit on behalf of |
||||
the copyright owner. For the purposes of this definition, "submitted" |
||||
means any form of electronic, verbal, or written communication sent |
||||
to the Licensor or its representatives, including but not limited to |
||||
communication on electronic mailing lists, source code control systems, |
||||
and issue tracking systems that are managed by, or on behalf of, the |
||||
Licensor for the purpose of discussing and improving the Work, but |
||||
excluding communication that is conspicuously marked or otherwise |
||||
designated in writing by the copyright owner as "Not a Contribution." |
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity |
||||
on behalf of whom a Contribution has been received by Licensor and |
||||
subsequently incorporated within the Work. |
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of |
||||
this License, each Contributor hereby grants to You a perpetual, |
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
copyright license to reproduce, prepare Derivative Works of, |
||||
publicly display, publicly perform, sublicense, and distribute the |
||||
Work and such Derivative Works in Source or Object form. |
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of |
||||
this License, each Contributor hereby grants to You a perpetual, |
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable |
||||
(except as stated in this section) patent license to make, have made, |
||||
use, offer to sell, sell, import, and otherwise transfer the Work, |
||||
where such license applies only to those patent claims licensable |
||||
by such Contributor that are necessarily infringed by their |
||||
Contribution(s) alone or by combination of their Contribution(s) |
||||
with the Work to which such Contribution(s) was submitted. If You |
||||
institute patent litigation against any entity (including a |
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work |
||||
or a Contribution incorporated within the Work constitutes direct |
||||
or contributory patent infringement, then any patent licenses |
||||
granted to You under this License for that Work shall terminate |
||||
as of the date such litigation is filed. |
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the |
||||
Work or Derivative Works thereof in any medium, with or without |
||||
modifications, and in Source or Object form, provided that You |
||||
meet the following conditions: |
||||
|
||||
(a) You must give any other recipients of the Work or |
||||
Derivative Works a copy of this License; and |
||||
|
||||
(b) You must cause any modified files to carry prominent notices |
||||
stating that You changed the files; and |
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works |
||||
that You distribute, all copyright, patent, trademark, and |
||||
attribution notices from the Source form of the Work, |
||||
excluding those notices that do not pertain to any part of |
||||
the Derivative Works; and |
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its |
||||
distribution, then any Derivative Works that You distribute must |
||||
include a readable copy of the attribution notices contained |
||||
within such NOTICE file, excluding those notices that do not |
||||
pertain to any part of the Derivative Works, in at least one |
||||
of the following places: within a NOTICE text file distributed |
||||
as part of the Derivative Works; within the Source form or |
||||
documentation, if provided along with the Derivative Works; or, |
||||
within a display generated by the Derivative Works, if and |
||||
wherever such third-party notices normally appear. The contents |
||||
of the NOTICE file are for informational purposes only and |
||||
do not modify the License. You may add Your own attribution |
||||
notices within Derivative Works that You distribute, alongside |
||||
or as an addendum to the NOTICE text from the Work, provided |
||||
that such additional attribution notices cannot be construed |
||||
as modifying the License. |
||||
|
||||
You may add Your own copyright statement to Your modifications and |
||||
may provide additional or different license terms and conditions |
||||
for use, reproduction, or distribution of Your modifications, or |
||||
for any such Derivative Works as a whole, provided Your use, |
||||
reproduction, and distribution of the Work otherwise complies with |
||||
the conditions stated in this License. |
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise, |
||||
any Contribution intentionally submitted for inclusion in the Work |
||||
by You to the Licensor shall be under the terms and conditions of |
||||
this License, without any additional terms or conditions. |
||||
Notwithstanding the above, nothing herein shall supersede or modify |
||||
the terms of any separate license agreement you may have executed |
||||
with Licensor regarding such Contributions. |
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade |
||||
names, trademarks, service marks, or product names of the Licensor, |
||||
except as required for reasonable and customary use in describing the |
||||
origin of the Work and reproducing the content of the NOTICE file. |
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or |
||||
agreed to in writing, Licensor provides the Work (and each |
||||
Contributor provides its Contributions) on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
||||
implied, including, without limitation, any warranties or conditions |
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A |
||||
PARTICULAR PURPOSE. You are solely responsible for determining the |
||||
appropriateness of using or redistributing the Work and assume any |
||||
risks associated with Your exercise of permissions under this License. |
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory, |
||||
whether in tort (including negligence), contract, or otherwise, |
||||
unless required by applicable law (such as deliberate and grossly |
||||
negligent acts) or agreed to in writing, shall any Contributor be |
||||
liable to You for damages, including any direct, indirect, special, |
||||
incidental, or consequential damages of any character arising as a |
||||
result of this License or out of the use or inability to use the |
||||
Work (including but not limited to damages for loss of goodwill, |
||||
work stoppage, computer failure or malfunction, or any and all |
||||
other commercial damages or losses), even if such Contributor |
||||
has been advised of the possibility of such damages. |
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing |
||||
the Work or Derivative Works thereof, You may choose to offer, |
||||
and charge a fee for, acceptance of support, warranty, indemnity, |
||||
or other liability obligations and/or rights consistent with this |
||||
License. However, in accepting such obligations, You may act only |
||||
on Your own behalf and on Your sole responsibility, not on behalf |
||||
of any other Contributor, and only if You agree to indemnify, |
||||
defend, and hold each Contributor harmless for any liability |
||||
incurred by, or claims asserted against, such Contributor by reason |
||||
of your accepting any such warranty or additional liability. |
||||
|
||||
END OF TERMS AND CONDITIONS |
||||
|
||||
APPENDIX: How to apply the Apache License to your work. |
||||
|
||||
To apply the Apache License to your work, attach the following |
||||
boilerplate notice, with the fields enclosed by brackets "[]" |
||||
replaced with your own identifying information. (Don't include |
||||
the brackets!) The text should be enclosed in the appropriate |
||||
comment syntax for the file format. We also recommend that a |
||||
file or class name and description of purpose be included on the |
||||
same "printed page" as the copyright notice for easier |
||||
identification within third-party archives. |
||||
|
||||
Copyright 2017 Jayway |
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
you may not use this file except in compliance with the License. |
||||
You may obtain a copy of the License at |
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0 |
||||
|
||||
Unless required by applicable law or agreed to in writing, software |
||||
distributed under the License is distributed on an "AS IS" BASIS, |
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
See the License for the specific language governing permissions and |
||||
limitations under the License. |
@ -0,0 +1,75 @@
|
||||
#!/bin/bash |
||||
# |
||||
# Licensed to the Apache Software Foundation (ASF) under one or more |
||||
# contributor license agreements. See the NOTICE file distributed with |
||||
# this work for additional information regarding copyright ownership. |
||||
# The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
# (the "License"); you may not use this file except in compliance with |
||||
# the License. You may obtain a copy of the License at |
||||
# |
||||
# http://www.apache.org/licenses/LICENSE-2.0 |
||||
# |
||||
# Unless required by applicable law or agreed to in writing, software |
||||
# distributed under the License is distributed on an "AS IS" BASIS, |
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
# See the License for the specific language governing permissions and |
||||
# limitations under the License. |
||||
# |
||||
set -xeo pipefail |
||||
|
||||
DIST_DIR="$(pwd)/target" |
||||
BIN_TAR_FILE="$DIST_DIR/apache-dolphinscheduler-*-bin.tar.gz" |
||||
if [ ! -f $BIN_TAR_FILE ]; then |
||||
echo "$BIN_TAR_FILE not found!!!" |
||||
exit 1 |
||||
fi |
||||
|
||||
cd $DIST_DIR && tar -zxf apache-dolphinscheduler-*-bin.tar.gz |
||||
cd $DIST_DIR/apache-dolphinscheduler-*-bin |
||||
BIN_DIR=$(pwd) |
||||
|
||||
# move *-plugins/target/*-plugin/target/*.jar to *-plugins/ |
||||
PLUGINS_PATH=( |
||||
alert-plugins |
||||
datasource-plugins |
||||
storage-plugins |
||||
task-plugins |
||||
) |
||||
|
||||
for plugin_path in ${PLUGINS_PATH[@]} |
||||
do |
||||
cd $BIN_DIR/plugins/$plugin_path |
||||
find ./* -name "*.jar" | xargs -I {} mv {} ./ |
||||
ls -d */ | xargs -I {} rm -rf {} |
||||
done |
||||
|
||||
# move *-server/libs/*.jar to libs/ and create symbolic link in *-server/libs/ |
||||
MODULES_PATH=( |
||||
api-server |
||||
master-server |
||||
worker-server |
||||
alert-server |
||||
tools |
||||
) |
||||
|
||||
SHARED_LIB_DIR="$BIN_DIR/libs" |
||||
mkdir -p $SHARED_LIB_DIR |
||||
|
||||
for module in ${MODULES_PATH[@]} |
||||
do |
||||
MODULE_LIB_DIR="$BIN_DIR/$module/libs" |
||||
cd $MODULE_LIB_DIR |
||||
for jar in $(find $MODULE_LIB_DIR/* -name "*.jar" -execdir echo {} ';'); do |
||||
# move jar file to share lib directory |
||||
mv $MODULE_LIB_DIR/$jar $SHARED_LIB_DIR/$jar |
||||
|
||||
# create a symbolic link in the subproject's lib directory |
||||
ln -s ../../libs/$jar $jar |
||||
done |
||||
done |
||||
|
||||
# repack bin tar |
||||
BIN_TAR_FILE_NAME=$(basename $BIN_TAR_FILE) |
||||
cd $DIST_DIR && tar -zcf $BIN_TAR_FILE_NAME apache-dolphinscheduler-*-bin |
||||
|
||||
echo "assembly-plugins.sh done" |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue