status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
233
body
stringlengths
0
186k
issue_url
stringlengths
38
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
unknown
language
stringclasses
5 values
commit_datetime
unknown
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String ENV_PATH = "env/dolphinscheduler_env.sh"; /** * python home */ public static final String PYTHON_HOME = "PYTHON_HOME"; /** * resource.view.suffixs */ public static final String RESOURCE_VIEW_SUFFIXS = "resource.view.suffixs"; public static final String RESOURCE_VIEW_SUFFIXS_DEFAULT_VALUE = "txt,log,sh,bat,conf,cfg,py,java,sql,xml,hql,properties,json,yml,yaml,ini,js"; /** * development.state */ public static final String DEVELOPMENT_STATE = "development.state"; public static final String DEVELOPMENT_STATE_DEFAULT_VALUE = "true"; /** * string true */ public static final String STRING_TRUE = "true"; /** * string false */ public static final String STRING_FALSE = "false"; /** * resource storage type */ public static final String RESOURCE_STORAGE_TYPE = "resource.storage.type"; /** * MasterServer directory registered in zookeeper */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String ZOOKEEPER_DOLPHINSCHEDULER_MASTERS = "/nodes/master"; /** * WorkerServer directory registered in zookeeper */ public static final String ZOOKEEPER_DOLPHINSCHEDULER_WORKERS = "/nodes/worker"; /** * all servers directory registered in zookeeper */ public static final String ZOOKEEPER_DOLPHINSCHEDULER_DEAD_SERVERS = "/dead-servers"; /** * MasterServer lock directory registered in zookeeper */ public static final String ZOOKEEPER_DOLPHINSCHEDULER_LOCK_MASTERS = "/lock/masters"; /** * MasterServer failover directory registered in zookeeper */ public static final String ZOOKEEPER_DOLPHINSCHEDULER_LOCK_FAILOVER_MASTERS = "/lock/failover/masters"; /** * WorkerServer failover directory registered in zookeeper */ public static final String ZOOKEEPER_DOLPHINSCHEDULER_LOCK_FAILOVER_WORKERS = "/lock/failover/workers"; /** * MasterServer startup failover runing and fault tolerance process */ public static final String ZOOKEEPER_DOLPHINSCHEDULER_LOCK_FAILOVER_STARTUP_MASTERS = "/lock/failover/startup-masters"; /** * comma , */ public static final String COMMA = ","; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* 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 ; */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String SEMICOLON = ";"; /** * EQUAL SIGN */ public static final String EQUAL_SIGN = "="; /** * AT SIGN */ public static final String AT_SIGN = "@"; public static final String WORKER_MAX_CPULOAD_AVG = "worker.max.cpuload.avg"; public static final String WORKER_RESERVED_MEMORY = "worker.reserved.memory"; public static final String MASTER_MAX_CPULOAD_AVG = "master.max.cpuload.avg"; public static final String MASTER_RESERVED_MEMORY = "master.reserved.memory"; /** * date format of yyyy-MM-dd HH:mm:ss */ public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; /** * date format of yyyyMMddHHmmss */ public static final String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; /** * date format of yyyyMMddHHmmssSSS */ public static final String YYYYMMDDHHMMSSSSS = "yyyyMMddHHmmssSSS"; /** * http connect time out */ public static final int HTTP_CONNECT_TIMEOUT = 60 * 1000; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* http connect request time out */ public static final int HTTP_CONNECTION_REQUEST_TIMEOUT = 60 * 1000; /** * httpclient soceket time out */ public static final int SOCKET_TIMEOUT = 60 * 1000; /** * http header */ public static final String HTTP_HEADER_UNKNOWN = "unKnown"; /** * http X-Forwarded-For */ public static final String HTTP_X_FORWARDED_FOR = "X-Forwarded-For"; /** * http X-Real-IP */ public static final String HTTP_X_REAL_IP = "X-Real-IP"; /** * UTF-8 */ public static final String UTF_8 = "UTF-8"; /** * user name regex */ public static final Pattern REGEX_USER_NAME = Pattern.compile("^[a-zA-Z0-9._-]{3,39}$"); /** * email regex */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final Pattern REGEX_MAIL_NAME = Pattern.compile("^([a-z0-9A-Z]+[_|\\-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$"); /** * default display rows */ public static final int DEFAULT_DISPLAY_ROWS = 10; /** * read permission */ public static final int READ_PERMISSION = 2 * 1; /** * write permission */ public static final int WRITE_PERMISSION = 2 * 2; /** * execute permission */ public static final int EXECUTE_PERMISSION = 1; /** * default admin permission */ public static final int DEFAULT_ADMIN_PERMISSION = 7; /** * all permissions */ public static final int ALL_PERMISSIONS = READ_PERMISSION | WRITE_PERMISSION | EXECUTE_PERMISSION; /** * max task timeout */ public static final int MAX_TASK_TIMEOUT = 24 * 3600; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* master cpu load */ public static final int DEFAULT_MASTER_CPU_LOAD = Runtime.getRuntime().availableProcessors() * 2; /** * master reserved memory */ public static final double DEFAULT_MASTER_RESERVED_MEMORY = OSUtils.totalMemorySize() / 10; /** * worker cpu load */ public static final int DEFAULT_WORKER_CPU_LOAD = Runtime.getRuntime().availableProcessors() * 2; /** * worker reserved memory */ public static final double DEFAULT_WORKER_RESERVED_MEMORY = OSUtils.totalMemorySize() / 10; /** * worker host weight */ public static final int DEFAULT_WORKER_HOST_WEIGHT = 100; /** * default log cache rows num,output when reach the number */ public static final int DEFAULT_LOG_ROWS_NUM = 4 * 16; /** * log flush interval?output when reach the interval */ public static final int DEFAULT_LOG_FLUSH_INTERVAL = 1000; /** * time unit secong to minutes */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final int SEC_2_MINUTES_TIME_UNIT = 60; /*** * * rpc port */ public static final int RPC_PORT = 50051; /*** * alert rpc port */ public static final int ALERT_RPC_PORT = 50052; /** * forbid running task */ public static final String FLOWNODE_RUN_FLAG_FORBIDDEN = "FORBIDDEN"; /** * datasource configuration path */ public static final String DATASOURCE_PROPERTIES = "/datasource.properties"; public static final String TASK_RECORD_URL = "task.record.datasource.url"; public static final String TASK_RECORD_FLAG = "task.record.flag"; public static final String TASK_RECORD_USER = "task.record.datasource.username"; public static final String TASK_RECORD_PWD = "task.record.datasource.password"; public static final String DEFAULT = "Default"; public static final String USER = "user"; public static final String PASSWORD = "password"; public static final String XXXXXX = "******"; public static final String NULL = "NULL"; public static final String THREAD_NAME_MASTER_SERVER = "Master-Server"; public static final String THREAD_NAME_WORKER_SERVER = "Worker-Server"; public static final String TASK_RECORD_TABLE_HIVE_LOG = "eamp_hive_log_hd";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String TASK_RECORD_TABLE_HISTORY_HIVE_LOG = "eamp_hive_hist_log_hd"; /** * command parameter keys */ public static final String CMD_PARAM_RECOVER_PROCESS_ID_STRING = "ProcessInstanceId"; public static final String CMD_PARAM_RECOVERY_START_NODE_STRING = "StartNodeIdList"; public static final String CMD_PARAM_RECOVERY_WAITING_THREAD = "WaitingThreadInstanceId"; public static final String CMD_PARAM_SUB_PROCESS = "processInstanceId"; public static final String CMD_PARAM_EMPTY_SUB_PROCESS = "0"; public static final String CMD_PARAM_SUB_PROCESS_PARENT_INSTANCE_ID = "parentProcessInstanceId"; public static final String CMD_PARAM_SUB_PROCESS_DEFINE_ID = "processDefinitionId"; public static final String CMD_PARAM_START_NODE_NAMES = "StartNodeNameList"; public static final String CMD_PARAM_START_PARAMS = "StartParams"; public static final String CMD_PARAM_FATHER_PARAMS = "fatherParams"; /** * complement data start date */ public static final String CMDPARAM_COMPLEMENT_DATA_START_DATE = "complementStartDate"; /** * complement data end date */ public static final String CMDPARAM_COMPLEMENT_DATA_END_DATE = "complementEndDate"; /** * hadoop configuration */ public static final String HADOOP_RM_STATE_ACTIVE = "ACTIVE"; public static final String HADOOP_RM_STATE_STANDBY = "STANDBY"; public static final String HADOOP_RESOURCE_MANAGER_HTTPADDRESS_PORT = "resource.manager.httpaddress.port"; /** * data source config
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
*/ public static final String SPRING_DATASOURCE_DRIVER_CLASS_NAME = "spring.datasource.driver-class-name"; public static final String SPRING_DATASOURCE_URL = "spring.datasource.url"; public static final String SPRING_DATASOURCE_USERNAME = "spring.datasource.username"; public static final String SPRING_DATASOURCE_PASSWORD = "spring.datasource.password"; public static final String SPRING_DATASOURCE_VALIDATION_QUERY_TIMEOUT = "spring.datasource.validationQueryTimeout"; public static final String SPRING_DATASOURCE_INITIAL_SIZE = "spring.datasource.initialSize"; 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 SPRING_DATASOURCE_MAX_WAIT = "spring.datasource.maxWait"; public static final String SPRING_DATASOURCE_TIME_BETWEEN_EVICTION_RUNS_MILLIS = "spring.datasource.timeBetweenEvictionRunsMillis"; public static final String SPRING_DATASOURCE_TIME_BETWEEN_CONNECT_ERROR_MILLIS = "spring.datasource.timeBetweenConnectErrorMillis"; public static final String SPRING_DATASOURCE_MIN_EVICTABLE_IDLE_TIME_MILLIS = "spring.datasource.minEvictableIdleTimeMillis"; public static final String SPRING_DATASOURCE_VALIDATION_QUERY = "spring.datasource.validationQuery"; public static final String SPRING_DATASOURCE_TEST_WHILE_IDLE = "spring.datasource.testWhileIdle"; public static final String SPRING_DATASOURCE_TEST_ON_BORROW = "spring.datasource.testOnBorrow"; public static final String SPRING_DATASOURCE_TEST_ON_RETURN = "spring.datasource.testOnReturn"; public static final String SPRING_DATASOURCE_POOL_PREPARED_STATEMENTS = "spring.datasource.poolPreparedStatements"; public static final String SPRING_DATASOURCE_DEFAULT_AUTO_COMMIT = "spring.datasource.defaultAutoCommit"; public static final String SPRING_DATASOURCE_KEEP_ALIVE = "spring.datasource.keepAlive"; public static final String SPRING_DATASOURCE_MAX_POOL_PREPARED_STATEMENT_PER_CONNECTION_SIZE = "spring.datasource.maxPoolPreparedStatementPerConnectionSize"; public static final String DEVELOPMENT = "development"; public static final String QUARTZ_PROPERTIES_PATH = "quartz.properties"; /** * sleep time */ public static final int SLEEP_TIME_MILLIS = 1000; /** * heartbeat for zk info length */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final int HEARTBEAT_FOR_ZOOKEEPER_INFO_LENGTH = 10; public static final int HEARTBEAT_WITH_WEIGHT_FOR_ZOOKEEPER_INFO_LENGTH = 11; /** * jar */ public static final String JAR = "jar"; /** * hadoop */ public static final String HADOOP = "hadoop"; /** * -D <property>=<value> */ public static final String D = "-D"; /** * -D mapreduce.job.name=name */ public static final String MR_NAME = "mapreduce.job.name"; /** * -D mapreduce.job.queuename=queuename */ public static final String MR_QUEUE = "mapreduce.job.queuename"; /** * spark params constant */ public static final String MASTER = "--master"; public static final String DEPLOY_MODE = "--deploy-mode"; /** * --class CLASS_NAME */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String MAIN_CLASS = "--class"; /** * --driver-cores NUM */ public static final String DRIVER_CORES = "--driver-cores"; /** * --driver-memory MEM */ public static final String DRIVER_MEMORY = "--driver-memory"; /** * --num-executors NUM */ public static final String NUM_EXECUTORS = "--num-executors"; /** * --executor-cores NUM */ public static final String EXECUTOR_CORES = "--executor-cores"; /** * --executor-memory MEM */ public static final String EXECUTOR_MEMORY = "--executor-memory"; /** * --name NAME */ public static final String SPARK_NAME = "--name"; /** * --queue QUEUE */ public static final String SPARK_QUEUE = "--queue"; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* exit code success */ public static final int EXIT_CODE_SUCCESS = 0; /** * exit code kill */ public static final int EXIT_CODE_KILL = 137; /** * exit code failure */ public static final int EXIT_CODE_FAILURE = -1; /** * date format of yyyyMMdd */ public static final String PARAMETER_FORMAT_DATE = "yyyyMMdd"; /** * date format of yyyyMMddHHmmss */ public static final String PARAMETER_FORMAT_TIME = "yyyyMMddHHmmss"; /** * system date(yyyyMMddHHmmss) */ public static final String PARAMETER_DATETIME = "system.datetime"; /** * system date(yyyymmdd) today */ public static final String PARAMETER_CURRENT_DATE = "system.biz.curdate"; /** * system date(yyyymmdd) yesterday */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String PARAMETER_BUSINESS_DATE = "system.biz.date"; /** * ACCEPTED */ public static final String ACCEPTED = "ACCEPTED"; /** * SUCCEEDED */ public static final String SUCCEEDED = "SUCCEEDED"; /** * NEW */ public static final String NEW = "NEW"; /** * NEW_SAVING */ public static final String NEW_SAVING = "NEW_SAVING"; /** * SUBMITTED */ public static final String SUBMITTED = "SUBMITTED"; /** * FAILED */ public static final String FAILED = "FAILED"; /** * KILLED */ public static final String KILLED = "KILLED"; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* RUNNING */ public static final String RUNNING = "RUNNING"; /** * underline "_" */ public static final String UNDERLINE = "_"; /** * quartz job prifix */ public static final String QUARTZ_JOB_PRIFIX = "job"; /** * quartz job group prifix */ public static final String QUARTZ_JOB_GROUP_PRIFIX = "jobgroup"; /** * projectId */ public static final String PROJECT_ID = "projectId"; /** * processId */ public static final String SCHEDULE_ID = "scheduleId"; /** * schedule */ public static final String SCHEDULE = "schedule"; /** * application regex */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String APPLICATION_REGEX = "application_\\d+_\\d+"; public static final String PID = OSUtils.isWindows() ? "handle" : "pid"; /** * 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"; /** * 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 = '/';
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
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 GLOBAL_PARAMS = "globalParams"; public static final String LOCAL_PARAMS = "localParams"; public static final String LOCAL_PARAMS_LIST = "localParamsList"; public static final String SUBPROCESS_INSTANCE_ID = "subProcessInstanceId"; public static final String PROCESS_INSTANCE_STATE = "processInstanceState"; public static final String PARENT_WORKFLOW_INSTANCE = "parentWorkflowInstance"; public static final String TASK_TYPE = "taskType"; public static final String TASK_LIST = "taskList"; public static final String RWXR_XR_X = "rwxr-xr-x"; public static final String QUEUE = "queue"; public static final String QUEUE_NAME = "queueName"; public static final int LOG_QUERY_SKIP_LINE_NUMBER = 0; public static final int LOG_QUERY_LIMIT = 4096; /** * master/worker server use for zk */ public static final String MASTER_TYPE = "master"; public static final String WORKER_TYPE = "worker"; public static final String DELETE_ZK_OP = "delete"; public static final String ADD_ZK_OP = "add"; public static final String ALIAS = "alias";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String CONTENT = "content"; public static final String DEPENDENT_SPLIT = ":||"; public static final String DEPENDENT_ALL = "ALL"; /** * preview schedule execute count */ public static final int PREVIEW_SCHEDULE_EXECUTE_COUNT = 5; /** * 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"; /** * hadoop.security.authentication */ public static final String HADOOP_SECURITY_AUTHENTICATION = "hadoop.security.authentication"; /** * hadoop.security.authentication */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE = "hadoop.security.authentication.startup.state"; /** * com.amazonaws.services.s3.enableV4 */ public static final String AWS_S3_V4 = "com.amazonaws.services.s3.enableV4"; /** * loginUserFromKeytab user */ public static final String LOGIN_USER_KEY_TAB_USERNAME = "login.user.keytab.username"; /** * default worker group id */ public static final int DEFAULT_WORKER_ID = -1; /** * loginUserFromKeytab path */ public static final String LOGIN_USER_KEY_TAB_PATH = "login.user.keytab.path"; /** * task log info format */ public static final String TASK_LOG_INFO_FORMAT = "TaskLogInfo-%s"; /** * hive conf */ public static final String HIVE_CONF = "hiveconf:"; /** * flink */ public static final String FLINK_YARN_CLUSTER = "yarn-cluster"; public static final String FLINK_RUN_MODE = "-m";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String FLINK_YARN_SLOT = "-ys"; public static final String FLINK_APP_NAME = "-ynm"; public static final String FLINK_QUEUE = "-yqu"; public static final String FLINK_TASK_MANAGE = "-yn"; public static final String FLINK_JOB_MANAGE_MEM = "-yjm"; public static final String FLINK_TASK_MANAGE_MEM = "-ytm"; public static final String FLINK_MAIN_CLASS = "-c"; public static final String FLINK_PARALLELISM = "-p"; public static final String FLINK_SHUTDOWN_ON_ATTACHED_EXIT = "-sae"; public static final int[] NOT_TERMINATED_STATES = new int[] { ExecutionStatus.SUBMITTED_SUCCESS.ordinal(), ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.DELAY_EXECUTION.ordinal(), ExecutionStatus.READY_PAUSE.ordinal(), ExecutionStatus.READY_STOP.ordinal(), ExecutionStatus.NEED_FAULT_TOLERANCE.ordinal(), ExecutionStatus.WAITTING_THREAD.ordinal(), ExecutionStatus.WAITTING_DEPEND.ordinal() }; /** * status */ public static final String STATUS = "status"; /** * message */ public static final String MSG = "msg"; /** * data total */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String COUNT = "count"; /** * page size */ public static final String PAGE_SIZE = "pageSize"; /** * current page no */ public static final String PAGE_NUMBER = "pageNo"; /** * */ public static final String DATA_LIST = "data"; public static final String TOTAL_LIST = "totalList"; public static final String CURRENT_PAGE = "currentPage"; public static final String TOTAL_PAGE = "totalPage"; public static final String TOTAL = "total"; /** * workflow */ public static final String WORKFLOW_LIST = "workFlowList"; public static final String WORKFLOW_RELATION_LIST = "workFlowRelationList"; /** * session user */ public static final String SESSION_USER = "session.user"; public static final String SESSION_ID = "sessionId"; public static final String PASSWORD_DEFAULT = "******"; /** * locale
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
*/ public static final String LOCALE_LANGUAGE = "language"; /** * driver */ public static final String ORG_POSTGRESQL_DRIVER = "org.postgresql.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 = "ru.yandex.clickhouse.ClickHouseDriver"; public static final String COM_ORACLE_JDBC_DRIVER = "oracle.jdbc.driver.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"; /** * database type */ public static final String MYSQL = "MYSQL"; public static final String POSTGRESQL = "POSTGRESQL"; public static final String HIVE = "HIVE"; public static final String SPARK = "SPARK"; public static final String CLICKHOUSE = "CLICKHOUSE"; public static final String ORACLE = "ORACLE"; public static final String SQLSERVER = "SQLSERVER"; public static final String DB2 = "DB2"; public static final String PRESTO = "PRESTO"; /** * jdbc url */ public static final String JDBC_MYSQL = "jdbc:mysql://"; public static final String JDBC_POSTGRESQL = "jdbc:postgresql://";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String JDBC_HIVE_2 = "jdbc:hive2://"; public static final String JDBC_CLICKHOUSE = "jdbc:clickhouse://"; 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 ADDRESS = "address"; public static final String DATABASE = "database"; public static final String JDBC_URL = "jdbcUrl"; public static final String PRINCIPAL = "principal"; public static final String OTHER = "other"; public static final String ORACLE_DB_CONNECT_TYPE = "connectType"; public static final String KERBEROS_KRB5_CONF_PATH = "javaSecurityKrb5Conf"; public static final String KERBEROS_KEY_TAB_USERNAME = "loginUserKeytabUsername"; public static final String KERBEROS_KEY_TAB_PATH = "loginUserKeytabPath"; /** * session timeout */ public static final int SESSION_TIME_OUT = 7200; public static final int MAX_FILE_SIZE = 1024 * 1024 * 1024; public static final String UDF = "UDF"; public static final String CLASS = "class"; public static final String RECEIVERS = "receivers"; public static final String RECEIVERS_CC = "receiversCc"; /** * dataSource sensitive param */ public static final String DATASOURCE_PASSWORD_REGEX = "(?<=(\"password\":\")).*?(?=(\"))"; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* default worker group */ public static final String DEFAULT_WORKER_GROUP = "default"; public static final Integer TASK_INFO_LENGTH = 5; /** * new * schedule time */ public static final String PARAMETER_SHECDULE_TIME = "schedule.time"; /** * authorize writable perm */ public static final int AUTHORIZE_WRITABLE_PERM = 7; /** * authorize readable perm */ public static final int AUTHORIZE_READABLE_PERM = 4; /** * plugin configurations */ public static final String PLUGIN_JAR_SUFFIX = ".jar"; public static final int NORMAL_NODE_STATUS = 0; public static final int ABNORMAL_NODE_STATUS = 1; public static final String START_TIME = "start time"; public static final String END_TIME = "end time"; public static final String START_END_DATE = "startDate,endDate"; /** * system line separator */ public static final String SYSTEM_LINE_SEPARATOR = System.getProperty("line.separator");
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
/** * net system properties */ public static final String DOLPHIN_SCHEDULER_PREFERRED_NETWORK_INTERFACE = "dolphin.scheduler.network.interface.preferred"; public static final String EXCEL_SUFFIX_XLS = ".xls"; /** * 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"; /** * Network IP gets priority, default inner outer */ public static final String NETWORK_PRIORITY_STRATEGY = "dolphin.scheduler.network.priority.strategy"; /** * exec shell scripts */ public static final String SH = "sh"; /** * pstree, get pud and sub pid */ public static final String PSTREE = "pstree"; /** * docker & kubernetes */ public static final boolean DOCKER_MODE = StringUtils.isNotEmpty(System.getenv("DOCKER")); public static final boolean KUBERNETES_MODE = StringUtils.isNotEmpty(System.getenv("KUBERNETES_SERVICE_HOST")) && StringUtils.isNotEmpty(System.getenv("KUBERNETES_SERVICE_PORT")); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/CommonUtils.java
/* * 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.common.utils; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.ResUploadType; import org.apache.commons.codec.binary.Base64; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.security.UserGroupInformation; import java.net.URL; import java.nio.charset.StandardCharsets; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * common utils */ public class CommonUtils {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/CommonUtils.java
private static final Logger logger = LoggerFactory.getLogger(CommonUtils.class); private static final Base64 BASE64 = new Base64(); private CommonUtils() { throw new UnsupportedOperationException("Construct CommonUtils"); } /** * @return get the path of system environment variables */ public static String getSystemEnvPath() { String envPath = PropertyUtils.getString(Constants.DOLPHINSCHEDULER_ENV_PATH); if (StringUtils.isEmpty(envPath)) { URL envDefaultPath = CommonUtils.class.getClassLoader().getResource(Constants.ENV_PATH); if (envDefaultPath != null) { envPath = envDefaultPath.getPath(); logger.debug("env path :{}", envPath);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/CommonUtils.java
} else { envPath = "/etc/profile"; } } return envPath; } /** * @return is develop mode */ public static boolean isDevelopMode() { return PropertyUtils.getBoolean(Constants.DEVELOPMENT_STATE, true); } /** * if upload resource is HDFS and kerberos startup is true , else false * * @return true if upload resource is HDFS and kerberos startup */ public static boolean getKerberosStartupState() { String resUploadStartupType = PropertyUtils.getUpperCaseString(Constants.RESOURCE_STORAGE_TYPE); ResUploadType resUploadType = ResUploadType.valueOf(resUploadStartupType); Boolean kerberosStartupState = PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false); return resUploadType == ResUploadType.HDFS && kerberosStartupState; } /** * load kerberos configuration * * @throws Exception errors */ public static void loadKerberosConf() throws Exception { loadKerberosConf(PropertyUtils.getString(Constants.JAVA_SECURITY_KRB5_CONF_PATH),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/CommonUtils.java
PropertyUtils.getString(Constants.LOGIN_USER_KEY_TAB_USERNAME), PropertyUtils.getString(Constants.LOGIN_USER_KEY_TAB_PATH)); } /** * load kerberos configuration * @param javaSecurityKrb5Conf javaSecurityKrb5Conf * @param loginUserKeytabUsername loginUserKeytabUsername * @param loginUserKeytabPath loginUserKeytabPath * @throws Exception errors */ public static void loadKerberosConf(String javaSecurityKrb5Conf, String loginUserKeytabUsername, String loginUserKeytabPath) throws Exception { if (CommonUtils.getKerberosStartupState()) { System.setProperty(Constants.JAVA_SECURITY_KRB5_CONF, StringUtils.defaultIfBlank(javaSecurityKrb5Conf, PropertyUtils.getString(Constants.JAVA_SECURITY_KRB5_CONF_PATH))); Configuration configuration = new Configuration(); configuration.set(Constants.HADOOP_SECURITY_AUTHENTICATION, Constants.KERBEROS); UserGroupInformation.setConfiguration(configuration); UserGroupInformation.loginUserFromKeytab(StringUtils.defaultIfBlank(loginUserKeytabUsername, PropertyUtils.getString(Constants.LOGIN_USER_KEY_TAB_USERNAME)), StringUtils.defaultIfBlank(loginUserKeytabPath, PropertyUtils.getString(Constants.LOGIN_USER_KEY_TAB_PATH))); } } /** * encode password */ public static String encodePassword(String password) { if (StringUtils.isEmpty(password)) { return StringUtils.EMPTY; } boolean encryptionEnable = PropertyUtils.getBoolean(Constants.DATASOURCE_ENCRYPTION_ENABLE, false); if (!encryptionEnable) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/CommonUtils.java
return password; } String salt = PropertyUtils.getString(Constants.DATASOURCE_ENCRYPTION_SALT, Constants.DATASOURCE_ENCRYPTION_SALT_DEFAULT); String passwordWithSalt = salt + new String(BASE64.encode(password.getBytes(StandardCharsets.UTF_8))); return new String(BASE64.encode(passwordWithSalt.getBytes(StandardCharsets.UTF_8))); } /** * decode password */ public static String decodePassword(String password) { if (StringUtils.isEmpty(password)) { return StringUtils.EMPTY; } boolean encryptionEnable = PropertyUtils.getBoolean(Constants.DATASOURCE_ENCRYPTION_ENABLE, false); if (!encryptionEnable) { return password; } String salt = PropertyUtils.getString(Constants.DATASOURCE_ENCRYPTION_SALT, Constants.DATASOURCE_ENCRYPTION_SALT_DEFAULT); String passwordWithSalt = new String(BASE64.decode(password), StandardCharsets.UTF_8); if (!passwordWithSalt.startsWith(salt)) { logger.warn("There is a password and salt mismatch: {} ", password); return password; } return new String(BASE64.decode(passwordWithSalt.substring(salt.length())), StandardCharsets.UTF_8); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
/* * 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. */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
package org.apache.dolphinscheduler.common.utils; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.shell.ShellExecutor; import org.apache.commons.configuration.Configuration; import java.lang.management.OperatingSystemMXBean; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.lang.management.ManagementFactory; import java.lang.management.RuntimeMXBean; import java.math.RoundingMode; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.StringTokenizer; import java.util.regex.Pattern; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import oshi.SystemInfo; import oshi.hardware.CentralProcessor; import oshi.hardware.GlobalMemory; import oshi.hardware.HardwareAbstractionLayer; /** * os utils */ public class OSUtils {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
private static final Logger logger = LoggerFactory.getLogger(OSUtils.class); public static final ThreadLocal<Logger> taskLoggerThreadLocal = new ThreadLocal<>(); private static final SystemInfo SI = new SystemInfo(); public static final String TWO_DECIMAL = "0.00"; /** * return -1 when the function can not get hardware env info * e.g {@link OSUtils#loadAverage()} {@link OSUtils#cpuUsage()} */ public static final double NEGATIVE_ONE = -1; private static HardwareAbstractionLayer hal = SI.getHardware(); private OSUtils() { throw new UnsupportedOperationException("Construct OSUtils"); } /** * Initialization regularization, solve the problem of pre-compilation performance, * avoid the thread safety problem of multi-thread operation */ private static final Pattern PATTERN = Pattern.compile("\\s+"); /** * get memory usage * Keep 2 decimal * * @return percent % */ public static double memoryUsage() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
GlobalMemory memory = hal.getMemory(); double memoryUsage = (memory.getTotal() - memory.getAvailable() - memory.getSwapUsed()) * 0.1 / memory.getTotal() * 10; DecimalFormat df = new DecimalFormat(TWO_DECIMAL); df.setRoundingMode(RoundingMode.HALF_UP); return Double.parseDouble(df.format(memoryUsage)); } /** * get available physical memory size * <p> * Keep 2 decimal * * @return available Physical Memory Size, unit: G */ public static double availablePhysicalMemorySize() { GlobalMemory memory = hal.getMemory(); double availablePhysicalMemorySize = (memory.getAvailable() + memory.getSwapUsed()) / 1024.0 / 1024 / 1024; DecimalFormat df = new DecimalFormat(TWO_DECIMAL); df.setRoundingMode(RoundingMode.HALF_UP); return Double.parseDouble(df.format(availablePhysicalMemorySize)); } /** * get total physical memory size * <p> * Keep 2 decimal * * @return available Physical Memory Size, unit: G */ public static double totalMemorySize() { GlobalMemory memory = hal.getMemory(); double availablePhysicalMemorySize = memory.getTotal() / 1024.0 / 1024 / 1024;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
DecimalFormat df = new DecimalFormat(TWO_DECIMAL); df.setRoundingMode(RoundingMode.HALF_UP); return Double.parseDouble(df.format(availablePhysicalMemorySize)); } /** * load average * * @return load average */ public static double loadAverage() { double loadAverage; try { OperatingSystemMXBean osBean = ManagementFactory.getPlatformMXBean(OperatingSystemMXBean.class); loadAverage = osBean.getSystemLoadAverage(); } catch (Exception e) { logger.error("get operation system load average exception, try another method ", e); loadAverage = hal.getProcessor().getSystemLoadAverage(); if (Double.isNaN(loadAverage)) { return NEGATIVE_ONE; } } DecimalFormat df = new DecimalFormat(TWO_DECIMAL); df.setRoundingMode(RoundingMode.HALF_UP); return Double.parseDouble(df.format(loadAverage)); } /** * get cpu usage * * @return cpu usage */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
public static double cpuUsage() { CentralProcessor processor = hal.getProcessor(); double cpuUsage = processor.getSystemCpuLoad(); if (Double.isNaN(cpuUsage)) { return NEGATIVE_ONE; } DecimalFormat df = new DecimalFormat(TWO_DECIMAL); df.setRoundingMode(RoundingMode.HALF_UP); return Double.parseDouble(df.format(cpuUsage)); } public static List<String> getUserList() { try { if (isMacOS()) { return getUserListFromMac(); } else if (isWindows()) { return getUserListFromWindows(); } else { return getUserListFromLinux(); } } catch (Exception e) { logger.error(e.getMessage(), e); } return Collections.emptyList(); } /** * get user list from linux * * @return user list */ private static List<String> getUserListFromLinux() throws IOException {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
List<String> userList = new ArrayList<>(); try (BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(new FileInputStream("/etc/passwd")))) { String line; while ((line = bufferedReader.readLine()) != null) { if (line.contains(":")) { String[] userInfo = line.split(":"); userList.add(userInfo[0]); } } } return userList; } /** * get user list from mac * * @return user list */ private static List<String> getUserListFromMac() throws IOException { String result = exeCmd("dscl . list /users"); if (StringUtils.isNotEmpty(result)) { return Arrays.asList(result.split("\n")); } return Collections.emptyList(); } /** * get user list from windows * * @return user list */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
private static List<String> getUserListFromWindows() throws IOException { String result = exeCmd("net user"); String[] lines = result.split("\n"); int startPos = 0; int endPos = lines.length - 2; for (int i = 0; i < lines.length; i++) { if (lines[i].isEmpty()) { continue; } int count = 0; if (lines[i].charAt(0) == '-') { for (int j = 0; j < lines[i].length(); j++) { if (lines[i].charAt(i) == '-') { count++; } } } if (count == lines[i].length()) { startPos = i + 1; break; } } List<String> users = new ArrayList<>(); while (startPos <= endPos) { users.addAll(Arrays.asList(PATTERN.split(lines[startPos]))); startPos++; } return users; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
* create user * * @param userName user name */ public static void createUserIfAbsent(String userName) { taskLoggerThreadLocal.set(taskLoggerThreadLocal.get()); if (!getUserList().contains(userName)) { boolean isSuccess = createUser(userName); String infoLog = String.format("create user %s %s", userName, isSuccess ? "success" : "fail"); LoggerUtils.logInfo(Optional.ofNullable(logger), infoLog); LoggerUtils.logInfo(Optional.ofNullable(taskLoggerThreadLocal.get()), infoLog); } taskLoggerThreadLocal.remove(); } /** * create user * * @param userName user name * @return true if creation was successful, otherwise false */ public static boolean createUser(String userName) { try { String userGroup = getGroup(); if (StringUtils.isEmpty(userGroup)) { String errorLog = String.format("%s group does not exist for this operating system.", userGroup); LoggerUtils.logError(Optional.ofNullable(logger), errorLog); LoggerUtils.logError(Optional.ofNullable(taskLoggerThreadLocal.get()), errorLog); return false; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
if (isMacOS()) { createMacUser(userName, userGroup); } else if (isWindows()) { createWindowsUser(userName, userGroup); } else { createLinuxUser(userName, userGroup); } return true; } catch (Exception e) { LoggerUtils.logError(Optional.ofNullable(logger), e); LoggerUtils.logError(Optional.ofNullable(taskLoggerThreadLocal.get()), e); } return false; } /** * create linux user * * @param userName user name * @param userGroup user group * @throws IOException in case of an I/O error */ private static void createLinuxUser(String userName, String userGroup) throws IOException { String infoLog1 = String.format("create linux os user : %s", userName); LoggerUtils.logInfo(Optional.ofNullable(logger), infoLog1); LoggerUtils.logInfo(Optional.ofNullable(taskLoggerThreadLocal.get()), infoLog1); String cmd = String.format("sudo useradd -g %s %s", userGroup, userName); String infoLog2 = String.format("execute cmd : %s", cmd); LoggerUtils.logInfo(Optional.ofNullable(logger), infoLog2); LoggerUtils.logInfo(Optional.ofNullable(taskLoggerThreadLocal.get()), infoLog2); exeCmd(cmd);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
} /** * create mac user (Supports Mac OSX 10.10+) * * @param userName user name * @param userGroup user group * @throws IOException in case of an I/O error */ private static void createMacUser(String userName, String userGroup) throws IOException { Optional<Logger> optionalLogger = Optional.ofNullable(logger); Optional<Logger> optionalTaskLogger = Optional.ofNullable(taskLoggerThreadLocal.get()); String infoLog1 = String.format("create mac os user : %s", userName); LoggerUtils.logInfo(optionalLogger, infoLog1); LoggerUtils.logInfo(optionalTaskLogger, infoLog1); String createUserCmd = String.format("sudo sysadminctl -addUser %s -password %s", userName, userName); String infoLog2 = String.format("create user command : %s", createUserCmd); LoggerUtils.logInfo(optionalLogger, infoLog2); LoggerUtils.logInfo(optionalTaskLogger, infoLog2); exeCmd(createUserCmd); String appendGroupCmd = String.format("sudo dseditgroup -o edit -a %s -t user %s", userName, userGroup); String infoLog3 = String.format("append user to group : %s", appendGroupCmd); LoggerUtils.logInfo(optionalLogger, infoLog3); LoggerUtils.logInfo(optionalTaskLogger, infoLog3); exeCmd(appendGroupCmd); } /** * create windows user * * @param userName user name * @param userGroup user group
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
* @throws IOException in case of an I/O error */ private static void createWindowsUser(String userName, String userGroup) throws IOException { String infoLog1 = String.format("create windows os user : %s", userName); LoggerUtils.logInfo(Optional.ofNullable(logger), infoLog1); LoggerUtils.logInfo(Optional.ofNullable(taskLoggerThreadLocal.get()), infoLog1); String userCreateCmd = String.format("net user \"%s\" /add", userName); String infoLog2 = String.format("execute create user command : %s", userCreateCmd); LoggerUtils.logInfo(Optional.ofNullable(logger), infoLog2); LoggerUtils.logInfo(Optional.ofNullable(taskLoggerThreadLocal.get()), infoLog2); exeCmd(userCreateCmd); String appendGroupCmd = String.format("net localgroup \"%s\" \"%s\" /add", userGroup, userName); String infoLog3 = String.format("execute append user to group : %s", appendGroupCmd); LoggerUtils.logInfo(Optional.ofNullable(logger), infoLog3); LoggerUtils.logInfo(Optional.ofNullable(taskLoggerThreadLocal.get()), infoLog3); exeCmd(appendGroupCmd); } /** * get system group information * * @return system group info * @throws IOException errors */ public static String getGroup() throws IOException { if (isWindows()) { String currentProcUserName = System.getProperty("user.name"); String result = exeCmd(String.format("net user \"%s\"", currentProcUserName)); String line = result.split("\n")[22]; String group = PATTERN.split(line)[1]; if (group.charAt(0) == '*') {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
return group.substring(1); } else { return group; } } else { String result = exeCmd("groups"); if (StringUtils.isNotEmpty(result)) { String[] groupInfo = result.split(" "); return groupInfo[0]; } } return null; } /** * get sudo command * @param tenantCode tenantCode * @param command command * @return result of sudo execute command */ public static String getSudoCmd(String tenantCode, String command) { return StringUtils.isEmpty(tenantCode) ? command : "sudo -u " + tenantCode + " " + command; } /** * Execute the corresponding command of Linux or Windows * * @param command command * @return result of execute command * @throws IOException errors */ public static String exeCmd(String command) throws IOException {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
StringTokenizer st = new StringTokenizer(command); String[] cmdArray = new String[st.countTokens()]; for (int i = 0; st.hasMoreTokens(); i++) { cmdArray[i] = st.nextToken(); } return exeShell(cmdArray); } /** * Execute the shell * * @param command command * @return result of execute the shell * @throws IOException errors */ public static String exeShell(String[] command) throws IOException { return ShellExecutor.execCommand(command); } /** * get process id * * @return process id */ public static int getProcessID() { RuntimeMXBean runtimeMXBean = ManagementFactory.getRuntimeMXBean(); return Integer.parseInt(runtimeMXBean.getName().split("@")[0]); } /** * whether is macOS * * @return true if mac
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
*/ public static boolean isMacOS() { return getOSName().startsWith("Mac"); } /** * whether is windows * * @return true if windows */ public static boolean isWindows() { return getOSName().startsWith("Windows"); } /** * get current OS name * * @return current OS name */ public static String getOSName() { return System.getProperty("os.name"); } /** * check memory and cpu usage * * @param systemCpuLoad systemCpuLoad * @param systemReservedMemory systemReservedMemory * @return check memory and cpu usage */ public static Boolean checkResource(double systemCpuLoad, double systemReservedMemory) { double loadAverage = loadAverage();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java
double availablePhysicalMemorySize = availablePhysicalMemorySize(); if (loadAverage > systemCpuLoad || availablePhysicalMemorySize < systemReservedMemory) { logger.warn("load is too high or availablePhysicalMemorySize(G) is too low, it's availablePhysicalMemorySize(G):{},loadAvg:{}", availablePhysicalMemorySize, loadAverage); return false; } else { return true; } } /** * check memory and cpu usage * * @param conf conf * @param isMaster is master * @return check memory and cpu usage */ public static Boolean checkResource(Configuration conf, Boolean isMaster) { double systemCpuLoad; double systemReservedMemory; if (Boolean.TRUE.equals(isMaster)) { systemCpuLoad = conf.getDouble(Constants.MASTER_MAX_CPULOAD_AVG, Constants.DEFAULT_MASTER_CPU_LOAD); systemReservedMemory = conf.getDouble(Constants.MASTER_RESERVED_MEMORY, Constants.DEFAULT_MASTER_RESERVED_MEMORY); } else { systemCpuLoad = conf.getDouble(Constants.WORKER_MAX_CPULOAD_AVG, Constants.DEFAULT_WORKER_CPU_LOAD); systemReservedMemory = conf.getDouble(Constants.WORKER_RESERVED_MEMORY, Constants.DEFAULT_WORKER_RESERVED_MEMORY); } return checkResource(systemCpuLoad, systemReservedMemory); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java
/* * 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.server.worker.processor; import org.apache.dolphinscheduler.common.enums.Event; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.enums.TaskType; import org.apache.dolphinscheduler.common.utils.DateUtils;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java
import org.apache.dolphinscheduler.common.utils.FileUtils; import org.apache.dolphinscheduler.common.utils.JSONUtils; import org.apache.dolphinscheduler.common.utils.LoggerUtils; import org.apache.dolphinscheduler.common.utils.NetUtils; import org.apache.dolphinscheduler.common.utils.OSUtils; import org.apache.dolphinscheduler.common.utils.Preconditions; import org.apache.dolphinscheduler.remote.command.Command; import org.apache.dolphinscheduler.remote.command.CommandType; import org.apache.dolphinscheduler.remote.command.TaskExecuteAckCommand; import org.apache.dolphinscheduler.remote.command.TaskExecuteRequestCommand; import org.apache.dolphinscheduler.remote.processor.NettyRequestProcessor; import org.apache.dolphinscheduler.server.entity.TaskExecutionContext; import org.apache.dolphinscheduler.server.utils.LogUtils; import org.apache.dolphinscheduler.server.worker.cache.ResponceCache; import org.apache.dolphinscheduler.server.worker.cache.TaskExecutionContextCacheManager; import org.apache.dolphinscheduler.server.worker.cache.impl.TaskExecutionContextCacheManagerImpl; import org.apache.dolphinscheduler.server.worker.config.WorkerConfig; import org.apache.dolphinscheduler.server.worker.runner.TaskExecuteThread; import org.apache.dolphinscheduler.server.worker.runner.WorkerManagerThread; import org.apache.dolphinscheduler.service.alert.AlertClientService; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import java.util.Date; import java.util.Optional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.netty.channel.Channel; /** * worker request processor */ public class TaskExecuteProcessor implements NettyRequestProcessor {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java
private static final Logger logger = LoggerFactory.getLogger(TaskExecuteProcessor.class); /** * worker config */ private final WorkerConfig workerConfig; /** * task callback service */ private final TaskCallbackService taskCallbackService; /** * alert client service */ private AlertClientService alertClientService; /** * taskExecutionContextCacheManager */ private final TaskExecutionContextCacheManager taskExecutionContextCacheManager; /* * task execute manager */ private final WorkerManagerThread workerManager; public TaskExecuteProcessor() {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java
this.taskCallbackService = SpringApplicationContext.getBean(TaskCallbackService.class); this.workerConfig = SpringApplicationContext.getBean(WorkerConfig.class); this.taskExecutionContextCacheManager = SpringApplicationContext.getBean(TaskExecutionContextCacheManagerImpl.class); this.workerManager = SpringApplicationContext.getBean(WorkerManagerThread.class); } /** * Pre-cache task to avoid extreme situations when kill task. There is no such task in the cache * * @param taskExecutionContext task */ private void setTaskCache(TaskExecutionContext taskExecutionContext) { TaskExecutionContext preTaskCache = new TaskExecutionContext(); preTaskCache.setTaskInstanceId(taskExecutionContext.getTaskInstanceId()); taskExecutionContextCacheManager.cacheTaskExecutionContext(preTaskCache); } public TaskExecuteProcessor(AlertClientService alertClientService) { this(); this.alertClientService = alertClientService; } @Override public void process(Channel channel, Command command) { Preconditions.checkArgument(CommandType.TASK_EXECUTE_REQUEST == command.getType(), String.format("invalid command type : %s", command.getType())); TaskExecuteRequestCommand taskRequestCommand = JSONUtils.parseObject( command.getBody(), TaskExecuteRequestCommand.class); logger.info("received command : {}", taskRequestCommand); if (taskRequestCommand == null) { logger.error("task execute request command is null"); return; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java
String contextJson = taskRequestCommand.getTaskExecutionContext(); TaskExecutionContext taskExecutionContext = JSONUtils.parseObject(contextJson, TaskExecutionContext.class); if (taskExecutionContext == null) { logger.error("task execution context is null"); return; } setTaskCache(taskExecutionContext); Logger taskLogger = LoggerFactory.getLogger(LoggerUtils.buildTaskId(LoggerUtils.TASK_LOGGER_INFO_PREFIX, taskExecutionContext.getProcessDefineId(), taskExecutionContext.getProcessInstanceId(), taskExecutionContext.getTaskInstanceId())); taskExecutionContext.setHost(NetUtils.getAddr(workerConfig.getListenPort())); taskExecutionContext.setLogPath(LogUtils.getTaskLogPath(taskExecutionContext)); String execLocalPath = getExecLocalPath(taskExecutionContext); logger.info("task instance local execute path : {}", execLocalPath); taskExecutionContext.setExecutePath(execLocalPath); FileUtils.taskLoggerThreadLocal.set(taskLogger); try { FileUtils.createWorkDirIfAbsent(execLocalPath); if (workerConfig.getWorkerTenantAutoCreate()) { OSUtils.createUserIfAbsent(taskExecutionContext.getTenantCode()); } } catch (Throwable ex) { String errorLog = String.format("create execLocalPath : %s", execLocalPath); LoggerUtils.logError(Optional.of(logger), errorLog, ex); LoggerUtils.logError(Optional.ofNullable(taskLogger), errorLog, ex); taskExecutionContextCacheManager.removeByTaskInstanceId(taskExecutionContext.getTaskInstanceId()); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java
FileUtils.taskLoggerThreadLocal.remove(); taskCallbackService.addRemoteChannel(taskExecutionContext.getTaskInstanceId(), new NettyRemoteChannel(channel, command.getOpaque())); long remainTime = DateUtils.getRemainTime(taskExecutionContext.getFirstSubmitTime(), taskExecutionContext.getDelayTime() * 60L); if (remainTime > 0) { logger.info("delay the execution of task instance {}, delay time: {} s", taskExecutionContext.getTaskInstanceId(), remainTime); taskExecutionContext.setCurrentExecutionStatus(ExecutionStatus.DELAY_EXECUTION); taskExecutionContext.setStartTime(null); } else { taskExecutionContext.setCurrentExecutionStatus(ExecutionStatus.RUNNING_EXECUTION); taskExecutionContext.setStartTime(new Date()); } this.doAck(taskExecutionContext); if (!workerManager.offer(new TaskExecuteThread(taskExecutionContext, taskCallbackService, taskLogger, alertClientService))) { logger.info("submit task to manager error, queue is full, queue size is {}", workerManager.getQueueSize()); } } private void doAck(TaskExecutionContext taskExecutionContext) { TaskExecuteAckCommand ackCommand = buildAckCommand(taskExecutionContext); ResponceCache.get().cache(taskExecutionContext.getTaskInstanceId(), ackCommand.convert2Command(), Event.ACK); taskCallbackService.sendAck(taskExecutionContext.getTaskInstanceId(), ackCommand.convert2Command()); } /** * build ack command * * @param taskExecutionContext taskExecutionContext * @return TaskExecuteAckCommand
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/processor/TaskExecuteProcessor.java
*/ private TaskExecuteAckCommand buildAckCommand(TaskExecutionContext taskExecutionContext) { TaskExecuteAckCommand ackCommand = new TaskExecuteAckCommand(); ackCommand.setTaskInstanceId(taskExecutionContext.getTaskInstanceId()); ackCommand.setStatus(taskExecutionContext.getCurrentExecutionStatus().getCode()); ackCommand.setLogPath(LogUtils.getTaskLogPath(taskExecutionContext)); ackCommand.setHost(taskExecutionContext.getHost()); ackCommand.setStartTime(taskExecutionContext.getStartTime()); if (taskExecutionContext.getTaskType().equals(TaskType.SQL.name()) || taskExecutionContext.getTaskType().equals(TaskType.PROCEDURE.name())) { ackCommand.setExecutePath(null); } else { ackCommand.setExecutePath(taskExecutionContext.getExecutePath()); } taskExecutionContext.setLogPath(ackCommand.getLogPath()); return ackCommand; } /** * get execute local path * * @param taskExecutionContext taskExecutionContext * @return execute local path */ private String getExecLocalPath(TaskExecutionContext taskExecutionContext) { return FileUtils.getProcessExecDir(taskExecutionContext.getProjectId(), taskExecutionContext.getProcessDefineId(), taskExecutionContext.getProcessInstanceId(), taskExecutionContext.getTaskInstanceId()); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
/* * 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.server.worker.task; import static org.apache.dolphinscheduler.common.Constants.EXIT_CODE_FAILURE; import static org.apache.dolphinscheduler.common.Constants.EXIT_CODE_KILL; import static org.apache.dolphinscheduler.common.Constants.EXIT_CODE_SUCCESS; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.thread.Stopper; import org.apache.dolphinscheduler.common.thread.ThreadUtils; import org.apache.dolphinscheduler.common.utils.HadoopUtils; import org.apache.dolphinscheduler.common.utils.LoggerUtils; import org.apache.dolphinscheduler.common.utils.OSUtils; import org.apache.dolphinscheduler.common.utils.StringUtils;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
import org.apache.dolphinscheduler.server.entity.TaskExecutionContext; import org.apache.dolphinscheduler.server.utils.ProcessUtils; import org.apache.dolphinscheduler.server.worker.cache.TaskExecutionContextCacheManager; import org.apache.dolphinscheduler.server.worker.cache.impl.TaskExecutionContextCacheManagerImpl; import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Field; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.slf4j.Logger; /** * abstract command executor */ public abstract class AbstractCommandExecutor { /** * rules for extracting application ID */ protected static final Pattern APPLICATION_REGEX = Pattern.compile(Constants.APPLICATION_REGEX);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
protected StringBuilder varPool = new StringBuilder(); /** * process */ private Process process; /** * log handler */ protected Consumer<List<String>> logHandler; /** * logger */ protected Logger logger; /** * log list */ protected final List<String> logBuffer; protected boolean logOutputIsScuccess = false; /** * SHELL result string */ protected String taskResultString; /** * taskExecutionContext */ protected TaskExecutionContext taskExecutionContext; /** * taskExecutionContextCacheManager */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
private TaskExecutionContextCacheManager taskExecutionContextCacheManager; public AbstractCommandExecutor(Consumer<List<String>> logHandler, TaskExecutionContext taskExecutionContext, Logger logger) { this.logHandler = logHandler; this.taskExecutionContext = taskExecutionContext; this.logger = logger; this.logBuffer = Collections.synchronizedList(new ArrayList<>()); this.taskExecutionContextCacheManager = SpringApplicationContext.getBean(TaskExecutionContextCacheManagerImpl.class); } protected AbstractCommandExecutor(List<String> logBuffer) { this.logBuffer = logBuffer; } /** * build process * * @param commandFile command file * @throws IOException IO Exception */ private void buildProcess(String commandFile) throws IOException { List<String> command = new LinkedList<>(); ProcessBuilder processBuilder = new ProcessBuilder(); processBuilder.directory(new File(taskExecutionContext.getExecutePath())); processBuilder.redirectErrorStream(true); command.add("sudo");
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
command.add("-u"); command.add(taskExecutionContext.getTenantCode()); command.add(commandInterpreter()); command.addAll(commandOptions()); command.add(commandFile); processBuilder.command(command); process = processBuilder.start(); printCommand(command); } /** * task specific execution logic * * @param execCommand execCommand * @return CommandExecuteResult * @throws Exception if error throws Exception */ public CommandExecuteResult run(String execCommand) throws Exception { CommandExecuteResult result = new CommandExecuteResult(); int taskInstanceId = taskExecutionContext.getTaskInstanceId(); if (null == taskExecutionContextCacheManager.getByTaskInstanceId(taskInstanceId)) { result.setExitStatusCode(EXIT_CODE_KILL); return result; } if (StringUtils.isEmpty(execCommand)) { taskExecutionContextCacheManager.removeByTaskInstanceId(taskInstanceId); return result; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
String commandFilePath = buildCommandFilePath(); createCommandFileIfNotExists(execCommand, commandFilePath); buildProcess(commandFilePath); parseProcessOutput(process); Integer processId = getProcessId(process); result.setProcessId(processId); taskExecutionContext.setProcessId(processId); boolean updateTaskExecutionContextStatus = taskExecutionContextCacheManager.updateTaskExecutionContext(taskExecutionContext); if (Boolean.FALSE.equals(updateTaskExecutionContextStatus)) { ProcessUtils.kill(taskExecutionContext); result.setExitStatusCode(EXIT_CODE_KILL); return result; } logger.info("process start, process id is: {}", processId); long remainTime = getRemaintime(); boolean status = process.waitFor(remainTime, TimeUnit.SECONDS); logger.info("process has exited, execute path:{}, processId:{} ,exitStatusCode:{}", taskExecutionContext.getExecutePath(), processId , result.getExitStatusCode()); if (status) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
List<String> appIds = getAppIds(taskExecutionContext.getLogPath()); result.setAppIds(String.join(Constants.COMMA, appIds)); result.setExitStatusCode(process.exitValue()); if (process.exitValue() == 0) { result.setExitStatusCode(isSuccessOfYarnState(appIds) ? EXIT_CODE_SUCCESS : EXIT_CODE_FAILURE); } } else { logger.error("process has failure , exitStatusCode : {} , ready to kill ...", result.getExitStatusCode()); ProcessUtils.kill(taskExecutionContext); result.setExitStatusCode(EXIT_CODE_FAILURE); } return result; } public String getVarPool() { return varPool.toString(); } /** * cancel application * * @throws Exception exception */ public void cancelApplication() throws Exception { if (process == null) { return; } clear(); int processId = getProcessId(process);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
logger.info("cancel process: {}", processId); boolean killed = softKill(processId); if (!killed) { hardKill(processId); process.destroy(); process = null; } } /** * soft kill * * @param processId process id * @return process is alive * @throws InterruptedException interrupted exception */ private boolean softKill(int processId) { if (processId != 0 && process.isAlive()) { try { String cmd = String.format("kill %d", processId); cmd = OSUtils.getSudoCmd(taskExecutionContext.getTenantCode(), cmd); logger.info("soft kill task:{}, process id:{}, cmd:{}", taskExecutionContext.getTaskAppId(), processId, cmd); Runtime.getRuntime().exec(cmd); } catch (IOException e) { logger.info("kill attempt failed", e); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
return !process.isAlive(); } /** * hard kill * * @param processId process id */ private void hardKill(int processId) { if (processId != 0 && process.isAlive()) { try { String cmd = String.format("kill -9 %d", processId); cmd = OSUtils.getSudoCmd(taskExecutionContext.getTenantCode(), cmd); logger.info("hard kill task:{}, process id:{}, cmd:{}", taskExecutionContext.getTaskAppId(), processId, cmd); Runtime.getRuntime().exec(cmd); } catch (IOException e) { logger.error("kill attempt failed ", e); } } } /** * print command * * @param commands process builder */ private void printCommand(List<String> commands) { String cmdStr; try { cmdStr = ProcessUtils.buildCommandStr(commands); logger.info("task run command:\n{}", cmdStr); } catch (Exception e) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
logger.error(e.getMessage(), e); } } /** * clear */ private void clear() { List<String> markerList = new ArrayList<>(); markerList.add(ch.qos.logback.classic.ClassicConstants.FINALIZE_SESSION_MARKER.toString()); if (!logBuffer.isEmpty()) { logHandler.accept(logBuffer); logBuffer.clear(); } logHandler.accept(markerList); } /** * get the standard output of the process * * @param process process */ private void parseProcessOutput(Process process) { String threadLoggerInfoName = String.format(LoggerUtils.TASK_LOGGER_THREAD_NAME + "-%s", taskExecutionContext.getTaskAppId()); ExecutorService getOutputLogService = ThreadUtils.newDaemonSingleThreadExecutor(threadLoggerInfoName + "-" + "getOutputLogService"); getOutputLogService.submit(() -> { BufferedReader inReader = null; try { inReader = new BufferedReader(new InputStreamReader(process.getInputStream())); String line; logBuffer.add("welcome to use bigdata scheduling system...");
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
while ((line = inReader.readLine()) != null) { if (line.startsWith("${setValue(")) { varPool.append(line.substring("${setValue(".length(), line.length() - 2)); varPool.append("$VarPool$"); } else { logBuffer.add(line); taskResultString = line; } } } catch (Exception e) { logger.error(e.getMessage(), e); } finally { logOutputIsScuccess = true; close(inReader); } }); getOutputLogService.shutdown(); ExecutorService parseProcessOutputExecutorService = ThreadUtils.newDaemonSingleThreadExecutor(threadLoggerInfoName); parseProcessOutputExecutorService.submit(() -> { try { long lastFlushTime = System.currentTimeMillis(); while (logBuffer.size() > 0 || !logOutputIsScuccess) { if (logBuffer.size() > 0) { lastFlushTime = flush(lastFlushTime); } else { Thread.sleep(Constants.DEFAULT_LOG_FLUSH_INTERVAL); } } } catch (Exception e) { logger.error(e.getMessage(), e);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
} finally { clear(); } }); parseProcessOutputExecutorService.shutdown(); } /** * check yarn state * * @param appIds application id list * @return is success of yarn task state */ public boolean isSuccessOfYarnState(List<String> appIds) { boolean result = true; try { for (String appId : appIds) { while (Stopper.isRunning()) { ExecutionStatus applicationStatus = HadoopUtils.getInstance().getApplicationStatus(appId); logger.info("appId:{}, final state:{}", appId, applicationStatus.name()); if (applicationStatus.equals(ExecutionStatus.FAILURE) || applicationStatus.equals(ExecutionStatus.KILL)) { return false; } if (applicationStatus.equals(ExecutionStatus.SUCCESS)) { break; } Thread.sleep(Constants.SLEEP_TIME_MILLIS); } } } catch (Exception e) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
logger.error(String.format("yarn applications: %s status failed ", appIds.toString()), e); result = false; } return result; } public int getProcessId() { return getProcessId(process); } /** * get app links * * @param logPath log path * @return app id list */ private List<String> getAppIds(String logPath) { List<String> logs = convertFile2List(logPath); List<String> appIds = new ArrayList<>(); /** * analysis log?get submited yarn application id */ for (String log : logs) { String appId = findAppId(log); if (StringUtils.isNotEmpty(appId) && !appIds.contains(appId)) { logger.info("find app id: {}", appId); appIds.add(appId); } } return appIds; } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
* convert file to list * * @param filename file name * @return line list */ private List<String> convertFile2List(String filename) { List lineList = new ArrayList<String>(100); File file = new File(filename); if (!file.exists()) { return lineList; } BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(new FileInputStream(filename), StandardCharsets.UTF_8)); String line = null; while ((line = br.readLine()) != null) { lineList.add(line); } } catch (Exception e) { logger.error(String.format("read file: %s failed : ", filename), e); } finally { if (br != null) { try { br.close(); } catch (IOException e) { logger.error(e.getMessage(), e); } } } return lineList;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
} /** * find app id * * @param line line * @return appid */ private String findAppId(String line) { Matcher matcher = APPLICATION_REGEX.matcher(line); if (matcher.find()) { return matcher.group(); } return null; } /** * get remain time(s) * * @return remain time */ private long getRemaintime() { long usedTime = (System.currentTimeMillis() - taskExecutionContext.getStartTime().getTime()) / 1000; long remainTime = taskExecutionContext.getTaskTimeout() - usedTime; if (remainTime < 0) { throw new RuntimeException("task execution time out"); } return remainTime; } /** * get process id *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
* @param process process * @return process id */ private int getProcessId(Process process) { int processId = 0; try { Field f = process.getClass().getDeclaredField(Constants.PID); f.setAccessible(true); processId = f.getInt(process); } catch (Throwable e) { logger.error(e.getMessage(), e); } return processId; } /** * when log buffer siz or flush time reach condition , then flush * * @param lastFlushTime last flush time * @return last flush time */ private long flush(long lastFlushTime) { long now = System.currentTimeMillis(); /** * when log buffer siz or flush time reach condition , then flush */ if (logBuffer.size() >= Constants.DEFAULT_LOG_ROWS_NUM || now - lastFlushTime > Constants.DEFAULT_LOG_FLUSH_INTERVAL) { lastFlushTime = now; /** logHandler.accept(logBuffer); logBuffer.clear();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
5,128
[Feature][Worker] Support turning off sudo permissions
*For better global communication, please give priority to using English description, thx! * *Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.* **Describe the feature** The current version of multi-tenant implementation requires sudo permission. Most of the time the deployment execution user does not have sudo permission and does not need to be executed by the tenant account. At this time, the sudo permission dependency can be turned off, and the task execution is executed by the deployment user. 当前版本多租户的实现,需要sudo权限,大多数时候部署执行用户没有sudo权限,并且不需要利用租户账户执行,这时候可以关掉sudo权限依赖,任务执行采用部署用户执行 sudo stands for privilege escalation. If privilege escalation is not configured, multi-tenant is only used to isolate resources and users. After privilege escalation is configured, task execution will be performed by tenants, and deployment users will not be configured; and if privilege escalation is not configured, tenants cannot be automatically created. sudo 代表提权,如果不配置提权,多租户仅用来隔离资源与用户,配置提权以后,任务执行使用租户执行,不配置使用部署用户执行;并且不配置提权不允许自动创建租户
https://github.com/apache/dolphinscheduler/issues/5128
https://github.com/apache/dolphinscheduler/pull/5129
9c0439621836b5134b8a7da4e671cb74edc7c31b
a6a1b94df4f5c4d22845fe99f2f778ba53d60e5c
"2021-03-23T04:00:15Z"
java
"2021-03-29T03:07:39Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/AbstractCommandExecutor.java
} return lastFlushTime; } /** * close buffer reader * * @param inReader in reader */ private void close(BufferedReader inReader) { if (inReader != null) { try { inReader.close(); } catch (IOException e) { logger.error(e.getMessage(), e); } } } protected List<String> commandOptions() { return Collections.emptyList(); } protected abstract String buildCommandFilePath(); protected abstract String commandInterpreter(); protected abstract void createCommandFileIfNotExists(String execCommand, String commandFile) throws IOException; public String getTaskResultString() { return taskResultString; } public void setTaskResultString(String taskResultString) { this.taskResultString = taskResultString; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
/* * 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.common.utils; import static org.apache.dolphinscheduler.common.Constants.RESOURCE_UPLOAD_PATH; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.ExecutionStatus; import org.apache.dolphinscheduler.common.enums.ResUploadType; import org.apache.dolphinscheduler.common.enums.ResourceType; import org.apache.dolphinscheduler.common.exception.BaseException; import org.apache.commons.io.IOUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.yarn.client.cli.RMAdminCLI; import java.io.BufferedReader; import java.io.Closeable; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.security.PrivilegedExceptionAction; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import java.util.stream.Stream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; /** * hadoop utils * single instance */ public class HadoopUtils implements Closeable {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
private static final Logger logger = LoggerFactory.getLogger(HadoopUtils.class); private static String hdfsUser = PropertyUtils.getString(Constants.HDFS_ROOT_USER); public static final String resourceUploadPath = PropertyUtils.getString(RESOURCE_UPLOAD_PATH, "/dolphinscheduler"); public static final String rmHaIds = PropertyUtils.getString(Constants.YARN_RESOURCEMANAGER_HA_RM_IDS); public static final String appAddress = PropertyUtils.getString(Constants.YARN_APPLICATION_STATUS_ADDRESS); public static final String jobHistoryAddress = PropertyUtils.getString(Constants.YARN_JOB_HISTORY_STATUS_ADDRESS); private static final String HADOOP_UTILS_KEY = "HADOOP_UTILS_KEY"; private static final LoadingCache<String, HadoopUtils> cache = CacheBuilder .newBuilder() .expireAfterWrite(PropertyUtils.getInt(Constants.KERBEROS_EXPIRE_TIME, 2), TimeUnit.HOURS) .build(new CacheLoader<String, HadoopUtils>() { @Override public HadoopUtils load(String key) throws Exception { return new HadoopUtils(); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
}); private static volatile boolean yarnEnabled = false; private Configuration configuration; private FileSystem fs; private HadoopUtils() { init(); initHdfsPath(); } public static HadoopUtils getInstance() { return cache.getUnchecked(HADOOP_UTILS_KEY); } /** * init dolphinscheduler root path in hdfs */ private void initHdfsPath() { Path path = new Path(resourceUploadPath); try { if (!fs.exists(path)) { fs.mkdirs(path); } } catch (Exception e) { logger.error(e.getMessage(), e); } } /** * init hadoop configuration */ private void init() { try { configuration = new HdfsConfiguration();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
String resourceStorageType = PropertyUtils.getUpperCaseString(Constants.RESOURCE_STORAGE_TYPE); ResUploadType resUploadType = ResUploadType.valueOf(resourceStorageType); if (resUploadType == ResUploadType.HDFS) { if (PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false)) { System.setProperty(Constants.JAVA_SECURITY_KRB5_CONF, PropertyUtils.getString(Constants.JAVA_SECURITY_KRB5_CONF_PATH)); configuration.set(Constants.HADOOP_SECURITY_AUTHENTICATION, "kerberos"); hdfsUser = ""; UserGroupInformation.setConfiguration(configuration); UserGroupInformation.loginUserFromKeytab(PropertyUtils.getString(Constants.LOGIN_USER_KEY_TAB_USERNAME), PropertyUtils.getString(Constants.LOGIN_USER_KEY_TAB_PATH)); } String defaultFS = configuration.get(Constants.FS_DEFAULTFS); if (defaultFS.startsWith("file")) { String defaultFSProp = PropertyUtils.getString(Constants.FS_DEFAULTFS); if (StringUtils.isNotBlank(defaultFSProp)) { Map<String, String> fsRelatedProps = PropertyUtils.getPrefixedProperties("fs."); configuration.set(Constants.FS_DEFAULTFS, defaultFSProp); fsRelatedProps.forEach((key, value) -> configuration.set(key, value)); } else { logger.error("property:{} can not to be empty, please set!", Constants.FS_DEFAULTFS); throw new RuntimeException( String.format("property: %s can not to be empty, please set!", Constants.FS_DEFAULTFS) ); } } else { logger.info("get property:{} -> {}, from core-site.xml hdfs-site.xml ", Constants.FS_DEFAULTFS, defaultFS); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
if (fs == null) { if (StringUtils.isNotEmpty(hdfsUser)) { UserGroupInformation ugi = UserGroupInformation.createRemoteUser(hdfsUser); ugi.doAs(new PrivilegedExceptionAction<Boolean>() { @Override public Boolean run() throws Exception { fs = FileSystem.get(configuration); return true; } }); } else { logger.warn("hdfs.root.user is not set value!"); fs = FileSystem.get(configuration); } } } else if (resUploadType == ResUploadType.S3) { System.setProperty(Constants.AWS_S3_V4, Constants.STRING_TRUE); configuration.set(Constants.FS_DEFAULTFS, PropertyUtils.getString(Constants.FS_DEFAULTFS)); configuration.set(Constants.FS_S3A_ENDPOINT, PropertyUtils.getString(Constants.FS_S3A_ENDPOINT)); configuration.set(Constants.FS_S3A_ACCESS_KEY, PropertyUtils.getString(Constants.FS_S3A_ACCESS_KEY)); configuration.set(Constants.FS_S3A_SECRET_KEY, PropertyUtils.getString(Constants.FS_S3A_SECRET_KEY)); fs = FileSystem.get(configuration); } } catch (Exception e) { logger.error(e.getMessage(), e); } } /** * @return Configuration */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
public Configuration getConfiguration() { return configuration; } /** * get application url * * @param applicationId application id * @return url of application */ public String getApplicationUrl(String applicationId) throws Exception { /** * if rmHaIds contains xx, it signs not use resourcemanager * otherwise: * if rmHaIds is empty, single resourcemanager enabled * if rmHaIds not empty: resourcemanager HA enabled */ yarnEnabled = true; String appUrl = StringUtils.isEmpty(rmHaIds) ? appAddress : getAppAddress(appAddress, rmHaIds); if (StringUtils.isBlank(appUrl)) { throw new BaseException("yarn application url generation failed"); } if (logger.isDebugEnabled()) { logger.debug("yarn application url:{}, applicationId:{}", appUrl, applicationId); } return String.format(appUrl, applicationId); } public String getJobHistoryUrl(String applicationId) { String jobId = applicationId.replace("application", "job"); return String.format(jobHistoryAddress, jobId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
} /** * cat file on hdfs * * @param hdfsFilePath hdfs file path * @return byte[] byte array * @throws IOException errors */ public byte[] catFile(String hdfsFilePath) throws IOException { if (StringUtils.isBlank(hdfsFilePath)) { logger.error("hdfs file path:{} is blank", hdfsFilePath); return new byte[0]; } try (FSDataInputStream fsDataInputStream = fs.open(new Path(hdfsFilePath))) { return IOUtils.toByteArray(fsDataInputStream); } } /** * cat file on hdfs * * @param hdfsFilePath hdfs file path * @param skipLineNums skip line numbers * @param limit read how many lines * @return content of file * @throws IOException errors */ public List<String> catFile(String hdfsFilePath, int skipLineNums, int limit) throws IOException { if (StringUtils.isBlank(hdfsFilePath)) { logger.error("hdfs file path:{} is blank", hdfsFilePath); return Collections.emptyList();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
} try (FSDataInputStream in = fs.open(new Path(hdfsFilePath))) { BufferedReader br = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8)); Stream<String> stream = br.lines().skip(skipLineNums).limit(limit); return stream.collect(Collectors.toList()); } } /** * make the given file and all non-existent parents into * directories. Has the semantics of Unix 'mkdir -p'. * Existence of the directory hierarchy is not an error. * * @param hdfsPath path to create * @return mkdir result * @throws IOException errors */ public boolean mkdir(String hdfsPath) throws IOException { return fs.mkdirs(new Path(hdfsPath)); } /** * copy files between FileSystems * * @param srcPath source hdfs path * @param dstPath destination hdfs path * @param deleteSource whether to delete the src * @param overwrite whether to overwrite an existing file * @return if success or not * @throws IOException errors */ public boolean copy(String srcPath, String dstPath, boolean deleteSource, boolean overwrite) throws IOException {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
return FileUtil.copy(fs, new Path(srcPath), fs, new Path(dstPath), deleteSource, overwrite, fs.getConf()); } /** * the src file is on the local disk. Add it to FS at * the given dst name. * * @param srcFile local file * @param dstHdfsPath destination hdfs path * @param deleteSource whether to delete the src * @param overwrite whether to overwrite an existing file * @return if success or not * @throws IOException errors */ public boolean copyLocalToHdfs(String srcFile, String dstHdfsPath, boolean deleteSource, boolean overwrite) throws IOException { Path srcPath = new Path(srcFile); Path dstPath = new Path(dstHdfsPath); fs.copyFromLocalFile(deleteSource, overwrite, srcPath, dstPath); return true; } /** * copy hdfs file to local * * @param srcHdfsFilePath source hdfs file path * @param dstFile destination file * @param deleteSource delete source * @param overwrite overwrite * @return result of copy hdfs file to local * @throws IOException errors */ public boolean copyHdfsToLocal(String srcHdfsFilePath, String dstFile, boolean deleteSource, boolean overwrite) throws IOException {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
Path srcPath = new Path(srcHdfsFilePath); File dstPath = new File(dstFile); if (dstPath.exists()) { if (dstPath.isFile()) { if (overwrite) { Files.delete(dstPath.toPath()); } } else { logger.error("destination file must be a file"); } } if (!dstPath.getParentFile().exists()) { dstPath.getParentFile().mkdirs(); } return FileUtil.copy(fs, srcPath, dstPath, deleteSource, fs.getConf()); } /** * delete a file * * @param hdfsFilePath the path to delete. * @param recursive if path is a directory and set to * true, the directory is deleted else throws an exception. In * case of a file the recursive can be set to either true or false. * @return true if delete is successful else false. * @throws IOException errors */ public boolean delete(String hdfsFilePath, boolean recursive) throws IOException { return fs.delete(new Path(hdfsFilePath), recursive); } /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
* check if exists * * @param hdfsFilePath source file path * @return result of exists or not * @throws IOException errors */ public boolean exists(String hdfsFilePath) throws IOException { return fs.exists(new Path(hdfsFilePath)); } /** * Gets a list of files in the directory * * @param filePath file path * @return {@link FileStatus} file status * @throws Exception errors */ public FileStatus[] listFileStatus(String filePath) throws Exception { try { return fs.listStatus(new Path(filePath)); } catch (IOException e) { logger.error("Get file list exception", e); throw new Exception("Get file list exception", e); } } /** * Renames Path src to Path dst. Can take place on local fs * or remote DFS. * * @param src path to be renamed * @param dst new path after rename
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
* @return true if rename is successful * @throws IOException on failure */ public boolean rename(String src, String dst) throws IOException { return fs.rename(new Path(src), new Path(dst)); } /** * hadoop resourcemanager enabled or not * * @return result */ public boolean isYarnEnabled() { return yarnEnabled; } /** * get the state of an application * * @param applicationId application id * @return the return may be null or there may be other parse exceptions */ public ExecutionStatus getApplicationStatus(String applicationId) throws Exception { if (StringUtils.isEmpty(applicationId)) { return null; } String result = Constants.FAILED; String applicationUrl = getApplicationUrl(applicationId); logger.info("applicationUrl={}", applicationUrl); String responseContent = PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false) ? KerberosHttpClient.get(applicationUrl) : HttpUtils.get(applicationUrl); if (responseContent != null) { ObjectNode jsonObject = JSONUtils.parseObject(responseContent);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
if (!jsonObject.has("app")) { return ExecutionStatus.FAILURE; } result = jsonObject.path("app").path("finalStatus").asText(); } else { String jobHistoryUrl = getJobHistoryUrl(applicationId); logger.info("jobHistoryUrl={}", jobHistoryUrl); responseContent = PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false) ? KerberosHttpClient.get(jobHistoryUrl) : HttpUtils.get(jobHistoryUrl); if (null != responseContent) { ObjectNode jsonObject = JSONUtils.parseObject(responseContent); if (!jsonObject.has("job")) { return ExecutionStatus.FAILURE; } result = jsonObject.path("job").path("state").asText(); } else { return ExecutionStatus.FAILURE; } } switch (result) { case Constants.ACCEPTED: return ExecutionStatus.SUBMITTED_SUCCESS; case Constants.SUCCEEDED: return ExecutionStatus.SUCCESS; case Constants.NEW: case Constants.NEW_SAVING: case Constants.SUBMITTED: case Constants.FAILED: return ExecutionStatus.FAILURE; case Constants.KILLED:
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
return ExecutionStatus.KILL; case Constants.RUNNING: default: return ExecutionStatus.RUNNING_EXECUTION; } } /** * get data hdfs path * * @return data hdfs path */ public static String getHdfsDataBasePath() { if ("/".equals(resourceUploadPath)) { return ""; } else { return resourceUploadPath; } } /** * hdfs resource dir * * @param tenantCode tenant code * @param resourceType resource type * @return hdfs resource dir */ public static String getHdfsDir(ResourceType resourceType, String tenantCode) { String hdfsDir = ""; if (resourceType.equals(ResourceType.FILE)) { hdfsDir = getHdfsResDir(tenantCode);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
} else if (resourceType.equals(ResourceType.UDF)) { hdfsDir = getHdfsUdfDir(tenantCode); } return hdfsDir; } /** * hdfs resource dir * * @param tenantCode tenant code * @return hdfs resource dir */ public static String getHdfsResDir(String tenantCode) { return String.format("%s/resources", getHdfsTenantDir(tenantCode)); } /** * hdfs user dir * * @param tenantCode tenant code * @param userId user id * @return hdfs resource dir */ public static String getHdfsUserDir(String tenantCode, int userId) { return String.format("%s/home/%d", getHdfsTenantDir(tenantCode), userId); } /** * hdfs udf dir * * @param tenantCode tenant code * @return get udf dir on hdfs */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
public static String getHdfsUdfDir(String tenantCode) { return String.format("%s/udfs", getHdfsTenantDir(tenantCode)); } /** * get hdfs file name * * @param resourceType resource type * @param tenantCode tenant code * @param fileName file name * @return hdfs file name */ public static String getHdfsFileName(ResourceType resourceType, String tenantCode, String fileName) { if (fileName.startsWith("/")) { fileName = fileName.replaceFirst("/", ""); } return String.format("%s/%s", getHdfsDir(resourceType, tenantCode), fileName); } /** * get absolute path and name for resource file on hdfs * * @param tenantCode tenant code * @param fileName file name * @return get absolute path and name for file on hdfs */ public static String getHdfsResourceFileName(String tenantCode, String fileName) { if (fileName.startsWith("/")) { fileName = fileName.replaceFirst("/", ""); } return String.format("%s/%s", getHdfsResDir(tenantCode), fileName); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
/** * get absolute path and name for udf file on hdfs * * @param tenantCode tenant code * @param fileName file name * @return get absolute path and name for udf file on hdfs */ public static String getHdfsUdfFileName(String tenantCode, String fileName) { if (fileName.startsWith("/")) { fileName = fileName.replaceFirst("/", ""); } return String.format("%s/%s", getHdfsUdfDir(tenantCode), fileName); } /** * @param tenantCode tenant code * @return file directory of tenants on hdfs */ public static String getHdfsTenantDir(String tenantCode) { return String.format("%s/%s", getHdfsDataBasePath(), tenantCode); } /** * getAppAddress * * @param appAddress app address * @param rmHa resource manager ha * @return app address */ public static String getAppAddress(String appAddress, String rmHa) { String activeRM = YarnHAAdminUtils.getAcitveRMName(rmHa);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
if (StringUtils.isEmpty(activeRM)) { return null; } String[] split1 = appAddress.split(Constants.DOUBLE_SLASH); if (split1.length != 2) { return null; } String start = split1[0] + Constants.DOUBLE_SLASH; String[] split2 = split1[1].split(Constants.COLON); if (split2.length != 2) { return null; } String end = Constants.COLON + split2[1]; return start + activeRM + end; } @Override public void close() throws IOException { if (fs != null) { try { fs.close(); } catch (IOException e) { logger.error("Close HadoopUtils instance failed", e); throw new IOException("Close HadoopUtils instance failed", e); } } } /** * yarn ha admin utils */ private static final class YarnHAAdminUtils extends RMAdminCLI {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
/** * get active resourcemanager * * @param rmIds * @return */ public static String getAcitveRMName(String rmIds) { String[] rmIdArr = rmIds.split(Constants.COMMA); int activeResourceManagerPort = PropertyUtils.getInt(Constants.HADOOP_RESOURCE_MANAGER_HTTPADDRESS_PORT, 8088); String yarnUrl = "http://%s:" + activeResourceManagerPort + "/ws/v1/cluster/info"; try { /** * send http get request to rm */ for (String rmId : rmIdArr) { String state = getRMState(String.format(yarnUrl, rmId)); if (Constants.HADOOP_RM_STATE_ACTIVE.equals(state)) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
return rmId; } } } catch (Exception e) { logger.error("yarn ha application url generation failed, message:{}", e.getMessage()); } return null; } /** * get ResourceManager state * * @param url * @return */ public static String getRMState(String url) { String retStr = PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false) ? KerberosHttpClient.get(url) : HttpUtils.get(url); if (StringUtils.isEmpty(retStr)) { return null; } ObjectNode jsonObject = JSONUtils.parseObject(retStr); if (!jsonObject.has("clusterInfo")) { return null; } return jsonObject.get("clusterInfo").path("haState").asText(); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/StringUtils.java
/* * 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.common.utils; public class StringUtils { public static final String EMPTY = ""; private StringUtils() { throw new UnsupportedOperationException("Construct StringUtils"); } public static boolean isEmpty(final CharSequence cs) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/StringUtils.java
return cs == null || cs.length() == 0; } public static boolean isNotEmpty(final CharSequence cs) { return !isEmpty(cs); } public static boolean isBlank(String str) { int strLen; if (str != null && (strLen = str.length()) != 0) { for (int i = 0; i < strLen; ++i) { if (!Character.isWhitespace(str.charAt(i))) { return false; } } } return true; } public static boolean isNotBlank(String s) { return !isBlank(s); } public static String trim(String str) { return str == null ? null : str.trim(); } public static String defaultIfBlank(String str, String defaultStr) { return isBlank(str) ? defaultStr : str; } public static boolean equalsIgnoreCase(String str1, String str2) { return str1 == null ? str2 == null : str1.equalsIgnoreCase(str2); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/StringUtilsTest.java
/* * 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.common.utils; import org.junit.Assert; import org.junit.Test; public class StringUtilsTest {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/StringUtilsTest.java
@Test public void testIsNotEmpty() { boolean b = StringUtils.isNotEmpty(null); Assert.assertFalse(b); b = StringUtils.isNotEmpty(""); Assert.assertFalse(b); b = StringUtils.isNotEmpty(" "); Assert.assertTrue(b); b = StringUtils.isNotEmpty("test"); Assert.assertTrue(b); } @Test public void testIsNotBlank() { boolean b = StringUtils.isNotBlank(null);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/StringUtilsTest.java
Assert.assertFalse(b); b = StringUtils.isNotBlank(""); Assert.assertFalse(b); b = StringUtils.isNotBlank(" "); Assert.assertFalse(b); b = StringUtils.isNotBlank(" test "); Assert.assertTrue(b); b = StringUtils.isNotBlank("test"); Assert.assertTrue(b); } @Test public void testTrim() { String trim = StringUtils.trim(null); Assert.assertNull(trim); trim = StringUtils.trim(" test "); Assert.assertEquals("test", trim); } @Test public void testDefaultIfBlank() { String defaultStr = StringUtils.defaultIfBlank("", "defaultStr"); Assert.assertEquals("defaultStr", defaultStr); defaultStr = StringUtils.defaultIfBlank("test", "defaultStr"); Assert.assertEquals("test", defaultStr); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/AlertGroupMapper.java
/* * 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.dao.mapper; import org.apache.dolphinscheduler.common.enums.AlertType; import org.apache.dolphinscheduler.dao.entity.AlertGroup; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Param; import java.util.List; /** * alertgroup mapper interface */ public interface AlertGroupMapper extends BaseMapper<AlertGroup> {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/AlertGroupMapper.java
/** * alertgroup page * @param page page * @param groupName groupName * @return alertgroup Ipage */ IPage<AlertGroup> queryAlertGroupPage(Page page, @Param("groupName") String groupName); /** * query by group name * @param groupName groupName * @return alertgroup list */ List<AlertGroup> queryByGroupName(@Param("groupName") String groupName);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/AlertGroupMapper.java
/** * Judge whether the alert group exist * @param groupName groupName * @return if exist return true else return null */ Boolean existGroupName(@Param("groupName") String groupName); /** * query by userId * @param userId userId * @return alertgroup list */ List<AlertGroup> queryByUserId(@Param("userId") int userId); /** * query all group list * @return alertgroup list */ List<AlertGroup> queryAllGroupList(); /** * query instance ids All * @return list */ List<String> queryInstanceIdsList(); /** * queryAlertGroupInstanceIdsById * @param alertGroupId * @return */ String queryAlertGroupInstanceIdsById(@Param("alertGroupId") int alertGroupId); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
4,721
[Bug][worker] The shell background starts the YARN task scenario, and the kill function is abnormal
**Describe the bug** The shell background starts the YARN task scenario, and the kill function is abnormal **To Reproduce** 1.Create a new shell task to start the yarn task in the background 2.While the yarn task is running, the page clicks on this task kill function **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Which version of Dolphin Scheduler:** -[1.3.4-release,dev] --- **描述 bug** 在shell后台启动yarn任务场景,kill功能异常 **To Reproduce** 1.新建一个shell任务,用于后台启动yarn任务 2.在yarn任务正在运行时,页面点击此任务kill功能 异常: 页面点击kill后,工作流实例显示状态为准备停止 ![image](https://user-images.githubusercontent.com/37063904/107142822-606be400-696c-11eb-97a8-466dbdc1dd80.png) ![image](https://user-images.githubusercontent.com/37063904/107142827-6661c500-696c-11eb-99ed-2bcf204b3412.png) worker日志 任务正在运行日志 ![image](https://user-images.githubusercontent.com/37063904/107142955-2cdd8980-696d-11eb-96e9-300a28b5e156.png) 任务kill时日志 ![image](https://user-images.githubusercontent.com/37063904/107143000-86de4f00-696d-11eb-977a-e168b1b757c3.png)
https://github.com/apache/dolphinscheduler/issues/4721
https://github.com/apache/dolphinscheduler/pull/4722
9c3cec5bbdec2eea90e4525da9e4b915d4b5bb82
e53369318bdf61f169dcbf2644caf8521b3dd536
"2021-02-07T09:54:49Z"
java
"2021-03-30T14:33:49Z"
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/utils/ProcessUtils.java
/* * 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,