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,059 | [Improvement][API] Verify that the new workflow definition version is the current version before removing it |
**Describe the question**
Verify that the new workflow definition version is the current version before removing it
1.A new method to the Delete API verifies that the workflow definition version is in use
2.UI additions prohibit deleting the current version
**Which version of DolphinScheduler:**
-[dev]
| https://github.com/apache/dolphinscheduler/issues/5059 | https://github.com/apache/dolphinscheduler/pull/5060 | 6216817861c64d9a170686c4c5aa6f3b9b0da110 | 705715c3130be49a8bab9bc2d181b2ad26d453da | "2021-03-15T12:35:24Z" | java | "2021-03-18T01:37:17Z" | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.java | /**
* verify process definition by name
*
* @param projectId projectId
* @param name name
* @return process definition
*/
ProcessDefinition verifyByDefineName(@Param("projectId") int projectId,
@Param("processDefinitionName") String name);
/**
* query process definition by name |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,059 | [Improvement][API] Verify that the new workflow definition version is the current version before removing it |
**Describe the question**
Verify that the new workflow definition version is the current version before removing it
1.A new method to the Delete API verifies that the workflow definition version is in use
2.UI additions prohibit deleting the current version
**Which version of DolphinScheduler:**
-[dev]
| https://github.com/apache/dolphinscheduler/issues/5059 | https://github.com/apache/dolphinscheduler/pull/5060 | 6216817861c64d9a170686c4c5aa6f3b9b0da110 | 705715c3130be49a8bab9bc2d181b2ad26d453da | "2021-03-15T12:35:24Z" | java | "2021-03-18T01:37:17Z" | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.java | *
* @param projectId projectId
* @param name name
* @return process definition
*/
ProcessDefinition queryByDefineName(@Param("projectId") int projectId,
@Param("processDefinitionName") String name);
/**
* query process definition by id
*
* @param processDefineId processDefineId
* @return process definition
*/
ProcessDefinition queryByDefineId(@Param("processDefineId") int processDefineId);
/**
* process definition page
*
* @param page page
* @param searchVal searchVal
* @param userId userId
* @param projectId projectId
* @param isAdmin isAdmin
* @return process definition IPage
*/
IPage<ProcessDefinition> queryDefineListPaging(IPage<ProcessDefinition> page,
@Param("searchVal") String searchVal,
@Param("userId") int userId,
@Param("projectId") int projectId,
@Param("isAdmin") boolean isAdmin);
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,059 | [Improvement][API] Verify that the new workflow definition version is the current version before removing it |
**Describe the question**
Verify that the new workflow definition version is the current version before removing it
1.A new method to the Delete API verifies that the workflow definition version is in use
2.UI additions prohibit deleting the current version
**Which version of DolphinScheduler:**
-[dev]
| https://github.com/apache/dolphinscheduler/issues/5059 | https://github.com/apache/dolphinscheduler/pull/5060 | 6216817861c64d9a170686c4c5aa6f3b9b0da110 | 705715c3130be49a8bab9bc2d181b2ad26d453da | "2021-03-15T12:35:24Z" | java | "2021-03-18T01:37:17Z" | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.java | * query all process definition list
*
* @param projectId projectId
* @return process definition list
*/
List<ProcessDefinition> queryAllDefinitionList(@Param("projectId") int projectId);
/**
* query process definition by ids
*
* @param ids ids
* @return process definition list
*/
List<ProcessDefinition> queryDefinitionListByIdList(@Param("ids") Integer[] ids);
/**
* query process definition by tenant
*
* @param tenantId tenantId
* @return process definition list
*/
List<ProcessDefinition> queryDefinitionListByTenant(@Param("tenantId") int tenantId);
/**
* count process definition group by user
*
* @param userId userId
* @param projectIds projectIds
* @param isAdmin isAdmin
* @return process definition list
*/
List<DefinitionGroupByUser> countDefinitionGroupByUser(
@Param("userId") Integer userId, |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,059 | [Improvement][API] Verify that the new workflow definition version is the current version before removing it |
**Describe the question**
Verify that the new workflow definition version is the current version before removing it
1.A new method to the Delete API verifies that the workflow definition version is in use
2.UI additions prohibit deleting the current version
**Which version of DolphinScheduler:**
-[dev]
| https://github.com/apache/dolphinscheduler/issues/5059 | https://github.com/apache/dolphinscheduler/pull/5060 | 6216817861c64d9a170686c4c5aa6f3b9b0da110 | 705715c3130be49a8bab9bc2d181b2ad26d453da | "2021-03-15T12:35:24Z" | java | "2021-03-18T01:37:17Z" | dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionMapper.java | @Param("projectIds") Integer[] projectIds,
@Param("isAdmin") boolean isAdmin);
/**
* list all resource ids
*
* @return resource ids list
*/
@MapKey("id")
List<Map<String, Object>> listResources();
/**
* list all resource ids by user id
*
* @return resource ids list
*/
@MapKey("id")
List<Map<String, Object>> listResourcesByUser(@Param("userId") Integer userId);
/**
* update process definition version by process definitionId
*
* @param processDefinitionId process definition id
* @param version version
*/
void updateVersionByProcessDefinitionId(@Param("processDefinitionId") int processDefinitionId, @Param("version") long version);
/**
* list all project ids
* @return project ids list
*/
List<Integer> listProjectIds();
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.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;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.common.utils.OSUtils;
import org.apache.dolphinscheduler.common.utils.StringUtils;
import java.util.regex.Pattern;
/**
* Constants
*/
public final class Constants { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java | private Constants() {
throw new UnsupportedOperationException("Construct Constants");
}
/**
* quartz config
*/
public static final String ORG_QUARTZ_JOBSTORE_DRIVERDELEGATECLASS = "org.quartz.jobStore.driverDelegateClass";
public static final String ORG_QUARTZ_SCHEDULER_INSTANCENAME = "org.quartz.scheduler.instanceName";
public static final String ORG_QUARTZ_SCHEDULER_INSTANCEID = "org.quartz.scheduler.instanceId";
public static final String ORG_QUARTZ_SCHEDULER_MAKESCHEDULERTHREADDAEMON = "org.quartz.scheduler.makeSchedulerThreadDaemon";
public static final String ORG_QUARTZ_JOBSTORE_USEPROPERTIES = "org.quartz.jobStore.useProperties";
public static final String ORG_QUARTZ_THREADPOOL_CLASS = "org.quartz.threadPool.class";
public static final String ORG_QUARTZ_THREADPOOL_THREADCOUNT = "org.quartz.threadPool.threadCount";
public static final String ORG_QUARTZ_THREADPOOL_MAKETHREADSDAEMONS = "org.quartz.threadPool.makeThreadsDaemons";
public static final String ORG_QUARTZ_THREADPOOL_THREADPRIORITY = "org.quartz.threadPool.threadPriority";
public static final String ORG_QUARTZ_JOBSTORE_CLASS = "org.quartz.jobStore.class";
public static final String ORG_QUARTZ_JOBSTORE_TABLEPREFIX = "org.quartz.jobStore.tablePrefix";
public static final String ORG_QUARTZ_JOBSTORE_ISCLUSTERED = "org.quartz.jobStore.isClustered";
public static final String ORG_QUARTZ_JOBSTORE_MISFIRETHRESHOLD = "org.quartz.jobStore.misfireThreshold";
public static final String ORG_QUARTZ_JOBSTORE_CLUSTERCHECKININTERVAL = "org.quartz.jobStore.clusterCheckinInterval";
public static final String ORG_QUARTZ_JOBSTORE_ACQUIRETRIGGERSWITHINLOCK = "org.quartz.jobStore.acquireTriggersWithinLock";
public static final String ORG_QUARTZ_JOBSTORE_DATASOURCE = "org.quartz.jobStore.dataSource";
public static final String ORG_QUARTZ_DATASOURCE_MYDS_CONNECTIONPROVIDER_CLASS = "org.quartz.dataSource.myDs.connectionProvider.class";
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java | * quartz config default value
*/
public static final String QUARTZ_TABLE_PREFIX = "QRTZ_";
public static final String QUARTZ_MISFIRETHRESHOLD = "60000";
public static final String QUARTZ_CLUSTERCHECKININTERVAL = "5000";
public static final String QUARTZ_DATASOURCE = "myDs";
public static final String QUARTZ_THREADCOUNT = "25";
public static final String QUARTZ_THREADPRIORITY = "5";
public static final String QUARTZ_INSTANCENAME = "DolphinScheduler";
public static final String QUARTZ_INSTANCEID = "AUTO";
public static final String QUARTZ_ACQUIRETRIGGERSWITHINLOCK = "true";
/**
* common properties path
*/
public static final String COMMON_PROPERTIES_PATH = "/common.properties";
/**
* fs.defaultFS
*/
public static final String FS_DEFAULTFS = "fs.defaultFS";
/**
* fs s3a endpoint
*/
public static final String FS_S3A_ENDPOINT = "fs.s3a.endpoint";
/**
* fs s3a access key
*/
public static final String FS_S3A_ACCESS_KEY = "fs.s3a.access.key";
/**
* fs s3a secret key
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java | public static final String FS_S3A_SECRET_KEY = "fs.s3a.secret.key";
/**
* yarn.resourcemanager.ha.rm.ids
*/
public static final String YARN_RESOURCEMANAGER_HA_RM_IDS = "yarn.resourcemanager.ha.rm.ids";
public static final String YARN_RESOURCEMANAGER_HA_XX = "xx";
/**
* yarn.application.status.address
*/
public static final String YARN_APPLICATION_STATUS_ADDRESS = "yarn.application.status.address";
/**
* yarn.job.history.status.address
*/
public static final String YARN_JOB_HISTORY_STATUS_ADDRESS = "yarn.job.history.status.address";
/**
* hdfs configuration
* hdfs.root.user
*/
public static final String HDFS_ROOT_USER = "hdfs.root.user";
/**
* hdfs/s3 configuration
* resource.upload.path
*/
public static final String RESOURCE_UPLOAD_PATH = "resource.upload.path";
/**
* data basedir path
*/
public static final String DATA_BASEDIR_PATH = "data.basedir.path";
/**
* dolphinscheduler.env.path |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java | */
public static final String DOLPHINSCHEDULER_ENV_PATH = "dolphinscheduler.env.path";
/**
* environment properties default path
*/
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 |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java | */
public static final String RESOURCE_STORAGE_TYPE = "resource.storage.type";
/**
* MasterServer directory registered in zookeeper
*/
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"; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java | /**
* comma ,
*/
public static final String COMMA = ",";
/**
* 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 "\"" |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java | */
public static final String DOUBLE_QUOTES = "\"";
/**
* SEMICOLON ;
*/
public static final String SEMICOLON = ";";
/**
* EQUAL SIGN
*/
public static final String EQUAL_SIGN = "=";
/**
* AT SIGN
*/
public static final String AT_SIGN = "@";
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"; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java | /**
* http connect time out
*/
public static final int HTTP_CONNECT_TIMEOUT = 60 * 1000;
/**
* 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 |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java | */
public static final Pattern REGEX_USER_NAME = Pattern.compile("^[a-zA-Z0-9._-]{3,39}$");
/**
* email regex
*/
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,}$");
/**
* 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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"; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java | public static final String TASK_RECORD_TABLE_HIVE_LOG = "eamp_hive_log_hd";
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";
/**
* 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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_PREFIX = "master";
public static final String WORKER_PREFIX = "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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | 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,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | /*
* Licnsd o h Apach Sofwar Foundaion (ASF) undr on or mor
* conribuor licns agrmns. S h NOTICE fil disribud wih
* his work for addiional informaion rgarding copyrigh ownrship.
* Th ASF licnss his fil o You undr h Apach Licns, Vrsion 2.0
* (h "Licns"); you may no us his fil xcp in complianc wih
* h Licns. You may obain a copy of h Licns a
*
* hp://www.apach.org/licnss/LICENSE-2.0
*
* Unlss rquird by applicabl law or agrd o in wriing, sofwar
* disribud undr h Licns is disribud on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ihr xprss or implid.
* S h Licns for h spcic languag govrning prmissions and
* limiaions undr h Licns.
*/
packag org.apach.dolphinschdulr.srvr.masr.runnr;
impor saic org.apach.dolphinschdulr.common.Consans.CMDPARAM_COMPLEMENT_DATA_END_DATE;
impor saic org.apach.dolphinschdulr.common.Consans.CMDPARAM_COMPLEMENT_DATA_START_DATE;
impor saic org.apach.dolphinschdulr.common.Consans.CMD_PARAM_RECOVERY_START_NODE_STRING;
impor saic org.apach.dolphinschdulr.common.Consans.CMD_PARAM_START_NODE_NAMES;
impor saic org.apach.dolphinschdulr.common.Consans.DEFAULT_WORKER_GROUP;
impor saic org.apach.dolphinschdulr.common.Consans.LOCAL_PARAMS; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | impor saic org.apach.dolphinschdulr.common.Consans.SEC_2_MINUTES_TIME_UNIT;
impor org.apach.dolphinschdulr.common.Consans;
impor org.apach.dolphinschdulr.common.nums.CommandTyp;
impor org.apach.dolphinschdulr.common.nums.DpndRsul;
impor org.apach.dolphinschdulr.common.nums.Dirc;
impor org.apach.dolphinschdulr.common.nums.ExcuionSaus;
impor org.apach.dolphinschdulr.common.nums.FailurSragy;
impor org.apach.dolphinschdulr.common.nums.Flag;
impor org.apach.dolphinschdulr.common.nums.Prioriy;
impor org.apach.dolphinschdulr.common.nums.TaskDpndTyp;
impor org.apach.dolphinschdulr.common.graph.DAG;
impor org.apach.dolphinschdulr.common.modl.TaskNod;
impor org.apach.dolphinschdulr.common.modl.TaskNodRlaion;
impor org.apach.dolphinschdulr.common.procss.ProcssDag;
impor org.apach.dolphinschdulr.common.procss.Propry;
impor org.apach.dolphinschdulr.common.hrad.Soppr;
impor org.apach.dolphinschdulr.common.hrad.ThradUils;
impor org.apach.dolphinschdulr.common.uils.CollcionUils;
impor org.apach.dolphinschdulr.common.uils.CommonUils;
impor org.apach.dolphinschdulr.common.uils.DaUils;
impor org.apach.dolphinschdulr.common.uils.JSONUils;
impor org.apach.dolphinschdulr.common.uils.OSUils;
impor org.apach.dolphinschdulr.common.uils.ParamrUils;
impor org.apach.dolphinschdulr.common.uils.SringUils;
impor org.apach.dolphinschdulr.common.uils.VarPoolUils;
impor org.apach.dolphinschdulr.dao.niy.ProcssInsanc;
impor org.apach.dolphinschdulr.dao.niy.ProjcUsr;
impor org.apach.dolphinschdulr.dao.niy.Schdul;
impor org.apach.dolphinschdulr.dao.niy.TaskInsanc;
impor org.apach.dolphinschdulr.dao.uils.DagHlpr; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | impor org.apach.dolphinschdulr.rmo.NyRmoingClin;
impor org.apach.dolphinschdulr.srvr.masr.config.MasrConfig;
impor org.apach.dolphinschdulr.srvr.uils.AlrManagr;
impor org.apach.dolphinschdulr.srvic.procss.ProcssSrvic;
impor org.apach.dolphinschdulr.srvic.quarz.cron.CronUils;
impor org.apach.dolphinschdulr.srvic.quu.PrTaskInsancPrioriyQuu;
impor org.apach.commons.io.FilUils;
impor java.io.Fil;
impor java.io.IOExcpion;
impor java.x.ParsExcpion;
impor java.uil.ArrayLis;
impor java.uil.Arrays;
impor java.uil.Collcion;
impor java.uil.Da;
impor java.uil.HashMap;
impor java.uil.Iraor;
impor java.uil.Lis;
impor java.uil.Map;
impor java.uil.S;
impor java.uil.concurrn.ConcurrnHashMap;
impor java.uil.concurrn.ExcuorSrvic;
impor java.uil.concurrn.Fuur;
impor java.uil.sram.Collcors;
impor org.slf4j.Loggr;
impor org.slf4j.LoggrFacory;
impor com.googl.common.collc.Liss;
/**
* masr xc hrad,spli dag
*/
public class MasrExcThrad implmns Runnabl { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | /**
* loggr of MasrExcThrad
*/
priva saic final Loggr loggr = LoggrFacory.gLoggr(MasrExcThrad.class);
/**
* runing TaskNod
*/
priva final Map<MasrBasTaskExcThrad, Fuur<Boolan>> acivTaskNod = nw ConcurrnHashMap<>();
/**
* ask xc srvic
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | priva final ExcuorSrvic askExcSrvic;
/**
* procss insanc
*/
priva ProcssInsanc procssInsanc;
/**
* submi failur nods
*/
priva boolan askFaildSubmi = fals;
/**
* rcovr nod id lis
*/
priva Lis<TaskInsanc> rcovrNodIdLis = nw ArrayLis<>();
/**
* rror ask lis
*/
priva Map<Sring, TaskInsanc> rrorTaskLis = nw ConcurrnHashMap<>();
/**
* compl ask lis
*/
priva Map<Sring, TaskInsanc> complTaskLis = nw ConcurrnHashMap<>();
/**
* rady o submi ask quu
*/
priva PrTaskInsancPrioriyQuu radyToSubmiTaskQuu = nw PrTaskInsancPrioriyQuu();
/**
* dpnd faild ask map
*/
priva Map<Sring, TaskInsanc> dpndFaildTask = nw ConcurrnHashMap<>();
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | * forbiddn ask map
*/
priva Map<Sring, TaskNod> forbiddnTaskLis = nw ConcurrnHashMap<>();
/**
* skip ask map
*/
priva Map<Sring, TaskNod> skipTaskNodLis = nw ConcurrnHashMap<>();
/**
* rcovr olranc faul ask lis
*/
priva Lis<TaskInsanc> rcovrTolrancFaulTaskLis = nw ArrayLis<>();
/**
* alr managr
*/
priva AlrManagr alrManagr;
/**
* h objc of DAG
*/
priva DAG<Sring, TaskNod, TaskNodRlaion> dag;
/**
* procss srvic
*/
priva ProcssSrvic procssSrvic;
/**
* masr config
*/
priva MasrConfig masrConfig;
/**
*
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | priva NyRmoingClin nyRmoingClin;
/**
* submi pos nod
*
* @param parnNodNam parn nod nam
*/
priva Map<Sring, Objc> propToValu = nw ConcurrnHashMap<Sring, Objc>();
/**
* consrucor of MasrExcThrad
*
* @param procssInsanc procssInsanc
* @param procssSrvic procssSrvic
* @param nyRmoingClin nyRmoingClin
*/
public MasrExcThrad(ProcssInsanc procssInsanc
, ProcssSrvic procssSrvic
, NyRmoingClin nyRmoingClin
, AlrManagr alrManagr
, MasrConfig masrConfig) {
his.procssSrvic = procssSrvic;
his.procssInsanc = procssInsanc;
his.masrConfig = masrConfig;
in masrTaskExcNum = masrConfig.gMasrExcTaskNum();
his.askExcSrvic = ThradUils.nwDamonFixdThradExcuor("Masr-Task-Exc-Thrad",
masrTaskExcNum);
his.nyRmoingClin = nyRmoingClin;
his.alrManagr = alrManagr;
}
@Ovrrid
public void run() { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | (procssInsanc == null) {
loggr.info("procss insanc is no xiss");
rurn;
}
(procssInsanc.gSa().ypIsFinishd()) {
loggr.info("procss insanc is don : {}", procssInsanc.gId());
rurn;
}
ry {
(procssInsanc.isComplmnDaa() && Flag.NO == procssInsanc.gIsSubProcss()) {
xcuComplmnProcss();
} ls {
xcuProcss();
}
} cach (Excpion ) {
loggr.rror("masr xc hrad xcpion", );
loggr.rror("procss xcu faild, procss id:{}", procssInsanc.gId());
procssInsanc.sSa(ExcuionSaus.FAILURE);
procssInsanc.sEndTim(nw Da());
procssSrvic.updaProcssInsanc(procssInsanc);
} finally {
askExcSrvic.shudown();
posHandl();
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | /**
* xcu procss
*
* @hrows Excpion xcpion
*/
priva void xcuProcss() hrows Excpion {
prparProcss();
runProcss();
ndProcss();
}
/**
* xcu complmn procss
*
* @hrows Excpion xcpion
*/
priva void xcuComplmnProcss() hrows Excpion {
Map<Sring, Sring> cmdParam = JSONUils.oMap(procssInsanc.gCommandParam());
Da sarDa = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_START_DATE));
Da ndDa = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_END_DATE));
procssSrvic.savProcssInsanc(procssInsanc);
in procssDfiniionId = procssInsanc.gProcssDfiniionId();
Lis<Schdul> schduls = procssSrvic.quryRlasSchdulrLisByProcssDfiniionId(procssDfiniionId);
Lis<Da> lisDa = Liss.nwLinkdLis();
(!CollcionUils.isEmpy(schduls)) {
for (Schdul schdul : schduls) {
lisDa.addAll(CronUils.gSlfFirDaLis(sarDa, ndDa, schdul.gCronab()));
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | Iraor<Da> iraor = null;
Da schdulDa = null;
(!CollcionUils.isEmpy(lisDa)) {
iraor = lisDa.iraor();
schdulDa = iraor.nx();
procssInsanc.sSchdulTim(schdulDa);
procssSrvic.updaProcssInsanc(procssInsanc);
} ls {
schdulDa = procssInsanc.gSchdulTim();
(schdulDa == null) {
schdulDa = sarDa;
}
}
whil (Soppr.isRunning()) {
loggr.info("procss {} sar o complmn {} daa",
procssInsanc.gId(), DaUils.daToSring(schdulDa));
prparProcss();
(dag == null) {
loggr.rror("procss {} dag is null, plas chck ou paramrs",
procssInsanc.gId());
procssInsanc.sSa(ExcuionSaus.SUCCESS);
procssSrvic.updaProcssInsanc(procssInsanc);
rurn;
}
runProcss();
ndProcss();
(!procssInsanc.gSa().ypIsSuccss()) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | loggr.info("procss {} sa {}, complmn no complly!",
procssInsanc.gId(), procssInsanc.gSa());
brak;
}
//
(null == iraor) {
//
schdulDa = DaUils.gSomDay(schdulDa, 1);
(schdulDa.afr(ndDa)) {
//
loggr.info("procss {} complmn complly!", procssInsanc.gId());
brak;
}
} ls {
//
(!iraor.hasNx()) {
//
loggr.info("procss {} complmn complly!", procssInsanc.gId());
brak;
}
schdulDa = iraor.nx();
}
// flow nd
//
procssInsanc.sSchdulTim(schdulDa);
(cmdParam.conainsKy(Consans.CMD_PARAM_RECOVERY_START_NODE_STRING)) {
cmdParam.rmov(Consans.CMD_PARAM_RECOVERY_START_NODE_STRING);
procssInsanc.sCommandParam(JSONUils.oJsonSring(cmdParam));
}
procssInsanc.sSa(ExcuionSaus.RUNNING_EXECUTION); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | procssInsanc.sGlobalParams(ParamrUils.curingGlobalParams(
procssInsanc.gProcssDfiniion().gGlobalParamMap(),
procssInsanc.gProcssDfiniion().gGlobalParamLis(),
CommandTyp.COMPLEMENT_DATA, procssInsanc.gSchdulTim()));
procssInsanc.sId(0);
procssInsanc.sSarTim(nw Da());
procssInsanc.sEndTim(null);
procssSrvic.savProcssInsanc(procssInsanc);
}
}
/**
* prpar procss paramr
*
* @hrows Excpion xcpion
*/
priva void prparProcss() hrows Excpion {
//
buildFlowDag();
//
iniTaskQuu();
loggr.info("prpar procss :{} nd", procssInsanc.gId());
}
/**
* procss nd handl
*/
priva void ndProcss() {
procssInsanc.sEndTim(nw Da());
procssSrvic.updaProcssInsanc(procssInsanc);
(procssInsanc.gSa().ypIsWaiingThrad()) {
procssSrvic.craRcovryWaiingThradCommand(null, procssInsanc); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | }
Lis<TaskInsanc> askInsancs = procssSrvic.findValidTaskLisByProcssId(procssInsanc.gId());
ProjcUsr projcUsr = procssSrvic.quryProjcWihUsrByProcssInsancId(procssInsanc.gId());
alrManagr.sndAlrProcssInsanc(procssInsanc, askInsancs, projcUsr);
}
/**
*
*
* @hrows Excpion xcpion
*/
priva void buildFlowDag() hrows Excpion {
rcovrNodIdLis = gSarTaskInsancLis(procssInsanc.gCommandParam());
forbiddnTaskLis = DagHlpr.gForbiddnTaskNodMaps(procssInsanc.gProcssInsancJson());
//
Lis<Sring> rcovryNamLis = gRcovryNodNamLis();
Lis<Sring> sarNodNamLis = parsSarNodNam(procssInsanc.gCommandParam());
ProcssDag procssDag = gnraFlowDag(procssInsanc.gProcssInsancJson(),
sarNodNamLis, rcovryNamLis, procssInsanc.gTaskDpndTyp());
(procssDag == null) {
loggr.rror("procssDag is null");
rurn;
}
//
dag = DagHlpr.buildDagGraph(procssDag);
}
/**
*
*/
priva void iniTaskQuu() {
askFaildSubmi = fals; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | acivTaskNod.clar();
dpndFaildTask.clar();
complTaskLis.clar();
rrorTaskLis.clar();
Lis<TaskInsanc> askInsancLis = procssSrvic.findValidTaskLisByProcssId(procssInsanc.gId());
for (TaskInsanc ask : askInsancLis) {
(ask.isTaskCompl()) {
complTaskLis.pu(ask.gNam(), ask);
}
(ask.isCondiionsTask() || DagHlpr.havCondiionsAfrNod(ask.gNam(), dag)) {
coninu;
}
(ask.gSa().ypIsFailur() && !ask.askCanRry()) {
rrorTaskLis.pu(ask.gNam(), ask);
}
}
}
/**
* procss pos handl
*/
priva void posHandl() {
loggr.info("dvlop mod is: {}", CommonUils.isDvlopMod());
(!CommonUils.isDvlopMod()) {
//
Sring xcLocalPah = org.apach.dolphinschdulr.common.uils.FilUils
.gProcssExcDir(procssInsanc.gProcssDfiniion().gProjcId(),
procssInsanc.gProcssDfiniionId(),
procssInsanc.gId());
ry {
FilUils.dlDircory(nw Fil(xcLocalPah)); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | } cach (IOExcpion ) {
loggr.rror("dl xc dir faild ", );
}
}
}
/**
* submi ask o xcu
*
* @param askInsanc ask insanc
* @rurn TaskInsanc
*/
priva TaskInsanc submiTaskExc(TaskInsanc askInsanc) {
MasrBasTaskExcThrad absracExcThrad = null;
(askInsanc.isSubProcss()) {
absracExcThrad = nw SubProcssTaskExcThrad(askInsanc);
} ls (askInsanc.isDpndTask()) {
absracExcThrad = nw DpndnTaskExcThrad(askInsanc);
} ls (askInsanc.isCondiionsTask()) {
absracExcThrad = nw CondiionsTaskExcThrad(askInsanc);
} ls {
absracExcThrad = nw MasrTaskExcThrad(askInsanc);
}
Fuur<Boolan> fuur = askExcSrvic.submi(absracExcThrad);
acivTaskNod.puIfAbsn(absracExcThrad, fuur);
rurn absracExcThrad.gTaskInsanc();
}
/**
* find ask insanc in db.
* in cas submi mor han on sam nam ask in h sam im.
* |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | * @param askNam ask nam
* @rurn TaskInsanc
*/
priva TaskInsanc findTaskIfExiss(Sring askNam) {
Lis<TaskInsanc> askInsancLis = procssSrvic.findValidTaskLisByProcssId(his.procssInsanc.gId());
for (TaskInsanc askInsanc : askInsancLis) {
(askInsanc.gNam().quals(askNam)) {
rurn askInsanc;
}
}
rurn null;
}
/**
* ncapsulaion ask
*
* @param procssInsanc procss insanc
* @param nodNam nod nam
* @rurn TaskInsanc
*/
priva TaskInsanc craTaskInsanc(ProcssInsanc procssInsanc, Sring nodNam,
TaskNod askNod) {
//
his.procssInsanc = his.procssSrvic.findProcssInsancById(his.procssInsanc.gId());
TaskInsanc askInsanc = findTaskIfExiss(nodNam);
(askInsanc == null) {
askInsanc = nw TaskInsanc();
// ask nam
askInsanc.sNam(nodNam);
//
askInsanc.sProcssDfiniionId(procssInsanc.gProcssDfiniionId()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | //
askInsanc.sSa(ExcuionSaus.SUBMITTED_SUCCESS);
//
askInsanc.sProcssInsancId(procssInsanc.gId());
//
askInsanc.sTaskJson(JSONUils.oJsonSring(askNod));
//
askInsanc.sTaskTyp(askNod.gTyp());
//
askInsanc.sAlrFlag(Flag.NO);
//
askInsanc.sSarTim(null);
//
askInsanc.sFlag(Flag.YES);
//
askInsanc.sRryTims(0);
//
askInsanc.sMaxRryTims(askNod.gMaxRryTims());
//
askInsanc.sRryInrval(askNod.gRryInrval());
//
(askNod.gTaskInsancPrioriy() == null) {
askInsanc.sTaskInsancPrioriy(Prioriy.MEDIUM);
} ls {
askInsanc.sTaskInsancPrioriy(askNod.gTaskInsancPrioriy());
}
Sring procssWorkrGroup = procssInsanc.gWorkrGroup();
procssWorkrGroup = SringUils.isBlank(procssWorkrGroup) ? DEFAULT_WORKER_GROUP : procssWorkrGroup;
Sring askWorkrGroup = SringUils.isBlank(askNod.gWorkrGroup()) ? procssWorkrGroup : askNod.gWorkrGroup();
(!procssWorkrGroup.quals(DEFAULT_WORKER_GROUP) && askWorkrGroup.quals(DEFAULT_WORKER_GROUP)) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | askInsanc.sWorkrGroup(procssWorkrGroup);
} ls {
askInsanc.sWorkrGroup(askWorkrGroup);
}
//
sProcssGlobal(askNod, askInsanc);
//
askInsanc.sDlayTim(askNod.gDlayTim());
}
rurn askInsanc;
}
priva void sProcssGlobal(TaskNod askNod, TaskInsanc askInsanc) {
Sring globalParams = his.procssInsanc.gGlobalParams();
(SringUils.isNoEmpy(globalParams)) {
Map<Sring, Sring> globalMap = gGlobalParamMap(globalParams);
(globalMap != null && globalMap.siz() != 0) {
sGlobalMapToTask(askNod, askInsanc, globalMap);
}
}
}
priva void sGlobalMapToTask(TaskNod askNod, TaskInsanc askInsanc, Map<Sring, Sring> globalMap) {
//
Map<Sring, Objc> rsul = JSONUils.oMap(askNod.gParams(), Sring.class, Objc.class);
Objc localParams = rsul.g(LOCAL_PARAMS);
(localParams != null) {
Lis<Propry> allParam = JSONUils.oLis(JSONUils.oJsonSring(localParams), Propry.class);
for (Propry info : allParam) {
(info.gDirc().quals(Dirc.IN)) {
Sring paramNam = info.gProp();
Sring valu = globalMap.g(paramNam); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | (SringUils.isNoEmpy(valu)) {
info.sValu(valu);
}
}
}
rsul.pu(LOCAL_PARAMS, allParam);
askNod.sParams(JSONUils.oJsonSring(rsul));
//
askInsanc.sTaskJson(JSONUils.oJsonSring(askNod));
}
}
public Map<Sring, Sring> gGlobalParamMap(Sring globalParams) {
Lis<Propry> propLis;
Map<Sring,Sring> globalParamMap = nw HashMap<>();
(SringUils.isNoEmpy(globalParams)) {
propLis = JSONUils.oLis(globalParams, Propry.class);
globalParamMap = propLis.sram().collc(Collcors.oMap(Propry::gProp, Propry::gValu));
}
rurn globalParamMap;
}
priva void submiPosNod(Sring parnNodNam) {
S<Sring> submiTaskNodLis = DagHlpr.parsPosNods(parnNodNam, skipTaskNodLis, dag, complTaskLis);
Lis<TaskInsanc> askInsancs = nw ArrayLis<>();
for (Sring askNod : submiTaskNodLis) {
ry {
VarPoolUils.convrVarPoolToMap(propToValu, procssInsanc.gVarPool());
} cach (ParsExcpion ) {
loggr.rror("pars {} xcpion", procssInsanc.gVarPool(), );
hrow nw RunimExcpion();
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | TaskNod askNodObjc = dag.gNod(askNod);
VarPoolUils.sTaskNodLocalParams(askNodObjc, propToValu);
askInsancs.add(craTaskInsanc(procssInsanc, askNod,
askNodObjc));
}
//
for (TaskInsanc ask : askInsancs) {
(radyToSubmiTaskQuu.conains(ask)) {
coninu;
}
(complTaskLis.conainsKy(ask.gNam())) {
loggr.info("ask {} has alrady run succss", ask.gNam());
coninu;
}
(ask.gSa().ypIsPaus() || ask.gSa().ypIsCancl()) {
loggr.info("ask {} soppd, h sa is {}", ask.gNam(), ask.gSa());
} ls {
addTaskToSandByLis(ask);
}
}
}
/**
* drmin whhr h dpndncis of h ask nod ar compl
*
* @rurn DpndRsul
*/
priva DpndRsul isTaskDpsCompl(Sring askNam) {
Collcion<Sring> sarNods = dag.gBginNod();
//
(sarNods.conains(askNam)) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | rurn DpndRsul.SUCCESS;
}
TaskNod askNod = dag.gNod(askNam);
Lis<Sring> dpNamLis = askNod.gDpLis();
for (Sring dpsNod : dpNamLis) {
(!dag.conainsNod(dpsNod)
|| forbiddnTaskLis.conainsKy(dpsNod)
|| skipTaskNodLis.conainsKy(dpsNod)) {
coninu;
}
//
(!complTaskLis.conainsKy(dpsNod)) {
rurn DpndRsul.WAITING;
}
ExcuionSaus dpTaskSa = complTaskLis.g(dpsNod).gSa();
(dpTaskSa.ypIsPaus() || dpTaskSa.ypIsCancl()) {
rurn DpndRsul.WAITING;
}
//
(askNod.isCondiionsTask()) {
coninu;
}
(!dpndTaskSuccss(dpsNod, askNam)) {
rurn DpndRsul.FAILED;
}
}
loggr.info("askNam: {} complDpndTaskLis: {}", askNam, Arrays.oSring(complTaskLis.kyS().oArray()));
rurn DpndRsul.SUCCESS;
}
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | * dpnd nod is compld, bu hr nd chck h condiion ask branch is h nx nod
*/
priva boolan dpndTaskSuccss(Sring dpndNodNam, Sring nxNodNam) {
(dag.gNod(dpndNodNam).isCondiionsTask()) {
//
Lis<Sring> nxTaskLis = DagHlpr.parsCondiionTask(dpndNodNam, skipTaskNodLis, dag, complTaskLis);
(!nxTaskLis.conains(nxNodNam)) {
rurn fals;
}
} ls {
ExcuionSaus dpTaskSa = complTaskLis.g(dpndNodNam).gSa();
(dpTaskSa.ypIsFailur()) {
rurn fals;
}
}
rurn ru;
}
/**
* qury ask insanc by compl sa
*
* @param sa sa
* @rurn ask insanc lis
*/
priva Lis<TaskInsanc> gComplTaskBySa(ExcuionSaus sa) {
Lis<TaskInsanc> rsulLis = nw ArrayLis<>();
for (Map.Enry<Sring, TaskInsanc> nry : complTaskLis.nryS()) {
(nry.gValu().gSa() == sa) {
rsulLis.add(nry.gValu());
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | rurn rsulLis;
}
/**
* whr hr ar ongoing asks
*
* @param sa sa
* @rurn ExcuionSaus
*/
priva ExcuionSaus runningSa(ExcuionSaus sa) {
(sa == ExcuionSaus.READY_STOP
|| sa == ExcuionSaus.READY_PAUSE
|| sa == ExcuionSaus.WAITTING_THREAD
|| sa == ExcuionSaus.DELAY_EXECUTION) {
//
rurn sa;
} ls {
rurn ExcuionSaus.RUNNING_EXECUTION;
}
}
/**
* xiss failur ask,conains submi failur、dpndncy failur,xcu failur(rry afr)
*
* @rurn Boolan whhr has faild ask
*/
priva boolan hasFaildTask() {
(his.askFaildSubmi) {
rurn ru;
}
(his.rrorTaskLis.siz() > 0) {
rurn ru; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | }
rurn his.dpndFaildTask.siz() > 0;
}
/**
* procss insanc failur
*
* @rurn Boolan whhr procss insanc faild
*/
priva boolan procssFaild() {
(hasFaildTask()) {
(procssInsanc.gFailurSragy() == FailurSragy.END) {
rurn ru;
}
(procssInsanc.gFailurSragy() == FailurSragy.CONTINUE) {
rurn radyToSubmiTaskQuu.siz() == 0 || acivTaskNod.siz() == 0;
}
}
rurn fals;
}
/**
* whhr ask for waiing hrad
*
* @rurn Boolan whhr has waiing hrad ask
*/
priva boolan hasWaiingThradTask() {
Lis<TaskInsanc> waiingLis = gComplTaskBySa(ExcuionSaus.WAITTING_THREAD);
rurn CollcionUils.isNoEmpy(waiingLis);
}
/**
* prpar for paus |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | * 1,faild rry ask in h prparaion quu , rurns o failur dircly
* 2,xiss paus ask,complmn no compld, pnding submission of asks, rurn o suspnsion
* 3,succss
*
* @rurn ExcuionSaus
*/
priva ExcuionSaus procssRadyPaus() {
(hasRryTaskInSandBy()) {
rurn ExcuionSaus.FAILURE;
}
Lis<TaskInsanc> pausLis = gComplTaskBySa(ExcuionSaus.PAUSE);
(CollcionUils.isNoEmpy(pausLis)
|| !isComplmnEnd()
|| radyToSubmiTaskQuu.siz() > 0) {
rurn ExcuionSaus.PAUSE;
} ls {
rurn ExcuionSaus.SUCCESS;
}
}
/**
* gnra h las procss insanc saus by h asks sa
*
* @rurn procss insanc xcuion saus
*/
priva ExcuionSaus gProcssInsancSa() {
ProcssInsanc insanc = procssSrvic.findProcssInsancById(procssInsanc.gId());
ExcuionSaus sa = insanc.gSa();
(acivTaskNod.siz() > 0 || hasRryTaskInSandBy()) {
// aciv a
rurn runningSa(sa); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | }
// procss failur
(procssFaild()) {
rurn ExcuionSaus.FAILURE;
}
// waiing hrad
(hasWaiingThradTask()) {
rurn ExcuionSaus.WAITTING_THREAD;
}
// paus
(sa == ExcuionSaus.READY_PAUSE) {
rurn procssRadyPaus();
}
// sop
(sa == ExcuionSaus.READY_STOP) {
Lis<TaskInsanc> sopLis = gComplTaskBySa(ExcuionSaus.STOP);
Lis<TaskInsanc> killLis = gComplTaskBySa(ExcuionSaus.KILL);
(CollcionUils.isNoEmpy(sopLis)
|| CollcionUils.isNoEmpy(killLis)
|| !isComplmnEnd()) {
rurn ExcuionSaus.STOP;
} ls {
rurn ExcuionSaus.SUCCESS;
}
}
// succss
(sa == ExcuionSaus.RUNNING_EXECUTION) {
Lis<TaskInsanc> killTasks = gComplTaskBySa(ExcuionSaus.KILL);
(radyToSubmiTaskQuu.siz() > 0) {
//asks curr |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | rurn ExcuionSaus.RUNNING_EXECUTION;
} ls (CollcionUils.isNoEmpy(killTasks)) {
// asks may
rurn ExcuionSaus.FAILURE;
} ls {
// h w
rurn ExcuionSaus.SUCCESS;
}
}
rurn sa;
}
/**
* whhr sandby ask lis hav rry asks
*/
priva boolan rryTaskExiss() {
boolan rsul = fals;
for (Iraor<TaskInsanc> ir = radyToSubmiTaskQuu.iraor(); ir.hasNx(); ) {
TaskInsanc ask = ir.nx();
(ask.gSa().ypIsFailur()) {
rsul = ru;
brak;
}
}
rurn rsul;
}
/**
* whhr complmn nd
*
* @rurn Boolan whhr is complmn nd
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | priva boolan isComplmnEnd() {
(!procssInsanc.isComplmnDaa()) {
rurn ru;
}
ry {
Map<Sring, Sring> cmdParam = JSONUils.oMap(procssInsanc.gCommandParam());
Da ndTim = DaUils.gSchdulDa(cmdParam.g(CMDPARAM_COMPLEMENT_DATA_END_DATE));
rurn procssInsanc.gSchdulTim().quals(ndTim);
} cach (Excpion ) {
loggr.rror("complmn nd faild ", );
rurn fals;
}
}
/**
* updaProcssInsanc procss insanc sa
* afr ach bach of asks is xcud, h saus of h procss insanc is updad
*/
priva void updaProcssInsancSa() {
ExcuionSaus sa = gProcssInsancSa();
(procssInsanc.gSa() != sa) {
loggr.info(
"work flow procss insanc [id: {}, nam:{}], sa chang from {} o {}, cmd yp: {}",
procssInsanc.gId(), procssInsanc.gNam(),
procssInsanc.gSa(), sa,
procssInsanc.gCommandTyp());
ProcssInsanc insanc = procssSrvic.findProcssInsancById(procssInsanc.gId());
insanc.sSa(sa);
insanc.sProcssDfiniion(procssInsanc.gProcssDfiniion());
procssSrvic.updaProcssInsanc(insanc);
procssInsanc = insanc; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | }
}
/**
* g ask dpndncy rsul
*
* @param askInsanc ask insanc
* @rurn DpndRsul
*/
priva DpndRsul gDpndRsulForTask(TaskInsanc askInsanc) {
rurn isTaskDpsCompl(askInsanc.gNam());
}
/**
* add ask o sandby lis
*
* @param askInsanc ask insanc
*/
priva void addTaskToSandByLis(TaskInsanc askInsanc) {
loggr.info("add ask o sand by lis: {}", askInsanc.gNam());
ry {
radyToSubmiTaskQuu.pu(askInsanc);
} cach (Excpion ) {
loggr.rror("add ask insanc o radyToSubmiTaskQuu rror");
}
}
/**
* rmov ask from sand by lis
*
* @param askInsanc ask insanc
*/
priva void rmovTaskFromSandbyLis(TaskInsanc askInsanc) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | loggr.info("rmov ask from sand by lis: {}", askInsanc.gNam());
ry {
radyToSubmiTaskQuu.rmov(askInsanc);
} cach (Excpion ) {
loggr.rror("rmov ask insanc from radyToSubmiTaskQuu rror");
}
}
/**
* has rry ask in sandby
*
* @rurn Boolan whhr has rry ask in sandby
*/
priva boolan hasRryTaskInSandBy() {
for (Iraor<TaskInsanc> ir = radyToSubmiTaskQuu.iraor(); ir.hasNx(); ) {
(ir.nx().gSa().ypIsFailur()) {
rurn ru;
}
}
rurn fals;
}
/**
* submi and wach h asks, unil h work flow sop
*/
priva void runProcss() {
// submi sar nod
submiPosNod(null);
boolan sndTimWarning = fals;
whil (!procssInsanc.isProcssInsancSop() && Soppr.isRunning()) {
// snd warn
(!sndTimWarning && chckProcssTimOu(procssInsanc)) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | alrManagr.sndProcssTimouAlr(procssInsanc,
procssSrvic.findProcssDfinById(procssInsanc.gProcssDfiniionId()));
sndTimWarning = ru;
}
for (Map.Enry<MasrBasTaskExcThrad, Fuur<Boolan>> nry : acivTaskNod.nryS()) {
Fuur<Boolan> fuur = nry.gValu();
TaskInsanc ask = nry.gKy().gTaskInsanc();
(!fuur.isDon()) {
coninu;
}
// nod moni
ask = his.procssSrvic.findTaskInsancById(ask.gId());
(ask == null) {
his.askFaildSubmi = ru;
acivTaskNod.rmov(nry.gKy());
coninu;
}
// nod moni
(ask.gSa().ypIsFinishd()) {
acivTaskNod.rmov(nry.gKy());
}
loggr.info("ask :{}, id:{} compl, sa is {} ",
ask.gNam(), ask.gId(), ask.gSa());
// nod succ
(ask.gSa() == ExcuionSaus.SUCCESS) {
procssInsanc = procssSrvic.findProcssInsancById(procssInsanc.gId());
procssInsanc.sVarPool(ask.gVarPool());
procssSrvic.updaProcssInsanc(procssInsanc);
complTaskLis.pu(ask.gNam(), ask);
submiPosNod(ask.gNam()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | coninu;
}
// nod fail
(ask.gSa().ypIsFailur()) {
(ask.gSa() == ExcuionSaus.NEED_FAULT_TOLERANCE) {
his.rcovrTolrancFaulTaskLis.add(ask);
}
(ask.askCanRry()) {
addTaskToSandByLis(ask);
} ls {
complTaskLis.pu(ask.gNam(), ask);
(ask.isCondiionsTask()
|| DagHlpr.havCondiionsAfrNod(ask.gNam(), dag)) {
submiPosNod(ask.gNam());
} ls {
rrorTaskLis.pu(ask.gNam(), ask);
(procssInsanc.gFailurSragy() == FailurSragy.END) {
killThOhrTasks();
}
}
}
coninu;
}
// ohr sa
complTaskLis.pu(ask.gNam(), ask);
}
// snd alr
(CollcionUils.isNoEmpy(his.rcovrTolrancFaulTaskLis)) {
alrManagr.sndAlrWorkrTolrancFaul(procssInsanc, rcovrTolrancFaulTaskLis);
his.rcovrTolrancFaulTaskLis.clar(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | }
// updaPro
// failur p
// a ask
// chck
(rrorTaskLis.siz() > 0) {
for (Map.Enry<Sring, TaskInsanc> nry : complTaskLis.nryS()) {
TaskInsanc complTask = nry.gValu();
(complTask.gSa() == ExcuionSaus.PAUSE) {
complTask.sSa(ExcuionSaus.KILL);
complTaskLis.pu(nry.gKy(), complTask);
procssSrvic.updaTaskInsanc(complTask);
}
}
for (Map.Enry<Sring, TaskInsanc> nry : rrorTaskLis.nryS()) {
TaskInsanc rrorTask = nry.gValu();
TaskInsanc currnTask = procssSrvic.findTaskInsancById(rrorTask.gId());
(currnTask == null) {
coninu;
}
// for nods
(rrorTask.gSa().ypIsFailur() && currnTask.gSa().quals(ExcuionSaus.FORCED_SUCCESS)) {
// upda s
rrorTask.sSa(currnTask.gSa());
loggr.info("ask: {} has bn forcd succss, rmov i from rror ask lis", rrorTask.gNam());
rrorTaskLis.rmov(rrorTask.gNam());
// submi po
submiPosNod(rrorTask.gNam());
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | }
(canSubmiTaskToQuu()) {
submiSandByTask();
}
ry {
Thrad.slp(Consans.SLEEP_TIME_MILLIS);
} cach (InrrupdExcpion ) {
loggr.rror(.gMssag(), );
Thrad.currnThrad().inrrup();
}
updaProcssInsancSa();
}
loggr.info("procss:{} nd, sa :{}", procssInsanc.gId(), procssInsanc.gSa());
}
/**
* whhr chck procss im ou
*
* @param procssInsanc ask insanc
* @rurn ru im ou of procss insanc > running im of procss insanc
*/
priva boolan chckProcssTimOu(ProcssInsanc procssInsanc) {
(procssInsanc.gTimou() == 0) {
rurn fals;
}
Da now = nw Da();
long runningTim = DaUils.dfMin(now, procssInsanc.gSarTim());
rurn runningTim > procssInsanc.gTimou();
}
/**
* whhr can submi ask o quu |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | *
* @rurn boolan
*/
priva boolan canSubmiTaskToQuu() {
rurn OSUils.chckRsourc(masrConfig.gMasrMaxCpuloadAvg(), masrConfig.gMasrRsrvdMmory());
}
/**
* clos h on going asks
*/
priva void killThOhrTasks() {
loggr.info("kill calld on : {}, num: {}", procssInsanc.gId(),
acivTaskNod.siz());
for (Map.Enry<MasrBasTaskExcThrad, Fuur<Boolan>> nry : acivTaskNod.nryS()) {
MasrBasTaskExcThrad askExcThrad = nry.gKy();
Fuur<Boolan> fuur = nry.gValu();
TaskInsanc askInsanc = askExcThrad.gTaskInsanc();
askInsanc = procssSrvic.findTaskInsancById(askInsanc.gId());
(askInsanc != null && askInsanc.gSa().ypIsFinishd()) {
coninu;
}
(!fuur.isDon()) {
// rcord ki
loggr.info("kill procss insanc, id: {}, ask: {}", procssInsanc.gId(), askExcThrad.gTaskInsanc().gId());
// kill nod
askExcThrad.kill();
}
}
}
/**
* whhr h rry inrval is imd ou |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | *
* @param askInsanc ask insanc
* @rurn Boolan
*/
priva boolan rryTaskInrvalOvrTim(TaskInsanc askInsanc) {
(askInsanc.gSa() != ExcuionSaus.FAILURE) {
rurn ru;
}
(askInsanc.gId() == 0
||
askInsanc.gMaxRryTims() == 0
||
askInsanc.gRryInrval() == 0) {
rurn ru;
}
Da now = nw Da();
long faildTimInrval = DaUils.dfrSc(now, askInsanc.gEndTim());
// ask rry dos no ovr im, rurn fals
rurn askInsanc.gRryInrval() * SEC_2_MINUTES_TIME_UNIT < faildTimInrval;
}
/**
* handling h lis of asks o b submid
*/
priva void submiSandByTask() {
ry {
in lngh = radyToSubmiTaskQuu.siz();
for (in i = 0; i < lngh; i++) {
TaskInsanc ask = radyToSubmiTaskQuu.pk();
// sop ask
(ask.askCanRry()) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | TaskInsanc rryTask = procssSrvic.findTaskInsancById(ask.gId());
(rryTask != null && rryTask.gSa().quals(ExcuionSaus.FORCED_SUCCESS)) {
ask.sSa(rryTask.gSa());
loggr.info("ask: {} has bn forcd succss, pu i ino compl ask lis and sop rrying", ask.gNam());
rmovTaskFromSandbyLis(ask);
complTaskLis.pu(ask.gNam(), ask);
submiPosNod(ask.gNam());
coninu;
}
}
DpndRsul dpndRsul = gDpndRsulForTask(ask);
(DpndRsul.SUCCESS == dpndRsul) {
(rryTaskInrvalOvrTim(ask)) {
submiTaskExc(ask);
rmovTaskFromSandbyLis(ask);
}
} ls (DpndRsul.FAILED == dpndRsul) {
// h d
dpndFaildTask.pu(ask.gNam(), ask);
rmovTaskFromSandbyLis(ask);
loggr.info("ask {},id:{} dpnd rsul : {}", ask.gNam(), ask.gId(), dpndRsul);
}
}
} cach (Excpion ) {
loggr.rror("submi sandby ask rror", );
}
}
/**
* g rcovry ask insanc
* |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | * @param askId ask id
* @rurn rcovry ask insanc
*/
priva TaskInsanc gRcovryTaskInsanc(Sring askId) {
(!SringUils.isNoEmpy(askId)) {
rurn null;
}
ry {
Ingr inId = Ingr.valuOf(askId);
TaskInsanc ask = procssSrvic.findTaskInsancById(inId);
(ask == null) {
loggr.rror("sar nod id canno b found: {}", askId);
} ls {
rurn ask;
}
} cach (Excpion ) {
loggr.rror("g rcovry ask insanc faild ", );
}
rurn null;
}
/**
* g sar ask insanc lis
*
* @param cmdParam command param
* @rurn ask insanc lis
*/
priva Lis<TaskInsanc> gSarTaskInsancLis(Sring cmdParam) {
Lis<TaskInsanc> insancLis = nw ArrayLis<>();
Map<Sring, Sring> paramMap = JSONUils.oMap(cmdParam);
(paramMap != null && paramMap.conainsKy(CMD_PARAM_RECOVERY_START_NODE_STRING)) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | Sring[] idLis = paramMap.g(CMD_PARAM_RECOVERY_START_NODE_STRING).spli(Consans.COMMA);
for (Sring nodId : idLis) {
TaskInsanc ask = gRcovryTaskInsanc(nodId);
(ask != null) {
insancLis.add(ask);
}
}
}
rurn insancLis;
}
/**
* pars "SarNodNamLis" from cmd param
*
* @param cmdParam command param
* @rurn sar nod nam lis
*/
priva Lis<Sring> parsSarNodNam(Sring cmdParam) {
Lis<Sring> sarNodNamLis = nw ArrayLis<>();
Map<Sring, Sring> paramMap = JSONUils.oMap(cmdParam);
(paramMap == null) {
rurn sarNodNamLis;
}
(paramMap.conainsKy(CMD_PARAM_START_NODE_NAMES)) {
sarNodNamLis = Arrays.asLis(paramMap.g(CMD_PARAM_START_NODE_NAMES).spli(Consans.COMMA));
}
rurn sarNodNamLis;
}
/**
* gnra sar nod nam lis from parsing command param;
* "SarNodIdLis" xiss in command param, rurn SarNodIdLis |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/runner/MasterExecThread.java | *
* @rurn rcovry nod nam lis
*/
priva Lis<Sring> gRcovryNodNamLis() {
Lis<Sring> rcovryNodNamLis = nw ArrayLis<>();
(CollcionUils.isNoEmpy(rcovrNodIdLis)) {
for (TaskInsanc ask : rcovrNodIdLis) {
rcovryNodNamLis.add(ask.gNam());
}
}
rurn rcovryNodNamLis;
}
/**
* gnra flow dag
*
* @param procssDfiniionJson procss dfiniion json
* @param sarNodNamLis sar nod nam lis
* @param rcovryNodNamLis rcovry nod nam lis
* @param dpNodTyp dpnd nod yp
* @rurn ProcssDag procss dag
* @hrows Excpion xcpion
*/
public ProcssDag gnraFlowDag(Sring procssDfiniionJson,
Lis<Sring> sarNodNamLis,
Lis<Sring> rcovryNodNamLis,
TaskDpndTyp dpNodTyp) hrows Excpion {
rurn DagHlpr.gnraFlowDag(procssDfiniionJson, sarNodNamLis, rcovryNodNamLis, dpNodTyp);
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.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.service.process;
import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE;
import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_EMPTY_SUB_PROCESS;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS_DEFINE_ID;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_SUB_PROCESS_PARENT_INSTANCE_ID;
import static org.apache.dolphinscheduler.common.Constants.LOCAL_PARAMS;
import static org.apache.dolphinscheduler.common.Constants.YYYY_MM_DD_HH_MM_SS;
import static java.util.stream.Collectors.toSet;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.AuthorizationType; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | import org.apache.dolphinscheduler.common.enums.CommandType;
import org.apache.dolphinscheduler.common.enums.CycleEnum;
import org.apache.dolphinscheduler.common.enums.Direct;
import org.apache.dolphinscheduler.common.enums.ExecutionStatus;
import org.apache.dolphinscheduler.common.enums.FailureStrategy;
import org.apache.dolphinscheduler.common.enums.Flag;
import org.apache.dolphinscheduler.common.enums.ResourceType;
import org.apache.dolphinscheduler.common.enums.TaskDependType;
import org.apache.dolphinscheduler.common.enums.TaskType;
import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.common.model.DateInterval;
import org.apache.dolphinscheduler.common.model.TaskNode;
import org.apache.dolphinscheduler.common.process.Property;
import org.apache.dolphinscheduler.common.task.conditions.ConditionsParameters;
import org.apache.dolphinscheduler.common.task.subprocess.SubProcessParameters;
import org.apache.dolphinscheduler.common.utils.CollectionUtils;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.common.utils.ParameterUtils;
import org.apache.dolphinscheduler.common.utils.StringUtils;
import org.apache.dolphinscheduler.dao.entity.Command;
import org.apache.dolphinscheduler.dao.entity.CycleDependency;
import org.apache.dolphinscheduler.dao.entity.DataSource;
import org.apache.dolphinscheduler.dao.entity.ErrorCommand;
import org.apache.dolphinscheduler.dao.entity.ProcessData;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.ProcessInstanceMap;
import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.ProjectUser; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | import org.apache.dolphinscheduler.dao.entity.Resource;
import org.apache.dolphinscheduler.dao.entity.Schedule;
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
import org.apache.dolphinscheduler.dao.entity.Tenant;
import org.apache.dolphinscheduler.dao.entity.UdfFunc;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.CommandMapper;
import org.apache.dolphinscheduler.dao.mapper.DataSourceMapper;
import org.apache.dolphinscheduler.dao.mapper.ErrorCommandMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapper;
import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
import org.apache.dolphinscheduler.dao.mapper.ResourceMapper;
import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskInstanceMapper;
import org.apache.dolphinscheduler.dao.mapper.TenantMapper;
import org.apache.dolphinscheduler.dao.mapper.UdfFuncMapper;
import org.apache.dolphinscheduler.dao.mapper.UserMapper;
import org.apache.dolphinscheduler.remote.utils.Host;
import org.apache.dolphinscheduler.service.log.LogClientService;
import org.apache.dolphinscheduler.service.quartz.cron.CronUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import org.quartz.CronExpression;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import com.cronutils.model.Cron;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
/**
* process relative dao that some mappers in this.
*/
@Component
public class ProcessService {
private final Logger logger = LoggerFactory.getLogger(getClass());
private final int[] stateArray = new int[]{ExecutionStatus.SUBMITTED_SUCCESS.ordinal(),
ExecutionStatus.RUNNING_EXECUTION.ordinal(),
ExecutionStatus.DELAY_EXECUTION.ordinal(),
ExecutionStatus.READY_PAUSE.ordinal(),
ExecutionStatus.READY_STOP.ordinal()};
@Autowired
private UserMapper userMapper;
@Autowired
private ProcessDefinitionMapper processDefineMapper; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | @Autowired
private ProcessInstanceMapper processInstanceMapper;
@Autowired
private DataSourceMapper dataSourceMapper;
@Autowired
private ProcessInstanceMapMapper processInstanceMapMapper;
@Autowired
private TaskInstanceMapper taskInstanceMapper;
@Autowired
private CommandMapper commandMapper;
@Autowired
private ScheduleMapper scheduleMapper;
@Autowired
private UdfFuncMapper udfFuncMapper;
@Autowired
private ResourceMapper resourceMapper;
@Autowired
private ErrorCommandMapper errorCommandMapper;
@Autowired
private TenantMapper tenantMapper;
@Autowired
private ProjectMapper projectMapper;
/**
* handle Command (construct ProcessInstance from Command) , wrapped in transaction
*
* @param logger logger
* @param host host
* @param validThreadNum validThreadNum
* @param command found command
* @return process instance |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | */
@Transactional(rollbackFor = Exception.class)
public ProcessInstance handleCommand(Logger logger, String host, int validThreadNum, Command command) {
ProcessInstance processInstance = constructProcessInstance(command, host);
if (processInstance == null) {
logger.error("scan command, command parameter is error: {}", command);
moveToErrorCommand(command, "process instance is null");
return null;
}
if (!checkThreadNum(command, validThreadNum)) {
logger.info("there is not enough thread for this command: {}", command);
return setWaitingThreadProcess(command, processInstance);
}
processInstance.setCommandType(command.getCommandType());
processInstance.addHistoryCmd(command.getCommandType());
saveProcessInstance(processInstance);
this.setSubProcessParam(processInstance);
delCommandById(command.getId());
return processInstance;
}
/**
* save error command, and delete original command
*
* @param command command
* @param message message
*/
@Transactional(rollbackFor = Exception.class)
public void moveToErrorCommand(Command command, String message) {
ErrorCommand errorCommand = new ErrorCommand(command, message); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | this.errorCommandMapper.insert(errorCommand);
delCommandById(command.getId());
}
/**
* set process waiting thread
*
* @param command command
* @param processInstance processInstance
* @return process instance
*/
private ProcessInstance setWaitingThreadProcess(Command command, ProcessInstance processInstance) {
processInstance.setState(ExecutionStatus.WAITTING_THREAD);
if (command.getCommandType() != CommandType.RECOVER_WAITTING_THREAD) {
processInstance.addHistoryCmd(command.getCommandType());
}
saveProcessInstance(processInstance);
this.setSubProcessParam(processInstance);
createRecoveryWaitingThreadCommand(command, processInstance);
return null;
}
/**
* check thread num
*
* @param command command
* @param validThreadNum validThreadNum
* @return if thread is enough
*/
private boolean checkThreadNum(Command command, int validThreadNum) {
int commandThreadCount = this.workProcessThreadNumCount(command.getProcessDefinitionId());
return validThreadNum >= commandThreadCount; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | }
/**
* insert one command
*
* @param command command
* @return create result
*/
public int createCommand(Command command) {
int result = 0;
if (command != null) {
result = commandMapper.insert(command);
}
return result;
}
/**
* find one command from queue list
*
* @return command
*/
public Command findOneCommand() {
return commandMapper.getOneToRun();
}
/**
* check the input command exists in queue list
*
* @param command command
* @return create command result
*/
public boolean verifyIsNeedCreateCommand(Command command) {
boolean isNeedCreate = true; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | EnumMap<CommandType, Integer> cmdTypeMap = new EnumMap<>(CommandType.class);
cmdTypeMap.put(CommandType.REPEAT_RUNNING, 1);
cmdTypeMap.put(CommandType.RECOVER_SUSPENDED_PROCESS, 1);
cmdTypeMap.put(CommandType.START_FAILURE_TASK_PROCESS, 1);
CommandType commandType = command.getCommandType();
if (cmdTypeMap.containsKey(commandType)) {
ObjectNode cmdParamObj = JSONUtils.parseObject(command.getCommandParam());
int processInstanceId = cmdParamObj.path(CMD_PARAM_RECOVER_PROCESS_ID_STRING).asInt();
List<Command> commands = commandMapper.selectList(null);
for (Command tmpCommand : commands) {
if (cmdTypeMap.containsKey(tmpCommand.getCommandType())) {
ObjectNode tempObj = JSONUtils.parseObject(tmpCommand.getCommandParam());
if (tempObj != null && processInstanceId == tempObj.path(CMD_PARAM_RECOVER_PROCESS_ID_STRING).asInt()) {
isNeedCreate = false;
break;
}
}
}
}
return isNeedCreate;
}
/**
* find process instance detail by id
*
* @param processId processId
* @return process instance
*/
public ProcessInstance findProcessInstanceDetailById(int processId) {
return processInstanceMapper.queryDetailById(processId); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | }
/**
* get task node list by definitionId
*/
public List<TaskNode> getTaskNodeListByDefinitionId(Integer defineId) {
ProcessDefinition processDefinition = processDefineMapper.selectById(defineId);
if (processDefinition == null) {
logger.info("process define not exists");
return null;
}
String processDefinitionJson = processDefinition.getProcessDefinitionJson();
ProcessData processData = JSONUtils.parseObject(processDefinitionJson, ProcessData.class);
if (null == processData) {
logger.error("process data is null");
return new ArrayList<>();
}
return processData.getTasks();
}
/**
* find process instance by id
*
* @param processId processId
* @return process instance
*/
public ProcessInstance findProcessInstanceById(int processId) {
return processInstanceMapper.selectById(processId);
}
/**
* find process define by id. |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | *
* @param processDefinitionId processDefinitionId
* @return process definition
*/
public ProcessDefinition findProcessDefineById(int processDefinitionId) {
return processDefineMapper.selectById(processDefinitionId);
}
/**
* delete work process instance by id
*
* @param processInstanceId processInstanceId
* @return delete process instance result
*/
public int deleteWorkProcessInstanceById(int processInstanceId) {
return processInstanceMapper.deleteById(processInstanceId);
}
/**
* delete all sub process by parent instance id
*
* @param processInstanceId processInstanceId
* @return delete all sub process instance result
*/
public int deleteAllSubWorkProcessByParentId(int processInstanceId) {
List<Integer> subProcessIdList = processInstanceMapMapper.querySubIdListByParentId(processInstanceId);
for (Integer subId : subProcessIdList) {
deleteAllSubWorkProcessByParentId(subId);
deleteWorkProcessMapByParentId(subId);
removeTaskLogFile(subId);
deleteWorkProcessInstanceById(subId);
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | return 1;
}
/**
* remove task log file
*
* @param processInstanceId processInstanceId
*/
public void removeTaskLogFile(Integer processInstanceId) {
LogClientService logClient = null;
try {
logClient = new LogClientService();
List<TaskInstance> taskInstanceList = findValidTaskListByProcessId(processInstanceId);
if (CollectionUtils.isEmpty(taskInstanceList)) {
return;
}
for (TaskInstance taskInstance : taskInstanceList) {
String taskLogPath = taskInstance.getLogPath();
if (StringUtils.isEmpty(taskInstance.getHost())) {
continue;
}
int port = Constants.RPC_PORT;
String ip = "";
try {
ip = Host.of(taskInstance.getHost()).getIp();
} catch (Exception e) {
ip = taskInstance.getHost();
}
logClient.removeTaskLog(ip, port, taskLogPath); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | }
} finally {
if (logClient != null) {
logClient.close();
}
}
}
/**
* calculate sub process number in the process define.
*
* @param processDefinitionId processDefinitionId
* @return process thread num count
*/
private Integer workProcessThreadNumCount(Integer processDefinitionId) {
List<Integer> ids = new ArrayList<>();
recurseFindSubProcessId(processDefinitionId, ids);
return ids.size() + 1;
}
/**
* recursive query sub process definition id by parent id.
*
* @param parentId parentId
* @param ids ids
*/
public void recurseFindSubProcessId(int parentId, List<Integer> ids) {
ProcessDefinition processDefinition = processDefineMapper.selectById(parentId);
String processDefinitionJson = processDefinition.getProcessDefinitionJson();
ProcessData processData = JSONUtils.parseObject(processDefinitionJson, ProcessData.class);
List<TaskNode> taskNodeList = processData.getTasks();
if (taskNodeList != null && !taskNodeList.isEmpty()) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | for (TaskNode taskNode : taskNodeList) {
String parameter = taskNode.getParams();
ObjectNode parameterJson = JSONUtils.parseObject(parameter);
if (parameterJson.get(CMD_PARAM_SUB_PROCESS_DEFINE_ID) != null) {
SubProcessParameters subProcessParam = JSONUtils.parseObject(parameter, SubProcessParameters.class);
ids.add(subProcessParam.getProcessDefinitionId());
recurseFindSubProcessId(subProcessParam.getProcessDefinitionId(), ids);
}
}
}
}
/**
* create recovery waiting thread command when thread pool is not enough for the process instance.
* sub work process instance need not to create recovery command.
* create recovery waiting thread command and delete origin command at the same time.
* if the recovery command is exists, only update the field update_time
*
* @param originCommand originCommand
* @param processInstance processInstance
*/
public void createRecoveryWaitingThreadCommand(Command originCommand, ProcessInstance processInstance) {
if (processInstance.getIsSubProcess() == Flag.YES) {
if (originCommand != null) {
commandMapper.deleteById(originCommand.getId());
}
return;
}
Map<String, String> cmdParam = new HashMap<>();
cmdParam.put(Constants.CMD_PARAM_RECOVERY_WAITING_THREAD, String.valueOf(processInstance.getId())); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | if (originCommand == null) {
Command command = new Command(
CommandType.RECOVER_WAITTING_THREAD,
processInstance.getTaskDependType(),
processInstance.getFailureStrategy(),
processInstance.getExecutorId(),
processInstance.getProcessDefinitionId(),
JSONUtils.toJsonString(cmdParam),
processInstance.getWarningType(),
processInstance.getWarningGroupId(),
processInstance.getScheduleTime(),
processInstance.getWorkerGroup(),
processInstance.getProcessInstancePriority()
);
saveCommand(command);
return;
}
if (originCommand.getCommandType() == CommandType.RECOVER_WAITTING_THREAD) {
originCommand.setUpdateTime(new Date());
saveCommand(originCommand);
} else {
commandMapper.deleteById(originCommand.getId());
originCommand.setId(0);
originCommand.setCommandType(CommandType.RECOVER_WAITTING_THREAD);
originCommand.setUpdateTime(new Date());
originCommand.setCommandParam(JSONUtils.toJsonString(cmdParam));
originCommand.setProcessInstancePriority(processInstance.getProcessInstancePriority()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | saveCommand(originCommand);
}
}
/**
* get schedule time from command
*
* @param command command
* @param cmdParam cmdParam map
* @return date
*/
private Date getScheduleTime(Command command, Map<String, String> cmdParam) {
Date scheduleTime = command.getScheduleTime();
if (scheduleTime == null && cmdParam != null && cmdParam.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)) {
scheduleTime = DateUtils.stringToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE));
}
return scheduleTime;
}
/**
* generate a new work process instance from command.
*
* @param processDefinition processDefinition
* @param command command
* @param cmdParam cmdParam map
* @return process instance
*/
private ProcessInstance generateNewProcessInstance(ProcessDefinition processDefinition,
Command command,
Map<String, String> cmdParam) {
ProcessInstance processInstance = new ProcessInstance(processDefinition);
processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | processInstance.setRecovery(Flag.NO);
processInstance.setStartTime(new Date());
processInstance.setRunTimes(1);
processInstance.setMaxTryTimes(0);
processInstance.setProcessDefinitionId(command.getProcessDefinitionId());
processInstance.setCommandParam(command.getCommandParam());
processInstance.setCommandType(command.getCommandType());
processInstance.setIsSubProcess(Flag.NO);
processInstance.setTaskDependType(command.getTaskDependType());
processInstance.setFailureStrategy(command.getFailureStrategy());
processInstance.setExecutorId(command.getExecutorId());
WarningType warningType = command.getWarningType() == null ? WarningType.NONE : command.getWarningType();
processInstance.setWarningType(warningType);
Integer warningGroupId = command.getWarningGroupId() == null ? 0 : command.getWarningGroupId();
processInstance.setWarningGroupId(warningGroupId);
Date scheduleTime = getScheduleTime(command, cmdParam);
if (scheduleTime != null) {
processInstance.setScheduleTime(scheduleTime);
}
processInstance.setCommandStartTime(command.getStartTime());
processInstance.setLocations(processDefinition.getLocations());
processInstance.setConnects(processDefinition.getConnects());
setGlobalParamIfCommanded(processDefinition,cmdParam);
processInstance.setGlobalParams(ParameterUtils.curingGlobalParams(
processDefinition.getGlobalParamMap(),
processDefinition.getGlobalParamList(),
getCommandTypeIfComplement(processInstance, command), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | processInstance.getScheduleTime()));
processInstance.setProcessInstanceJson(processDefinition.getProcessDefinitionJson());
processInstance.setProcessInstancePriority(command.getProcessInstancePriority());
String workerGroup = StringUtils.isBlank(command.getWorkerGroup()) ? Constants.DEFAULT_WORKER_GROUP : command.getWorkerGroup();
processInstance.setWorkerGroup(workerGroup);
processInstance.setTimeout(processDefinition.getTimeout());
processInstance.setTenantId(processDefinition.getTenantId());
return processInstance;
}
private void setGlobalParamIfCommanded(ProcessDefinition processDefinition, Map<String, String> cmdParam) {
Map<String, String> startParamMap = null;
if (cmdParam != null && cmdParam.containsKey(Constants.CMD_PARAM_START_PARAMS)) {
String startParamJson = cmdParam.get(Constants.CMD_PARAM_START_PARAMS);
startParamMap = JSONUtils.toMap(startParamJson);
}
if (startParamMap != null && startParamMap.size() > 0
&& processDefinition.getGlobalParamMap() != null) {
for (Map.Entry<String, String> param : processDefinition.getGlobalParamMap().entrySet()) {
String val = startParamMap.get(param.getKey());
if (val != null) {
param.setValue(val);
}
}
}
}
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | * get process tenant
* there is tenant id in definition, use the tenant of the definition.
* if there is not tenant id in the definiton or the tenant not exist
* use definition creator's tenant.
*
* @param tenantId tenantId
* @param userId userId
* @return tenant
*/
public Tenant getTenantForProcess(int tenantId, int userId) {
Tenant tenant = null;
if (tenantId >= 0) {
tenant = tenantMapper.queryById(tenantId);
}
if (userId == 0) {
return null;
}
if (tenant == null) {
User user = userMapper.selectById(userId);
tenant = tenantMapper.queryById(user.getTenantId());
}
return tenant;
}
/**
* check command parameters is valid
*
* @param command command
* @param cmdParam cmdParam map
* @return whether command param is valid
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | private Boolean checkCmdParam(Command command, Map<String, String> cmdParam) {
if (command.getTaskDependType() == TaskDependType.TASK_ONLY || command.getTaskDependType() == TaskDependType.TASK_PRE) {
if (cmdParam == null
|| !cmdParam.containsKey(Constants.CMD_PARAM_START_NODE_NAMES)
|| cmdParam.get(Constants.CMD_PARAM_START_NODE_NAMES).isEmpty()) {
logger.error("command node depend type is {}, but start nodes is null ", command.getTaskDependType());
return false;
}
}
return true;
}
/**
* construct process instance according to one command.
*
* @param command command
* @param host host
* @return process instance
*/
private ProcessInstance constructProcessInstance(Command command, String host) {
ProcessInstance processInstance = null;
CommandType commandType = command.getCommandType();
Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam());
ProcessDefinition processDefinition = null;
if (command.getProcessDefinitionId() != 0) {
processDefinition = processDefineMapper.selectById(command.getProcessDefinitionId());
if (processDefinition == null) {
logger.error("cannot find the work process define! define id : {}", command.getProcessDefinitionId());
return null;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | if (cmdParam != null) {
Integer processInstanceId = 0;
if (cmdParam.containsKey(Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING)) {
String processId = cmdParam.get(Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING);
processInstanceId = Integer.parseInt(processId);
if (processInstanceId == 0) {
logger.error("command parameter is error, [ ProcessInstanceId ] is 0");
return null;
}
} else if (cmdParam.containsKey(Constants.CMD_PARAM_SUB_PROCESS)) {
String pId = cmdParam.get(Constants.CMD_PARAM_SUB_PROCESS);
processInstanceId = Integer.parseInt(pId);
} else if (cmdParam.containsKey(Constants.CMD_PARAM_RECOVERY_WAITING_THREAD)) {
String pId = cmdParam.get(Constants.CMD_PARAM_RECOVERY_WAITING_THREAD);
processInstanceId = Integer.parseInt(pId);
}
if (processInstanceId == 0) {
processInstance = generateNewProcessInstance(processDefinition, command, cmdParam);
} else {
processInstance = this.findProcessInstanceDetailById(processInstanceId);
CommandType commandTypeIfComplement = getCommandTypeIfComplement(processInstance, command);
if (commandTypeIfComplement == CommandType.REPEAT_RUNNING) {
setGlobalParamIfCommanded(processDefinition, cmdParam);
}
processInstance.setGlobalParams(ParameterUtils.curingGlobalParams( |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | processDefinition.getGlobalParamMap(),
processDefinition.getGlobalParamList(),
commandTypeIfComplement,
processInstance.getScheduleTime()));
}
processDefinition = processDefineMapper.selectById(processInstance.getProcessDefinitionId());
processInstance.setProcessDefinition(processDefinition);
if (processInstance.getCommandParam() != null) {
Map<String, String> processCmdParam = JSONUtils.toMap(processInstance.getCommandParam());
for (Map.Entry<String, String> entry : processCmdParam.entrySet()) {
if (!cmdParam.containsKey(entry.getKey())) {
cmdParam.put(entry.getKey(), entry.getValue());
}
}
}
if (cmdParam.containsKey(Constants.CMD_PARAM_SUB_PROCESS)) {
processInstance.setCommandParam(command.getCommandParam());
}
} else {
processInstance = generateNewProcessInstance(processDefinition, command, cmdParam);
}
if (Boolean.FALSE.equals(checkCmdParam(command, cmdParam))) {
logger.error("command parameter check failed!");
return null;
}
if (command.getScheduleTime() != null) {
processInstance.setScheduleTime(command.getScheduleTime()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | }
processInstance.setHost(host);
ExecutionStatus runStatus = ExecutionStatus.RUNNING_EXECUTION;
int runTime = processInstance.getRunTimes();
switch (commandType) {
case START_PROCESS:
break;
case START_FAILURE_TASK_PROCESS:
List<Integer> failedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.FAILURE);
List<Integer> toleranceList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.NEED_FAULT_TOLERANCE);
List<Integer> killedList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.KILL);
cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING);
failedList.addAll(killedList);
failedList.addAll(toleranceList);
for (Integer taskId : failedList) {
initTaskInstance(this.findTaskInstanceById(taskId));
}
cmdParam.put(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING,
String.join(Constants.COMMA, convertIntListToString(failedList)));
processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam));
processInstance.setRunTimes(runTime + 1);
break;
case START_CURRENT_TASK_PROCESS:
break;
case RECOVER_WAITTING_THREAD:
break;
case RECOVER_SUSPENDED_PROCESS:
cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | List<Integer> suspendedNodeList = this.findTaskIdByInstanceState(processInstance.getId(), ExecutionStatus.PAUSE);
List<Integer> stopNodeList = findTaskIdByInstanceState(processInstance.getId(),
ExecutionStatus.KILL);
suspendedNodeList.addAll(stopNodeList);
for (Integer taskId : suspendedNodeList) {
initTaskInstance(this.findTaskInstanceById(taskId));
}
cmdParam.put(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING, String.join(",", convertIntListToString(suspendedNodeList)));
processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam));
processInstance.setRunTimes(runTime + 1);
break;
case RECOVER_TOLERANCE_FAULT_PROCESS:
processInstance.setRecovery(Flag.YES);
runStatus = processInstance.getState();
break;
case COMPLEMENT_DATA:
List<TaskInstance> taskInstanceList = this.findValidTaskListByProcessId(processInstance.getId());
for (TaskInstance taskInstance : taskInstanceList) {
taskInstance.setFlag(Flag.NO);
this.updateTaskInstance(taskInstance);
}
initComplementDataParam(processDefinition, processInstance, cmdParam);
break;
case REPEAT_RUNNING:
if (cmdParam.containsKey(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING)) {
cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | processInstance.setCommandParam(JSONUtils.toJsonString(cmdParam));
}
List<TaskInstance> validTaskList = findValidTaskListByProcessId(processInstance.getId());
for (TaskInstance taskInstance : validTaskList) {
taskInstance.setFlag(Flag.NO);
updateTaskInstance(taskInstance);
}
processInstance.setStartTime(new Date());
processInstance.setEndTime(null);
processInstance.setRunTimes(runTime + 1);
initComplementDataParam(processDefinition, processInstance, cmdParam);
break;
case SCHEDULER:
break;
default:
break;
}
processInstance.setState(runStatus);
return processInstance;
}
/**
* return complement data if the process start with complement data
*
* @param processInstance processInstance
* @param command command
* @return command type
*/
private CommandType getCommandTypeIfComplement(ProcessInstance processInstance, Command command) {
if (CommandType.COMPLEMENT_DATA == processInstance.getCmdTypeIfComplement()) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | return CommandType.COMPLEMENT_DATA;
} else {
return command.getCommandType();
}
}
/**
* initialize complement data parameters
*
* @param processDefinition processDefinition
* @param processInstance processInstance
* @param cmdParam cmdParam
*/
private void initComplementDataParam(ProcessDefinition processDefinition,
ProcessInstance processInstance,
Map<String, String> cmdParam) {
if (!processInstance.isComplementData()) {
return;
}
Date startComplementTime = DateUtils.parse(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE),
YYYY_MM_DD_HH_MM_SS);
if (Flag.NO == processInstance.getIsSubProcess()) {
processInstance.setScheduleTime(startComplementTime);
}
processInstance.setGlobalParams(ParameterUtils.curingGlobalParams(
processDefinition.getGlobalParamMap(),
processDefinition.getGlobalParamList(),
CommandType.COMPLEMENT_DATA, processInstance.getScheduleTime()));
}
/**
* set sub work process parameters. |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 5,085 | [Bug][server-master]if global Param of out is a number, throw format exception | sql or shell task node has out param,if the format of param is number,throw format exception. | https://github.com/apache/dolphinscheduler/issues/5085 | https://github.com/apache/dolphinscheduler/pull/5077 | 5856a12855328e67aeb6a2005f86b3c1081750a1 | 29d42fd92d6720a8a0641e37923c6e6f38a5ae85 | "2021-03-18T02:56:45Z" | java | "2021-03-18T03:50:10Z" | dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessService.java | * handle sub work process instance, update relation table and command parameters
* set sub work process flag, extends parent work process command parameters
*
* @param subProcessInstance subProcessInstance
* @return process instance
*/
public ProcessInstance setSubProcessParam(ProcessInstance subProcessInstance) {
String cmdParam = subProcessInstance.getCommandParam();
if (StringUtils.isEmpty(cmdParam)) {
return subProcessInstance;
}
Map<String, String> paramMap = JSONUtils.toMap(cmdParam);
if (paramMap.containsKey(CMD_PARAM_SUB_PROCESS)
&& CMD_PARAM_EMPTY_SUB_PROCESS.equals(paramMap.get(CMD_PARAM_SUB_PROCESS))) {
paramMap.remove(CMD_PARAM_SUB_PROCESS);
paramMap.put(CMD_PARAM_SUB_PROCESS, String.valueOf(subProcessInstance.getId()));
subProcessInstance.setCommandParam(JSONUtils.toJsonString(paramMap));
subProcessInstance.setIsSubProcess(Flag.YES);
this.saveProcessInstance(subProcessInstance);
}
String parentInstanceId = paramMap.get(CMD_PARAM_SUB_PROCESS_PARENT_INSTANCE_ID);
if (StringUtils.isNotEmpty(parentInstanceId)) {
ProcessInstance parentInstance = findProcessInstanceDetailById(Integer.parseInt(parentInstanceId));
if (parentInstance != null) {
subProcessInstance.setGlobalParams(
joinGlobalParams(parentInstance.getGlobalParams(), subProcessInstance.getGlobalParams()));
this.saveProcessInstance(subProcessInstance);
} else { |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.