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
timestamp[us, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
updated_file
stringlengths
7
188
chunk_content
stringlengths
1
1.03M
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
/** * DOUBLE_SLASH // */ public static final String DOUBLE_SLASH = "//"; /** * EQUAL SIGN */ public static final String EQUAL_SIGN = "="; /** * AT SIGN */ public static final String AT_SIGN = "@"; /** * 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 yyyyMMdd */ public static final String YYYYMMDD = "yyyyMMdd"; /** * date format of yyyyMMddHHmmss */ public static final String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; /** * date format of yyyyMMddHHmmssSSS */ public static final String YYYYMMDDHHMMSSSSS = "yyyyMMddHHmmssSSS"; /** * http connect time out
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
*/ 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; /** * registry session timeout */ public static final int REGISTRY_SESSION_TIMEOUT = 10 * 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";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
/** * user name regex */ public static final Pattern REGEX_USER_NAME = Pattern.compile("^[a-zA-Z0-9._-]{3,39}$"); /** * read permission */ public static final int READ_PERMISSION = 2; /** * 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; /** * default hash map size */ public static final int DEFAULT_HASH_MAP_SIZE = 16; /** * all permissions */ public static final int ALL_PERMISSIONS = READ_PERMISSION | WRITE_PERMISSION | EXECUTE_PERMISSION; /** * max task timeout
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
*/ public static final int MAX_TASK_TIMEOUT = 24 * 3600; /** * worker host weight */ public static final int DEFAULT_WORKER_HOST_WEIGHT = 100; /** * time unit secong to minutes */ public static final int SEC_2_MINUTES_TIME_UNIT = 60; /*** * * rpc port */ public static final String RPC_PORT = "rpc.port"; /** * forbid running task */ public static final String FLOWNODE_RUN_FLAG_FORBIDDEN = "FORBIDDEN"; /** * normal running task */ public static final String FLOWNODE_RUN_FLAG_NORMAL = "NORMAL"; public static final String COMMON_TASK_TYPE = "common"; public static final String DEFAULT = "default"; 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
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String THREAD_NAME_ALERT_SERVER = "Alert-Server"; /** * 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_CODE = "processDefinitionCode"; public static final String CMD_PARAM_START_NODES = "StartNodeList"; public static final String CMD_PARAM_START_PARAMS = "StartParams"; public static final String CMD_PARAM_FATHER_PARAMS = "fatherParams"; /** * complement data start date */ public static final String CMDPARAM_COMPLEMENT_DATA_START_DATE = "complementStartDate"; /** * complement data end date */ public static final String CMDPARAM_COMPLEMENT_DATA_END_DATE = "complementEndDate"; /** * complement data Schedule date */ public static final String CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST = "complementScheduleDateList"; /** * complement date default cron string */ public static final String DEFAULT_CRON_STRING = "0 0 0 * * ? *";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
/** * sleep 1000ms */ public static final long SLEEP_TIME_MILLIS = 1_000L; /** * short sleep 100ms */ public static final long SLEEP_TIME_MILLIS_SHORT = 100L; public static final Duration SERVER_CLOSE_WAIT_TIME = Duration.ofSeconds(3); /** * one second mils */ public static final long SECOND_TIME_MILLIS = 1_000L; /** * master task instance cache-database refresh interval */ public static final long CACHE_REFRESH_TIME_MILLIS = 20 * 1_000L; /** * heartbeat for zk info length */ public static final int HEARTBEAT_FOR_ZOOKEEPER_INFO_LENGTH = 14; /** * jar */ public static final String JAR = "jar"; /** * hadoop */ public static final String HADOOP = "hadoop"; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* -D <property>=<value> */ public static final String D = "-D"; /** * exit code success */ public static final int EXIT_CODE_SUCCESS = 0; /** * exit code failure */ public static final int EXIT_CODE_FAILURE = -1; /** * process or task definition failure */ public static final int DEFINITION_FAILURE = -1; public static final int OPPOSITE_VALUE = -1; /** * process or task definition first version */ public static final int VERSION_FIRST = 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)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
*/ 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 */ public static final String PARAMETER_BUSINESS_DATE = "system.biz.date"; /** * ACCEPTED */ public static final String ACCEPTED = "ACCEPTED"; /** * SUCCEEDED */ public static final String SUCCEEDED = "SUCCEEDED"; /** * ENDED */ public static final String ENDED = "ENDED"; /** * NEW */ public static final String NEW = "NEW"; /** * NEW_SAVING */ public static final String NEW_SAVING = "NEW_SAVING";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
/** * SUBMITTED */ public static final String SUBMITTED = "SUBMITTED"; /** * FAILED */ public static final String FAILED = "FAILED"; /** * KILLED */ public static final String KILLED = "KILLED"; /** * RUNNING */ public static final String RUNNING = "RUNNING"; /** * underline "_" */ public static final String UNDERLINE = "_"; /** * application regex */ public static final String APPLICATION_REGEX = "application_\\d+_\\d+"; public static final String PID = SystemUtils.IS_OS_WINDOWS ? "handle" : "pid"; /** * month_begin */ public static final String MONTH_BEGIN = "month_begin"; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* 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 = '/'; public static final char LEFT_BRACE_CHAR = '('; public static final char RIGHT_BRACE_CHAR = ')'; public static final String ADD_STRING = "+"; public static final String STAR = "*"; public static final String DIVISION_STRING = "/"; public static final String LEFT_BRACE_STRING = "("; public static final char P = 'P';
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
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 SUBPROCESS_INSTANCE_ID = "subProcessInstanceId"; public static final String PROCESS_INSTANCE_STATE = "processInstanceState"; public static final String PARENT_WORKFLOW_INSTANCE = "parentWorkflowInstance"; public static final String CONDITION_RESULT = "conditionResult"; public static final String SWITCH_RESULT = "switchResult"; public static final String WAIT_START_TIMEOUT = "waitStartTimeout"; public static final String DEPENDENCE = "dependence"; public static final String TASK_LIST = "taskList"; 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; public static final String BLOCKING_CONDITION = "blockingCondition"; public static final String ALERT_WHEN_BLOCKING = "alertWhenBlocking"; /** * master/worker server use for zk */ public static final String MASTER_TYPE = "master"; public static final String WORKER_TYPE = "worker"; public static final String DELETE_OP = "delete"; public static final String ADD_OP = "add"; public static final String ALIAS = "alias"; public static final String CONTENT = "content"; public static final String DEPENDENT_SPLIT = ":||"; public static final long DEPENDENT_ALL_TASK_CODE = 0; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
* 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 */ public static final String HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE = "hadoop.security.authentication.startup.state"; /** * com.amazonaws.services.s3.enableV4 */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
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"; /** * loginUserFromKeytab path */ public static final String LOGIN_USER_KEY_TAB_PATH = "login.user.keytab.path"; public static final String WORKFLOW_INSTANCE_ID_MDC_KEY = "workflowInstanceId"; public static final String TASK_INSTANCE_ID_MDC_KEY = "taskInstanceId"; /** * task log info format */ public static final String TASK_LOG_INFO_FORMAT = "TaskLogInfo-%s"; public static final int[] NOT_TERMINATED_STATES = new int[] { ExecutionStatus.SUBMITTED_SUCCESS.ordinal(), ExecutionStatus.DISPATCH.ordinal(), ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.DELAY_EXECUTION.ordinal(), ExecutionStatus.READY_PAUSE.ordinal(), ExecutionStatus.READY_STOP.ordinal(), ExecutionStatus.NEED_FAULT_TOLERANCE.ordinal(), ExecutionStatus.WAITING_THREAD.ordinal(), ExecutionStatus.WAITING_DEPEND.ordinal() }; public static final int[] RUNNING_PROCESS_STATE = new int[] { ExecutionStatus.RUNNING_EXECUTION.ordinal(), ExecutionStatus.SUBMITTED_SUCCESS.ordinal(), ExecutionStatus.DISPATCH.ordinal(),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
ExecutionStatus.SERIAL_WAIT.ordinal() }; /** * status */ public static final String STATUS = "status"; /** * message */ public static final String MSG = "msg"; /** * data total */ 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";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
/** * 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"; /** * locale */ public static final String LOCALE_LANGUAGE = "language"; /** * database type */ public static final String MYSQL = "MYSQL"; public static final String HIVE = "HIVE"; public static final String ADDRESS = "address"; public static final String DATABASE = "database"; public static final String OTHER = "other"; public static final String USER = "user"; public static final String JDBC_URL = "jdbcUrl"; /** * 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";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
public static final String CLASS = "class"; /** * dataSource sensitive param */ public static final String DATASOURCE_PASSWORD_REGEX = "(?<=((?i)password((\\\\\":\\\\\")|(=')))).*?(?=((\\\\\")|(')))"; /** * default worker group */ public static final String DEFAULT_WORKER_GROUP = "default"; /** * authorize writable perm */ public static final int AUTHORIZE_WRITABLE_PERM = 7; /** * authorize readable perm */ public static final int AUTHORIZE_READABLE_PERM = 4; public static final int NORMAL_NODE_STATUS = 0; public static final int ABNORMAL_NODE_STATUS = 1; public static final int BUSY_NODE_STATUE = 2; 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"); /** * datasource encryption salt */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
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 interface preferred */ public static final String DOLPHIN_SCHEDULER_NETWORK_INTERFACE_PREFERRED = "dolphin.scheduler.network.interface.preferred"; /** * network IP gets priority, default inner outer */ public static final String DOLPHIN_SCHEDULER_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"; public static final boolean KUBERNETES_MODE = !StringUtils.isEmpty(System.getenv("KUBERNETES_SERVICE_HOST")) && !StringUtils.isEmpty(System.getenv("KUBERNETES_SERVICE_PORT")); /** * dry run flag */ public static final int DRY_RUN_FLAG_NO = 0; public static final int DRY_RUN_FLAG_YES = 1; /** * data.quality.error.output.path */ public static final String DATA_QUALITY_ERROR_OUTPUT_PATH = "data-quality.error.output.path"; public static final String CACHE_KEY_VALUE_ALL = "'all'";
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,822
[Improvement][Python] Python-gate supports creating or editing resources.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description Our company now deploy and manage scripts automatically through Python-gate, but resource files need to be maintained manually.We find it inconvenient.So, I think Python-gate should supports creating or editing resources. ### Are you willing to submit a PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10822
https://github.com/apache/dolphinscheduler/pull/10823
499e5b1307665928f2a17e878d091ac593adbfd8
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
2022-07-07T02:40:19Z
java
2022-07-12T12:44:59Z
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
/** * use for k8s */ public static final String NAMESPACE = "namespace"; public static final String CLUSTER = "cluster"; public static final String LIMITS_CPU = "limitsCpu"; public static final String LIMITS_MEMORY = "limitsMemory"; public static final Long K8S_LOCAL_TEST_CLUSTER_CODE = 0L; /** * schedule timezone */ public static final String SCHEDULE_TIMEZONE = "schedule_timezone"; public static final int RESOURCE_FULL_NAME_MAX_LENGTH = 128; /** * tenant */ public static final int TENANT_FULL_NAME_MAX_LENGTH = 30; /** * schedule time the amount of date data is too large, affecting the memory, so set 100 */ public static final int SCHEDULE_TIME_MAX_LENGTH = 100; /** * password max and min LENGTH */ public static final int USER_PASSWORD_MAX_LENGTH = 20; public static final int USER_PASSWORD_MIN_LENGTH = 2; public static final String FUNCTION_START_WITH = "$"; public static final Integer DEFAULT_QUEUE_ID = 1; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,902
[Bug] [MLflow plugin] The task running status is incorrect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The task running status is incorrect ### What you expected to happen After model correct training is complete, the state is set to fail ### How to reproduce Run MLflow project ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10902
https://github.com/apache/dolphinscheduler/pull/10897
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
02b2de2a1e3198b96eb5b6a4c42411ec265e1731
2022-07-12T09:41:30Z
java
2022-07-12T12:58:53Z
dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.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.plugin.task.mlflow; import static org.apache.dolphinscheduler.plugin.task.api.TaskConstants.EXIT_CODE_FAILURE; import org.apache.dolphinscheduler.plugin.task.api.AbstractTaskExecutor; import org.apache.dolphinscheduler.plugin.task.api.ShellCommandExecutor; import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext; import org.apache.dolphinscheduler.plugin.task.api.model.Property; import org.apache.dolphinscheduler.plugin.task.api.model.TaskResponse;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,902
[Bug] [MLflow plugin] The task running status is incorrect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The task running status is incorrect ### What you expected to happen After model correct training is complete, the state is set to fail ### How to reproduce Run MLflow project ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10902
https://github.com/apache/dolphinscheduler/pull/10897
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
02b2de2a1e3198b96eb5b6a4c42411ec265e1731
2022-07-12T09:41:30Z
java
2022-07-12T12:58:53Z
dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java
import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters; import org.apache.dolphinscheduler.plugin.task.api.parser.ParamUtils; import org.apache.dolphinscheduler.plugin.task.api.utils.MapUtils; import org.apache.dolphinscheduler.plugin.task.api.utils.OSUtils; import org.apache.dolphinscheduler.plugin.task.api.parser.ParameterUtils; import org.apache.dolphinscheduler.spi.utils.JSONUtils; import org.apache.dolphinscheduler.common.thread.ThreadUtils; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * shell task */ public class MlflowTask extends AbstractTaskExecutor { /** * shell parameters */ private MlflowParameters mlflowParameters; /** * shell command executor */ private ShellCommandExecutor shellCommandExecutor; /** * taskExecutionContext */ private TaskExecutionContext taskExecutionContext; /** * constructor *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,902
[Bug] [MLflow plugin] The task running status is incorrect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The task running status is incorrect ### What you expected to happen After model correct training is complete, the state is set to fail ### How to reproduce Run MLflow project ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10902
https://github.com/apache/dolphinscheduler/pull/10897
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
02b2de2a1e3198b96eb5b6a4c42411ec265e1731
2022-07-12T09:41:30Z
java
2022-07-12T12:58:53Z
dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java
* @param taskExecutionContext taskExecutionContext */ public MlflowTask(TaskExecutionContext taskExecutionContext) { super(taskExecutionContext); this.taskExecutionContext = taskExecutionContext; this.shellCommandExecutor = new ShellCommandExecutor(this::logHandle, taskExecutionContext, logger); } @Override public void init() { logger.info("shell task params {}", taskExecutionContext.getTaskParams()); mlflowParameters = JSONUtils.parseObject(taskExecutionContext.getTaskParams(), MlflowParameters.class); if (!mlflowParameters.checkParameters()) { throw new RuntimeException("shell task params is not valid"); } } @Override public void handle() throws Exception { try { String command = buildCommand(); TaskResponse commandExecuteResult = shellCommandExecutor.run(command); int exitCode = exitStatusCode; if (mlflowParameters.getIsDeployDocker()){ exitCode = checkDockerHealth(); }else { exitCode = getExitStatusCode(); } setExitStatusCode(exitCode); setAppIds(commandExecuteResult.getAppIds()); setProcessId(commandExecuteResult.getProcessId());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,902
[Bug] [MLflow plugin] The task running status is incorrect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The task running status is incorrect ### What you expected to happen After model correct training is complete, the state is set to fail ### How to reproduce Run MLflow project ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10902
https://github.com/apache/dolphinscheduler/pull/10897
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
02b2de2a1e3198b96eb5b6a4c42411ec265e1731
2022-07-12T09:41:30Z
java
2022-07-12T12:58:53Z
dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java
mlflowParameters.dealOutParam(shellCommandExecutor.getVarPool()); } catch (Exception e) { logger.error("shell task error", e); setExitStatusCode(EXIT_CODE_FAILURE); throw e; } } @Override public void cancelApplication(boolean cancelApplication) throws Exception { shellCommandExecutor.cancelApplication(); } public String buildCommand() { String command = ""; if (mlflowParameters.getMlflowTaskType().equals(MlflowConstants.MLFLOW_TASK_TYPE_PROJECTS)) { command = buildCommandForMlflowProjects(); } else if (mlflowParameters.getMlflowTaskType().equals(MlflowConstants.MLFLOW_TASK_TYPE_MODELS)) { command = buildCommandForMlflowModels(); } logger.info("mlflow task command: \n{}", command); return command; } /** * create command * * @return file name */ private String buildCommandForMlflowProjects() { Map<String, Property> paramsMap = getParamsMap(); List<String> args = new ArrayList<>();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,902
[Bug] [MLflow plugin] The task running status is incorrect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The task running status is incorrect ### What you expected to happen After model correct training is complete, the state is set to fail ### How to reproduce Run MLflow project ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10902
https://github.com/apache/dolphinscheduler/pull/10897
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
02b2de2a1e3198b96eb5b6a4c42411ec265e1731
2022-07-12T09:41:30Z
java
2022-07-12T12:58:53Z
dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java
args.add(String.format(MlflowConstants.EXPORT_MLFLOW_TRACKING_URI_ENV, mlflowParameters.getMlflowTrackingUri())); String runCommand; if (mlflowParameters.getMlflowJobType().equals(MlflowConstants.JOB_TYPE_BASIC_ALGORITHM)) { args.add(String.format(MlflowConstants.SET_DATA_PATH, mlflowParameters.getDataPath())); args.add(String.format(MlflowConstants.SET_REPOSITORY, MlflowConstants.PRESET_BASIC_ALGORITHM_PROJECT)); runCommand = MlflowConstants.MLFLOW_RUN_BASIC_ALGORITHM; runCommand = String.format(runCommand, mlflowParameters.getAlgorithm(), mlflowParameters.getParams(), mlflowParameters.getSearchParams(), mlflowParameters.getModelName(), mlflowParameters.getExperimentName()); } else if (mlflowParameters.getMlflowJobType().equals(MlflowConstants.JOB_TYPE_AUTOML)) { args.add(String.format(MlflowConstants.SET_DATA_PATH, mlflowParameters.getDataPath())); args.add(String.format(MlflowConstants.SET_REPOSITORY, MlflowConstants.PRESET_AUTOML_PROJECT)); runCommand = MlflowConstants.MLFLOW_RUN_AUTOML_PROJECT; runCommand = String.format(runCommand, mlflowParameters.getAutomlTool(), mlflowParameters.getParams(), mlflowParameters.getModelName(), mlflowParameters.getExperimentName()); } else if (mlflowParameters.getMlflowJobType().equals(MlflowConstants.JOB_TYPE_CUSTOM_PROJECT)) { args.add(String.format(MlflowConstants.SET_REPOSITORY, mlflowParameters.getMlflowProjectRepository())); runCommand = MlflowConstants.MLFLOW_RUN_CUSTOM_PROJECT; runCommand = String.format(runCommand, mlflowParameters.getParams(), mlflowParameters.getExperimentName(), mlflowParameters.getMlflowProjectVersion()); } else { runCommand = String.format("Cant not Support %s", mlflowParameters.getMlflowJobType()); } args.add(runCommand); String command = ParameterUtils.convertParameterPlaceholders(String.join("\n", args), ParamUtils.convert(paramsMap)); return command; } protected String buildCommandForMlflowModels() { /** * papermill [OPTIONS] NOTEBOOK_PATH [OUTPUT_PATH] */ Map<String, Property> paramsMap = getParamsMap(); List<String> args = new ArrayList<>(); args.add(String.format(MlflowConstants.EXPORT_MLFLOW_TRACKING_URI_ENV, mlflowParameters.getMlflowTrackingUri()));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,902
[Bug] [MLflow plugin] The task running status is incorrect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The task running status is incorrect ### What you expected to happen After model correct training is complete, the state is set to fail ### How to reproduce Run MLflow project ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10902
https://github.com/apache/dolphinscheduler/pull/10897
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
02b2de2a1e3198b96eb5b6a4c42411ec265e1731
2022-07-12T09:41:30Z
java
2022-07-12T12:58:53Z
dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java
String deployModelKey = mlflowParameters.getDeployModelKey(); if (mlflowParameters.getDeployType().equals(MlflowConstants.MLFLOW_MODELS_DEPLOY_TYPE_MLFLOW)) { args.add(String.format(MlflowConstants.MLFLOW_MODELS_SERVE, deployModelKey, mlflowParameters.getDeployPort())); } else if (mlflowParameters.getDeployType().equals(MlflowConstants.MLFLOW_MODELS_DEPLOY_TYPE_DOCKER)) { String imageName = "mlflow/" + mlflowParameters.getModelKeyName(":"); String containerName = mlflowParameters.getContainerName(); args.add(String.format(MlflowConstants.MLFLOW_BUILD_DOCKER, deployModelKey, imageName)); args.add(String.format(MlflowConstants.DOCKER_RREMOVE_CONTAINER, containerName)); args.add(String.format(MlflowConstants.DOCKER_RUN, containerName, mlflowParameters.getDeployPort(), imageName)); } else if (mlflowParameters.getDeployType().equals(MlflowConstants.MLFLOW_MODELS_DEPLOY_TYPE_DOCKER_COMPOSE)) { String templatePath = getTemplatePath(MlflowConstants.TEMPLATE_DOCKER_COMPOSE); args.add(String.format("cp %s %s", templatePath, taskExecutionContext.getExecutePath())); String imageName = "mlflow/" + mlflowParameters.getModelKeyName(":"); String containerName = mlflowParameters.getContainerName(); args.add(String.format(MlflowConstants.MLFLOW_BUILD_DOCKER, deployModelKey, imageName)); args.add(String.format(MlflowConstants.DOCKER_RREMOVE_CONTAINER, containerName)); args.add(mlflowParameters.getDockerComposeEnvCommand()); args.add(MlflowConstants.DOCKER_COMPOSE_RUN); } String command = ParameterUtils.convertParameterPlaceholders(String.join("\n", args), ParamUtils.convert(paramsMap)); return command; } private Map<String, Property> getParamsMap() { return taskExecutionContext.getPrepareParamsMap(); } public int checkDockerHealth() throws Exception { logger.info("checking container healthy ... "); int exitCode = -1; String[] command = {"sh", "-c", String.format(MlflowConstants.DOCKER_HEALTH_CHECK, mlflowParameters.getContainerName())};
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,902
[Bug] [MLflow plugin] The task running status is incorrect
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened The task running status is incorrect ### What you expected to happen After model correct training is complete, the state is set to fail ### How to reproduce Run MLflow project ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10902
https://github.com/apache/dolphinscheduler/pull/10897
59cd86157ff8d5ab25f0b200d6a30abd95a64c03
02b2de2a1e3198b96eb5b6a4c42411ec265e1731
2022-07-12T09:41:30Z
java
2022-07-12T12:58:53Z
dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java
for(int x = 0; x < MlflowConstants.DOCKER_HEALTH_CHECK_TIMEOUT; x = x+1) { String status; try { status = OSUtils.exeShell(command).replace("\n", "").replace("\"", ""); } catch (Exception e) { status = String.format("error --- %s", e.getMessage()); } logger.info("container healthy status: {}", status); if (status.equals("healthy")) { exitCode = 0; logger.info("container is healthy"); return exitCode; }else { logger.info("The health check has been running for {} seconds", x * MlflowConstants.DOCKER_HEALTH_CHECK_INTERVAL / 1000); ThreadUtils.sleep(MlflowConstants.DOCKER_HEALTH_CHECK_INTERVAL); } } logger.info("health check fail"); return exitCode; } @Override public AbstractParameters getParameters() { return mlflowParameters; } public String getTemplatePath(String template) { String templatePath = MlflowTask.class.getClassLoader().getResource(template).getPath(); return templatePath; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,914
[Bug] [Api Server] cron manager create time not display
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened <img width="996" alt="image" src="https://user-images.githubusercontent.com/13765310/178515469-4ba65d23-daa5-4cc0-9e7f-4eece8fecc2c.png"> ### What you expected to happen display timing record start time ### How to reproduce check workflow cron manage ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10914
https://github.com/apache/dolphinscheduler/pull/10915
0db9bbd538b0a2301345e1f0cae3e3623039f1af
c9afc1a1f424704f480a631bb9ec25b8771cf01e
2022-07-12T14:36:10Z
java
2022-07-13T01:53:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.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.api.vo; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Priority; import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.dao.entity.Schedule; import java.time.ZoneId; import java.util.Date; public class ScheduleVo {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,914
[Bug] [Api Server] cron manager create time not display
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened <img width="996" alt="image" src="https://user-images.githubusercontent.com/13765310/178515469-4ba65d23-daa5-4cc0-9e7f-4eece8fecc2c.png"> ### What you expected to happen display timing record start time ### How to reproduce check workflow cron manage ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10914
https://github.com/apache/dolphinscheduler/pull/10915
0db9bbd538b0a2301345e1f0cae3e3623039f1af
c9afc1a1f424704f480a631bb9ec25b8771cf01e
2022-07-12T14:36:10Z
java
2022-07-13T01:53:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
private int id; /** * process definition code */ private long processDefinitionCode;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,914
[Bug] [Api Server] cron manager create time not display
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened <img width="996" alt="image" src="https://user-images.githubusercontent.com/13765310/178515469-4ba65d23-daa5-4cc0-9e7f-4eece8fecc2c.png"> ### What you expected to happen display timing record start time ### How to reproduce check workflow cron manage ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10914
https://github.com/apache/dolphinscheduler/pull/10915
0db9bbd538b0a2301345e1f0cae3e3623039f1af
c9afc1a1f424704f480a631bb9ec25b8771cf01e
2022-07-12T14:36:10Z
java
2022-07-13T01:53:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
/** * process definition name */ private String processDefinitionName; /** * project name */ private String projectName; /** * schedule description */ private String definitionDescription; /** * schedule start time */ private String startTime; /** * schedule end time */ private String endTime; /** * timezoneId * <p>see {@link java.util.TimeZone#getTimeZone(String)} */ private String timezoneId; /** * crontab expression */ private String crontab; /**
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,914
[Bug] [Api Server] cron manager create time not display
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened <img width="996" alt="image" src="https://user-images.githubusercontent.com/13765310/178515469-4ba65d23-daa5-4cc0-9e7f-4eece8fecc2c.png"> ### What you expected to happen display timing record start time ### How to reproduce check workflow cron manage ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10914
https://github.com/apache/dolphinscheduler/pull/10915
0db9bbd538b0a2301345e1f0cae3e3623039f1af
c9afc1a1f424704f480a631bb9ec25b8771cf01e
2022-07-12T14:36:10Z
java
2022-07-13T01:53:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
* failure strategy */ private FailureStrategy failureStrategy; /** * warning type */ private WarningType warningType; /** * create time */ private Date createTime; /** * update time */ private Date updateTime; /** * created user id */ private int userId; /** * created user name */ private String userName; /** * release state */ private ReleaseState releaseState; /** * warning group id */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,914
[Bug] [Api Server] cron manager create time not display
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened <img width="996" alt="image" src="https://user-images.githubusercontent.com/13765310/178515469-4ba65d23-daa5-4cc0-9e7f-4eece8fecc2c.png"> ### What you expected to happen display timing record start time ### How to reproduce check workflow cron manage ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10914
https://github.com/apache/dolphinscheduler/pull/10915
0db9bbd538b0a2301345e1f0cae3e3623039f1af
c9afc1a1f424704f480a631bb9ec25b8771cf01e
2022-07-12T14:36:10Z
java
2022-07-13T01:53:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
private int warningGroupId; /** * process instance priority */ private Priority processInstancePriority; /** * worker group */ private String workerGroup; /** * environment code */ private Long environmentCode; public ScheduleVo(Schedule schedule) { this.setId(schedule.getId()); this.setCrontab(schedule.getCrontab()); this.setProjectName(schedule.getProjectName()); this.setUserName(schedule.getUserName()); this.setWorkerGroup(schedule.getWorkerGroup()); this.setWarningType(schedule.getWarningType()); this.setWarningGroupId(schedule.getWarningGroupId()); this.setUserId(schedule.getUserId()); this.setUpdateTime(schedule.getUpdateTime()); this.setTimezoneId(schedule.getTimezoneId()); this.setReleaseState(schedule.getReleaseState()); this.setProcessInstancePriority(schedule.getProcessInstancePriority()); this.setProcessDefinitionName(schedule.getProcessDefinitionName()); this.setProcessDefinitionCode(schedule.getProcessDefinitionCode()); this.setFailureStrategy(schedule.getFailureStrategy()); this.setEnvironmentCode(schedule.getEnvironmentCode());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,914
[Bug] [Api Server] cron manager create time not display
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened <img width="996" alt="image" src="https://user-images.githubusercontent.com/13765310/178515469-4ba65d23-daa5-4cc0-9e7f-4eece8fecc2c.png"> ### What you expected to happen display timing record start time ### How to reproduce check workflow cron manage ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10914
https://github.com/apache/dolphinscheduler/pull/10915
0db9bbd538b0a2301345e1f0cae3e3623039f1af
c9afc1a1f424704f480a631bb9ec25b8771cf01e
2022-07-12T14:36:10Z
java
2022-07-13T01:53:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
this.setStartTime(DateUtils.dateToString(schedule.getStartTime(), ZoneId.systemDefault().getId())); this.setEndTime(DateUtils.dateToString(schedule.getEndTime(), ZoneId.systemDefault().getId())); } public int getWarningGroupId() { return warningGroupId; } public void setWarningGroupId(int warningGroupId) { this.warningGroupId = warningGroupId; } public String getProjectName() { return projectName; } public void setProjectName(String projectName) { this.projectName = projectName; } public String getStartTime() { return startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public String getTimezoneId() { return timezoneId; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,914
[Bug] [Api Server] cron manager create time not display
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened <img width="996" alt="image" src="https://user-images.githubusercontent.com/13765310/178515469-4ba65d23-daa5-4cc0-9e7f-4eece8fecc2c.png"> ### What you expected to happen display timing record start time ### How to reproduce check workflow cron manage ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10914
https://github.com/apache/dolphinscheduler/pull/10915
0db9bbd538b0a2301345e1f0cae3e3623039f1af
c9afc1a1f424704f480a631bb9ec25b8771cf01e
2022-07-12T14:36:10Z
java
2022-07-13T01:53:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
public void setTimezoneId(String timezoneId) { this.timezoneId = timezoneId; } public String getCrontab() { return crontab; } public void setCrontab(String crontab) { this.crontab = crontab; } public FailureStrategy getFailureStrategy() { return failureStrategy; } public void setFailureStrategy(FailureStrategy failureStrategy) { this.failureStrategy = failureStrategy; } public WarningType getWarningType() { return warningType; } public void setWarningType(WarningType warningType) { this.warningType = warningType; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public ReleaseState getReleaseState() { return releaseState; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,914
[Bug] [Api Server] cron manager create time not display
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened <img width="996" alt="image" src="https://user-images.githubusercontent.com/13765310/178515469-4ba65d23-daa5-4cc0-9e7f-4eece8fecc2c.png"> ### What you expected to happen display timing record start time ### How to reproduce check workflow cron manage ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10914
https://github.com/apache/dolphinscheduler/pull/10915
0db9bbd538b0a2301345e1f0cae3e3623039f1af
c9afc1a1f424704f480a631bb9ec25b8771cf01e
2022-07-12T14:36:10Z
java
2022-07-13T01:53:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
public void setReleaseState(ReleaseState releaseState) { this.releaseState = releaseState; } public long getProcessDefinitionCode() { return processDefinitionCode; } public void setProcessDefinitionCode(long processDefinitionCode) { this.processDefinitionCode = processDefinitionCode; } public String getProcessDefinitionName() { return processDefinitionName; } public void setProcessDefinitionName(String processDefinitionName) { this.processDefinitionName = processDefinitionName; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public String getUserName() { return userName; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,914
[Bug] [Api Server] cron manager create time not display
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened <img width="996" alt="image" src="https://user-images.githubusercontent.com/13765310/178515469-4ba65d23-daa5-4cc0-9e7f-4eece8fecc2c.png"> ### What you expected to happen display timing record start time ### How to reproduce check workflow cron manage ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10914
https://github.com/apache/dolphinscheduler/pull/10915
0db9bbd538b0a2301345e1f0cae3e3623039f1af
c9afc1a1f424704f480a631bb9ec25b8771cf01e
2022-07-12T14:36:10Z
java
2022-07-13T01:53:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
public void setUserName(String userName) { this.userName = userName; } public int getId() { return id; } public void setId(int id) { this.id = id; } public Priority getProcessInstancePriority() { return processInstancePriority; } public void setProcessInstancePriority(Priority processInstancePriority) { this.processInstancePriority = processInstancePriority; } public String getWorkerGroup() { return workerGroup; } public void setWorkerGroup(String workerGroup) { this.workerGroup = workerGroup; } public Long getEnvironmentCode() { return this.environmentCode; } public void setEnvironmentCode(Long environmentCode) { this.environmentCode = environmentCode; } @Override public String toString() { return "Schedule{"
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,914
[Bug] [Api Server] cron manager create time not display
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened <img width="996" alt="image" src="https://user-images.githubusercontent.com/13765310/178515469-4ba65d23-daa5-4cc0-9e7f-4eece8fecc2c.png"> ### What you expected to happen display timing record start time ### How to reproduce check workflow cron manage ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10914
https://github.com/apache/dolphinscheduler/pull/10915
0db9bbd538b0a2301345e1f0cae3e3623039f1af
c9afc1a1f424704f480a631bb9ec25b8771cf01e
2022-07-12T14:36:10Z
java
2022-07-13T01:53:48Z
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/vo/ScheduleVo.java
+ "id=" + id + ", processDefinitionCode=" + processDefinitionCode + ", processDefinitionName='" + processDefinitionName + '\'' + ", projectName='" + projectName + '\'' + ", description='" + definitionDescription + '\'' + ", startTime=" + startTime + ", endTime=" + endTime + ", timezoneId='" + timezoneId + +'\'' + ", crontab='" + crontab + '\'' + ", failureStrategy=" + failureStrategy + ", warningType=" + warningType + ", createTime=" + createTime + ", updateTime=" + updateTime + ", userId=" + userId + ", userName='" + userName + '\'' + ", releaseState=" + releaseState + ", warningGroupId=" + warningGroupId + ", processInstancePriority=" + processInstancePriority + ", workerGroup='" + workerGroup + '\'' + ", environmentCode='" + environmentCode + '\'' + '}'; } public String getDefinitionDescription() { return definitionDescription; } public void setDefinitionDescription(String definitionDescription) { this.definitionDescription = definitionDescription; } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.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_SCHEDULE_DATE_LIST;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
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_FATHER_PARAMS; 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_CODE; 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.plugin.task.api.enums.DataType.VARCHAR; import static org.apache.dolphinscheduler.plugin.task.api.enums.Direct.IN; import static org.apache.dolphinscheduler.plugin.task.api.utils.DataQualityConstants.TASK_INSTANCE_ID; import static java.util.stream.Collectors.toSet; import org.apache.dolphinscheduler.common.Constants; import org.apache.dolphinscheduler.common.enums.AuthorizationType; import org.apache.dolphinscheduler.common.enums.CommandType; import org.apache.dolphinscheduler.common.enums.FailureStrategy; import org.apache.dolphinscheduler.common.enums.Flag; import org.apache.dolphinscheduler.common.enums.ReleaseState; import org.apache.dolphinscheduler.common.enums.TaskDependType; import org.apache.dolphinscheduler.common.enums.TaskGroupQueueStatus; import org.apache.dolphinscheduler.common.enums.TimeoutFlag; import org.apache.dolphinscheduler.common.enums.WarningType; import org.apache.dolphinscheduler.common.graph.DAG; import org.apache.dolphinscheduler.common.model.TaskNode; import org.apache.dolphinscheduler.common.model.TaskNodeRelation; import org.apache.dolphinscheduler.common.process.ProcessDag; import org.apache.dolphinscheduler.common.utils.CodeGenerateUtils; import org.apache.dolphinscheduler.common.utils.CodeGenerateUtils.CodeGenerateException; import org.apache.dolphinscheduler.common.utils.DateUtils; import org.apache.dolphinscheduler.common.utils.JSONUtils;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
import org.apache.dolphinscheduler.dao.entity.Command; import org.apache.dolphinscheduler.dao.entity.DagData; import org.apache.dolphinscheduler.dao.entity.DataSource; import org.apache.dolphinscheduler.dao.entity.DependentProcessDefinition; import org.apache.dolphinscheduler.dao.entity.DqComparisonType; import org.apache.dolphinscheduler.dao.entity.DqExecuteResult; import org.apache.dolphinscheduler.dao.entity.DqRule; import org.apache.dolphinscheduler.dao.entity.DqRuleExecuteSql; import org.apache.dolphinscheduler.dao.entity.DqRuleInputEntry; import org.apache.dolphinscheduler.dao.entity.DqTaskStatisticsValue; import org.apache.dolphinscheduler.dao.entity.Environment; import org.apache.dolphinscheduler.dao.entity.ErrorCommand; import org.apache.dolphinscheduler.dao.entity.K8s; import org.apache.dolphinscheduler.dao.entity.ProcessDefinition; import org.apache.dolphinscheduler.dao.entity.ProcessDefinitionLog; import org.apache.dolphinscheduler.dao.entity.ProcessInstance; import org.apache.dolphinscheduler.dao.entity.ProcessInstanceMap; import org.apache.dolphinscheduler.dao.entity.ProcessTaskRelation; import org.apache.dolphinscheduler.dao.entity.ProcessTaskRelationLog; import org.apache.dolphinscheduler.dao.entity.Project; import org.apache.dolphinscheduler.dao.entity.ProjectUser; import org.apache.dolphinscheduler.dao.entity.Resource; import org.apache.dolphinscheduler.dao.entity.Schedule; import org.apache.dolphinscheduler.dao.entity.TaskDefinition; import org.apache.dolphinscheduler.dao.entity.TaskDefinitionLog; import org.apache.dolphinscheduler.dao.entity.TaskGroup; import org.apache.dolphinscheduler.dao.entity.TaskGroupQueue; import org.apache.dolphinscheduler.dao.entity.TaskInstance; import org.apache.dolphinscheduler.dao.entity.Tenant; import org.apache.dolphinscheduler.dao.entity.UdfFunc;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
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.DqComparisonTypeMapper; import org.apache.dolphinscheduler.dao.mapper.DqExecuteResultMapper; import org.apache.dolphinscheduler.dao.mapper.DqRuleExecuteSqlMapper; import org.apache.dolphinscheduler.dao.mapper.DqRuleInputEntryMapper; import org.apache.dolphinscheduler.dao.mapper.DqRuleMapper; import org.apache.dolphinscheduler.dao.mapper.DqTaskStatisticsValueMapper; import org.apache.dolphinscheduler.dao.mapper.EnvironmentMapper; import org.apache.dolphinscheduler.dao.mapper.ErrorCommandMapper; import org.apache.dolphinscheduler.dao.mapper.K8sMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionLogMapper; 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.ProcessTaskRelationLogMapper; import org.apache.dolphinscheduler.dao.mapper.ProcessTaskRelationMapper; import org.apache.dolphinscheduler.dao.mapper.ProjectMapper; import org.apache.dolphinscheduler.dao.mapper.ResourceMapper; import org.apache.dolphinscheduler.dao.mapper.ResourceUserMapper; import org.apache.dolphinscheduler.dao.mapper.ScheduleMapper; import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionLogMapper; import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper; import org.apache.dolphinscheduler.dao.mapper.TaskGroupMapper; import org.apache.dolphinscheduler.dao.mapper.TaskGroupQueueMapper; 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;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
import org.apache.dolphinscheduler.dao.mapper.WorkFlowLineageMapper; import org.apache.dolphinscheduler.dao.utils.DagHelper; import org.apache.dolphinscheduler.dao.utils.DqRuleUtils; import org.apache.dolphinscheduler.plugin.task.api.enums.Direct; import org.apache.dolphinscheduler.plugin.task.api.enums.ExecutionStatus; import org.apache.dolphinscheduler.plugin.task.api.enums.dp.DqTaskState; import org.apache.dolphinscheduler.plugin.task.api.model.DateInterval; import org.apache.dolphinscheduler.plugin.task.api.model.Property; import org.apache.dolphinscheduler.plugin.task.api.model.ResourceInfo; import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters; import org.apache.dolphinscheduler.plugin.task.api.parameters.ParametersNode; import org.apache.dolphinscheduler.plugin.task.api.parameters.SubProcessParameters; import org.apache.dolphinscheduler.plugin.task.api.parameters.TaskTimeoutParameter; import org.apache.dolphinscheduler.remote.command.StateEventChangeCommand; import org.apache.dolphinscheduler.remote.command.TaskEventChangeCommand; import org.apache.dolphinscheduler.remote.processor.StateEventCallbackService; import org.apache.dolphinscheduler.remote.utils.Host; import org.apache.dolphinscheduler.service.cron.CronUtils; import org.apache.dolphinscheduler.service.exceptions.CronParseException; import org.apache.dolphinscheduler.service.exceptions.ServiceException; import org.apache.dolphinscheduler.service.expand.CuringParamsService; import org.apache.dolphinscheduler.service.log.LogClientService; import org.apache.dolphinscheduler.service.task.TaskPluginManager; import org.apache.dolphinscheduler.spi.enums.ResourceType; import org.apache.dolphinscheduler.spi.utils.StringUtils; import org.apache.commons.collections.CollectionUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.EnumMap;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; 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.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.base.Joiner; import com.google.common.base.Strings; import com.google.common.collect.Lists; import io.micrometer.core.annotation.Counted; /** * process relative dao that some mappers in this. */ @Component public class ProcessServiceImpl implements ProcessService { private final Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private UserMapper userMapper; @Autowired private ProcessDefinitionMapper processDefineMapper;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
@Autowired private ProcessDefinitionLogMapper processDefineLogMapper; @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 ResourceUserMapper resourceUserMapper; @Autowired private ErrorCommandMapper errorCommandMapper; @Autowired private TenantMapper tenantMapper; @Autowired private ProjectMapper projectMapper; @Autowired private DqExecuteResultMapper dqExecuteResultMapper; @Autowired private DqRuleMapper dqRuleMapper;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
@Autowired private DqRuleInputEntryMapper dqRuleInputEntryMapper; @Autowired private DqRuleExecuteSqlMapper dqRuleExecuteSqlMapper; @Autowired private DqComparisonTypeMapper dqComparisonTypeMapper; @Autowired private DqTaskStatisticsValueMapper dqTaskStatisticsValueMapper; @Autowired private TaskDefinitionMapper taskDefinitionMapper; @Autowired private TaskDefinitionLogMapper taskDefinitionLogMapper; @Autowired private ProcessTaskRelationMapper processTaskRelationMapper; @Autowired private ProcessTaskRelationLogMapper processTaskRelationLogMapper; @Autowired StateEventCallbackService stateEventCallbackService; @Autowired private EnvironmentMapper environmentMapper; @Autowired private TaskGroupQueueMapper taskGroupQueueMapper; @Autowired private TaskGroupMapper taskGroupMapper; @Autowired private WorkFlowLineageMapper workFlowLineageMapper; @Autowired private TaskPluginManager taskPluginManager; @Autowired private K8sMapper k8sMapper;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
@Autowired private CuringParamsService curingGlobalParamsService; @Autowired private ProcessService processService; /** * handle Command (construct ProcessInstance from Command) , wrapped in transaction * * @param host host * @param command found command * @return process instance */ @Override @Transactional public ProcessInstance handleCommand(String host, Command command) throws CronParseException, CodeGenerateException { 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; } processInstance.setCommandType(command.getCommandType()); processInstance.addHistoryCmd(command.getCommandType()); ProcessDefinition processDefinition = this.findProcessDefinition(processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion()); if (processDefinition.getExecutionType().typeIsSerial()) { saveSerialProcess(processInstance, processDefinition); if (processInstance.getState() != ExecutionStatus.SUBMITTED_SUCCESS) { setSubProcessParam(processInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
deleteCommandWithCheck(command.getId()); return null; } } else { saveProcessInstance(processInstance); } setSubProcessParam(processInstance); deleteCommandWithCheck(command.getId()); return processInstance; } protected void saveSerialProcess(ProcessInstance processInstance, ProcessDefinition processDefinition) { processInstance.setState(ExecutionStatus.SERIAL_WAIT); saveProcessInstance(processInstance); if (processDefinition.getExecutionType().typeIsSerialWait()) { while (true) { List<ProcessInstance> runningProcessInstances = this.processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion(), Constants.RUNNING_PROCESS_STATE, processInstance.getId()); if (CollectionUtils.isEmpty(runningProcessInstances)) { processInstance.setState(ExecutionStatus.SUBMITTED_SUCCESS); saveProcessInstance(processInstance); return; } ProcessInstance runningProcess = runningProcessInstances.get(0); if (this.processInstanceMapper.updateNextProcessIdById(processInstance.getId(), runningProcess.getId())) { return; } } } else if (processDefinition.getExecutionType().typeIsSerialDiscard()) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
List<ProcessInstance> runningProcessInstances = this.processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion(), Constants.RUNNING_PROCESS_STATE, processInstance.getId()); if (CollectionUtils.isNotEmpty(runningProcessInstances)) { processInstance.setState(ExecutionStatus.STOP); saveProcessInstance(processInstance); return; } processInstance.setState(ExecutionStatus.SUBMITTED_SUCCESS); saveProcessInstance(processInstance); } else if (processDefinition.getExecutionType().typeIsSerialPriority()) { List<ProcessInstance> runningProcessInstances = this.processInstanceMapper.queryByProcessDefineCodeAndProcessDefinitionVersionAndStatusAndNextId(processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion(), Constants.RUNNING_PROCESS_STATE, processInstance.getId()); if (CollectionUtils.isEmpty(runningProcessInstances)) { processInstance.setState(ExecutionStatus.SUBMITTED_SUCCESS); saveProcessInstance(processInstance); return; } for (ProcessInstance info : runningProcessInstances) { if (Objects.nonNull(info.getState()) && (ExecutionStatus.READY_STOP.equals(info.getState()) || info.getState().typeIsFinished())) { continue; } info.setCommandType(CommandType.STOP); info.addHistoryCmd(CommandType.STOP); info.setState(ExecutionStatus.READY_STOP); int update = updateProcessInstance(info); if (update > 0) { StateEventChangeCommand stateEventChangeCommand = new StateEventChangeCommand( info.getId(), 0, info.getState(), info.getId(), 0 );
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
try { Host host = new Host(info.getHost()); stateEventCallbackService.sendResult(host, stateEventChangeCommand.convert2Command()); } catch (Exception e) { logger.error("sendResultError",e ); } } } } } /** * Save error command, and delete original command. If the given command has already been moved into error command, * will throw {@link SQLIntegrityConstraintViolationException ). * * @param command command * @param message message */ @Override public void moveToErrorCommand(Command command, String message) { ErrorCommand errorCommand = new ErrorCommand(command, message); this.errorCommandMapper.insert(errorCommand); this.commandMapper.deleteById(command.getId()); } /** * set process waiting thread * * @param command command * @param processInstance processInstance * @return process instance */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
private ProcessInstance setWaitingThreadProcess(Command command, ProcessInstance processInstance) { processInstance.setState(ExecutionStatus.WAITING_THREAD); if (command.getCommandType() != CommandType.RECOVER_WAITING_THREAD) { processInstance.addHistoryCmd(command.getCommandType()); } saveProcessInstance(processInstance); this.setSubProcessParam(processInstance); createRecoveryWaitingThreadCommand(command, processInstance); return null; } /** * insert one command * * @param command command * @return create result */ @Override @Counted("ds.workflow.create.command.count") public int createCommand(Command command) { int result = 0; if (command != null) { Schedule schedule = scheduleMapper.queryByProcessDefinitionCode(command.getProcessDefinitionCode()); Map<String, String> commandParams = JSONUtils.toMap(command.getCommandParam()); if (commandParams != null && schedule != null) { commandParams.put(Constants.SCHEDULE_TIMEZONE, schedule.getTimezoneId()); command.setCommandParam(JSONUtils.toJsonString(commandParams)); } result = commandMapper.insert(command); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
return result; } /** * get command page */ @Override public List<Command> findCommandPage(int pageSize, int pageNumber) { return commandMapper.queryCommandPage(pageSize, pageNumber * pageSize); } /** * get command page */ @Override public List<Command> findCommandPageBySlot(int pageSize, int pageNumber, int masterCount, int thisMasterSlot) { if (masterCount <= 0) { return Lists.newArrayList(); } return commandMapper.queryCommandPageBySlot(pageSize, pageNumber * pageSize, masterCount, thisMasterSlot); } /** * check the input command exists in queue list * * @param command command * @return create command result */ @Override public boolean verifyIsNeedCreateCommand(Command command) { boolean isNeedCreate = true; EnumMap<CommandType, Integer> cmdTypeMap = new EnumMap<>(CommandType.class); cmdTypeMap.put(CommandType.REPEAT_RUNNING, 1);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
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 */ @Override public ProcessInstance findProcessInstanceDetailById(int processId) { return processInstanceMapper.queryDetailById(processId); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
/** * get task node list by definitionId */ @Override public List<TaskDefinition> getTaskNodeListByDefinition(long defineCode) { ProcessDefinition processDefinition = processDefineMapper.queryByCode(defineCode); if (processDefinition == null) { logger.error("process define not exists"); return Lists.newArrayList(); } List<ProcessTaskRelationLog> processTaskRelations = processTaskRelationLogMapper.queryByProcessCodeAndVersion(processDefinition.getCode(), processDefinition.getVersion()); Set<TaskDefinition> taskDefinitionSet = new HashSet<>(); for (ProcessTaskRelationLog processTaskRelation : processTaskRelations) { if (processTaskRelation.getPostTaskCode() > 0) { taskDefinitionSet.add(new TaskDefinition(processTaskRelation.getPostTaskCode(), processTaskRelation.getPostTaskVersion())); } } if (taskDefinitionSet.isEmpty()) { return Lists.newArrayList(); } List<TaskDefinitionLog> taskDefinitionLogs = taskDefinitionLogMapper.queryByTaskDefinitions(taskDefinitionSet); return Lists.newArrayList(taskDefinitionLogs); } /** * find process instance by id * * @param processId processId * @return process instance */ @Override
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
public ProcessInstance findProcessInstanceById(int processId) { return processInstanceMapper.selectById(processId); } /** * find process define by id. * * @param processDefinitionId processDefinitionId * @return process definition */ @Override public ProcessDefinition findProcessDefineById(int processDefinitionId) { return processDefineMapper.selectById(processDefinitionId); } /** * find process define by code and version. * * @param processDefinitionCode processDefinitionCode * @return process definition */ @Override public ProcessDefinition findProcessDefinition(Long processDefinitionCode, int version) { ProcessDefinition processDefinition = processDefineMapper.queryByCode(processDefinitionCode); if (processDefinition == null || processDefinition.getVersion() != version) { processDefinition = processDefineLogMapper.queryByDefinitionCodeAndVersion(processDefinitionCode, version); if (processDefinition != null) { processDefinition.setId(0); } } return processDefinition; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
/** * find process define by code. * * @param processDefinitionCode processDefinitionCode * @return process definition */ @Override public ProcessDefinition findProcessDefinitionByCode(Long processDefinitionCode) { return processDefineMapper.queryByCode(processDefinitionCode); } /** * delete work process instance by id * * @param processInstanceId processInstanceId * @return delete process instance result */ @Override 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 */ @Override public int deleteAllSubWorkProcessByParentId(int processInstanceId) { List<Integer> subProcessIdList = processInstanceMapMapper.querySubIdListByParentId(processInstanceId); for (Integer subId : subProcessIdList) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
deleteAllSubWorkProcessByParentId(subId); deleteWorkProcessMapByParentId(subId); removeTaskLogFile(subId); deleteWorkProcessInstanceById(subId); } return 1; } /** * remove task log file * * @param processInstanceId processInstanceId */ @Override public void removeTaskLogFile(Integer processInstanceId) { List<TaskInstance> taskInstanceList = findValidTaskListByProcessId(processInstanceId); if (CollectionUtils.isEmpty(taskInstanceList)) { return; } try (LogClientService logClient = new LogClientService()) { for (TaskInstance taskInstance : taskInstanceList) { String taskLogPath = taskInstance.getLogPath(); if (Strings.isNullOrEmpty(taskInstance.getHost())) { continue; } Host host = Host.of(taskInstance.getHost()); logClient.removeTaskLog(host.getIp(), host.getPort(), taskLogPath); } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
/** * recursive delete all task instance by process instance id */ @Override public void deleteWorkTaskInstanceByProcessInstanceId(int processInstanceId) { List<TaskInstance> taskInstanceList = findValidTaskListByProcessId(processInstanceId); if (CollectionUtils.isEmpty(taskInstanceList)) { return; } List<Integer> taskInstanceIdList = new ArrayList<>(); for (TaskInstance taskInstance : taskInstanceList) { taskInstanceIdList.add(taskInstance.getId()); } taskInstanceMapper.deleteBatchIds(taskInstanceIdList); } /** * recursive query sub process definition id by parent id. * * @param parentCode parentCode * @param ids ids */ @Override public void recurseFindSubProcess(long parentCode, List<Long> ids) { List<TaskDefinition> taskNodeList = this.getTaskNodeListByDefinition(parentCode); if (taskNodeList != null && !taskNodeList.isEmpty()) { for (TaskDefinition taskNode : taskNodeList) { String parameter = taskNode.getTaskParams(); ObjectNode parameterJson = JSONUtils.parseObject(parameter); if (parameterJson.get(CMD_PARAM_SUB_PROCESS_DEFINE_CODE) != null) { SubProcessParameters subProcessParam = JSONUtils.parseObject(parameter, SubProcessParameters.class);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
ids.add(subProcessParam.getProcessDefinitionCode()); recurseFindSubProcess(subProcessParam.getProcessDefinitionCode(), 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 */ @Override 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())); if (originCommand == null) { Command command = new Command( CommandType.RECOVER_WAITING_THREAD,
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
processInstance.getTaskDependType(), processInstance.getFailureStrategy(), processInstance.getExecutorId(), processInstance.getProcessDefinition().getCode(), JSONUtils.toJsonString(cmdParam), processInstance.getWarningType(), processInstance.getWarningGroupId(), processInstance.getScheduleTime(), processInstance.getWorkerGroup(), processInstance.getEnvironmentCode(), processInstance.getProcessInstancePriority(), processInstance.getDryRun(), processInstance.getId(), processInstance.getProcessDefinitionVersion() ); saveCommand(command); return; } if (originCommand.getCommandType() == CommandType.RECOVER_WAITING_THREAD) { originCommand.setUpdateTime(new Date()); saveCommand(originCommand); } else { commandMapper.deleteById(originCommand.getId()); originCommand.setId(0); originCommand.setCommandType(CommandType.RECOVER_WAITING_THREAD); originCommand.setUpdateTime(new Date()); originCommand.setCommandParam(JSONUtils.toJsonString(cmdParam)); originCommand.setProcessInstancePriority(processInstance.getProcessInstancePriority());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.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) throws CronParseException { Date scheduleTime = command.getScheduleTime(); if (scheduleTime == null && cmdParam != null && cmdParam.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)) { Date start = DateUtils.stringToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE)); Date end = DateUtils.stringToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE)); List<Schedule> schedules = queryReleaseSchedulerListByProcessDefinitionCode(command.getProcessDefinitionCode()); List<Date> complementDateList = CronUtils.getSelfFireDateList(start, end, schedules); if (complementDateList.size() > 0) { scheduleTime = complementDateList.get(0); } else { logger.error("set scheduler time error: complement date list is empty, command: {}", command.toString()); } } return scheduleTime; } /** * generate a new work process instance from command. *
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* @param processDefinition processDefinition * @param command command * @param cmdParam cmdParam map * @return process instance */ private ProcessInstance generateNewProcessInstance(ProcessDefinition processDefinition, Command command, Map<String, String> cmdParam) throws CodeGenerateException { ProcessInstance processInstance = new ProcessInstance(processDefinition); processInstance.setProcessDefinitionCode(processDefinition.getCode()); processInstance.setProcessDefinitionVersion(processDefinition.getVersion()); processInstance.setState(ExecutionStatus.RUNNING_EXECUTION); processInstance.setRecovery(Flag.NO); processInstance.setStartTime(new Date()); processInstance.setRestartTime(null); processInstance.setRunTimes(1); processInstance.setMaxTryTimes(0); 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); processInstance.setDryRun(command.getDryRun()); if (command.getScheduleTime() != null) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
processInstance.setScheduleTime(command.getScheduleTime()); } processInstance.setCommandStartTime(command.getStartTime()); processInstance.setLocations(processDefinition.getLocations()); setGlobalParamIfCommanded(processDefinition, cmdParam); Map<String, String> commandParamMap = JSONUtils.toMap(command.getCommandParam()); String timezoneId = null; if (commandParamMap != null) { timezoneId = commandParamMap.get(Constants.SCHEDULE_TIMEZONE); } String globalParams = curingGlobalParamsService.curingGlobalParams(processInstance.getId(), processDefinition.getGlobalParamMap(), processDefinition.getGlobalParamList(), getCommandTypeIfComplement(processInstance, command), processInstance.getScheduleTime(), timezoneId); processInstance.setGlobalParams(globalParams); processInstance.setProcessInstancePriority(command.getProcessInstancePriority()); String workerGroup = Strings.isNullOrEmpty(command.getWorkerGroup()) ? Constants.DEFAULT_WORKER_GROUP : command.getWorkerGroup(); processInstance.setWorkerGroup(workerGroup); processInstance.setEnvironmentCode(Objects.isNull(command.getEnvironmentCode()) ? -1 : command.getEnvironmentCode()); processInstance.setTimeout(processDefinition.getTimeout()); processInstance.setTenantId(processDefinition.getTenantId()); return processInstance; } private void setGlobalParamIfCommanded(ProcessDefinition processDefinition, Map<String, String> cmdParam) { Map<String, String> startParamMap = new HashMap<>();
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
if (cmdParam != null && cmdParam.containsKey(Constants.CMD_PARAM_START_PARAMS)) { String startParamJson = cmdParam.get(Constants.CMD_PARAM_START_PARAMS); startParamMap = JSONUtils.toMap(startParamJson); } Map<String, String> fatherParamMap = new HashMap<>(); if (cmdParam != null && cmdParam.containsKey(Constants.CMD_PARAM_FATHER_PARAMS)) { String fatherParamJson = cmdParam.get(Constants.CMD_PARAM_FATHER_PARAMS); fatherParamMap = JSONUtils.toMap(fatherParamJson); } startParamMap.putAll(fatherParamMap); Map<String, String> globalMap = processDefinition.getGlobalParamMap(); List<Property> globalParamList = processDefinition.getGlobalParamList(); if (startParamMap.size() > 0 && globalMap != null) { for (Map.Entry<String, String> param : globalMap.entrySet()) { String val = startParamMap.get(param.getKey()); if (val != null) { param.setValue(val); } } for (Entry<String, String> startParam : startParamMap.entrySet()) { if (!globalMap.containsKey(startParam.getKey())) { globalMap.put(startParam.getKey(), startParam.getValue()); globalParamList.add(new Property(startParam.getKey(), IN, VARCHAR, startParam.getValue())); } } } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.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 */ @Override 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; } /** * get an environment * use the code of the environment to find a environment. * * @param environmentCode environmentCode
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* @return Environment */ @Override public Environment findEnvironmentByCode(Long environmentCode) { Environment environment = null; if (environmentCode >= 0) { environment = environmentMapper.queryByEnvironmentCode(environmentCode); } return environment; } /** * check command parameters is valid * * @param command command * @param cmdParam cmdParam map * @return whether command param is valid */ 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_NODES) || cmdParam.get(Constants.CMD_PARAM_START_NODES).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.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* * @param command command * @param host host * @return process instance */ protected ProcessInstance constructProcessInstance(Command command, String host) throws CronParseException, CodeGenerateException { ProcessInstance processInstance; ProcessDefinition processDefinition; CommandType commandType = command.getCommandType(); processDefinition = this.findProcessDefinition(command.getProcessDefinitionCode(), command.getProcessDefinitionVersion()); if (processDefinition == null) { logger.error("cannot find the work process define! define code : {}", command.getProcessDefinitionCode()); throw new IllegalArgumentException("Cannot find the process definition for this workflowInstance"); } Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam()); int processInstanceId = command.getProcessInstanceId(); if (processInstanceId == 0) { processInstance = generateNewProcessInstance(processDefinition, command, cmdParam); } else { processInstance = this.findProcessInstanceDetailById(processInstanceId); if (processInstance == null) { return null; } } if (cmdParam != null) { CommandType commandTypeIfComplement = getCommandTypeIfComplement(processInstance, command); if (commandTypeIfComplement == CommandType.REPEAT_RUNNING) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
setGlobalParamIfCommanded(processDefinition, cmdParam); } String timezoneId = cmdParam.get(Constants.SCHEDULE_TIMEZONE); String globalParams = curingGlobalParamsService.curingGlobalParams(processInstance.getId(), processDefinition.getGlobalParamMap(), processDefinition.getGlobalParamList(), commandTypeIfComplement, processInstance.getScheduleTime(), timezoneId); processInstance.setGlobalParams(globalParams); processInstance.setProcessDefinition(processDefinition); } if (processInstance.getCommandParam() != null) { Map<String, String> processCmdParam = JSONUtils.toMap(processInstance.getCommandParam()); processCmdParam.forEach((key, value) -> { if (!cmdParam.containsKey(key)) { cmdParam.put(key, value); } }); } if (cmdParam != null && cmdParam.containsKey(Constants.CMD_PARAM_SUB_PROCESS)) { processInstance.setCommandParam(command.getCommandParam()); } if (Boolean.FALSE.equals(checkCmdParam(command, cmdParam))) { logger.error("command parameter check failed!"); return null; }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
if (command.getScheduleTime() != null) { processInstance.setScheduleTime(command.getScheduleTime()); } processInstance.setHost(host); processInstance.setRestartTime(new Date()); 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_WAITING_THREAD: break;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
case RECOVER_SUSPENDED_PROCESS: cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING); 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); processInstance.setRunTimes(runTime + 1); runStatus = processInstance.getState(); break; case COMPLEMENT_DATA: if (processInstance.getId() != 0) { List<TaskInstance> taskInstanceList = this.findValidTaskListByProcessId(processInstance.getId()); for (TaskInstance taskInstance : taskInstanceList) { taskInstance.setFlag(Flag.NO); this.updateTaskInstance(taskInstance); } }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
break; case REPEAT_RUNNING: if (cmdParam.containsKey(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING)) { cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING); 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.setRestartTime(processInstance.getStartTime()); processInstance.setEndTime(null); processInstance.setRunTimes(runTime + 1); initComplementDataParam(processDefinition, processInstance, cmdParam); break; case SCHEDULER: break; default: break; } processInstance.setState(runStatus); return processInstance; } /** * get process definition by command * If it is a fault-tolerant command, get the specified version of ProcessDefinition through ProcessInstance
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* Otherwise, get the latest version of ProcessDefinition * * @return ProcessDefinition */ private ProcessDefinition getProcessDefinitionByCommand(long processDefinitionCode, Map<String, String> cmdParam) { if (cmdParam != null) { int processInstanceId = 0; if (cmdParam.containsKey(Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING)) { processInstanceId = Integer.parseInt(cmdParam.get(Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING)); } else if (cmdParam.containsKey(Constants.CMD_PARAM_SUB_PROCESS)) { processInstanceId = Integer.parseInt(cmdParam.get(Constants.CMD_PARAM_SUB_PROCESS)); } else if (cmdParam.containsKey(Constants.CMD_PARAM_RECOVERY_WAITING_THREAD)) { processInstanceId = Integer.parseInt(cmdParam.get(Constants.CMD_PARAM_RECOVERY_WAITING_THREAD)); } if (processInstanceId != 0) { ProcessInstance processInstance = this.findProcessInstanceDetailById(processInstanceId); if (processInstance == null) { return null; } return processDefineLogMapper.queryByDefinitionCodeAndVersion( processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion()); } } return processDefineMapper.queryByCode(processDefinitionCode); } /** * return complement data if the process start with complement data * * @param processInstance processInstance * @param command command
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* @return command type */ private CommandType getCommandTypeIfComplement(ProcessInstance processInstance, Command command) { if (CommandType.COMPLEMENT_DATA == processInstance.getCmdTypeIfComplement()) { 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) throws CronParseException { if (!processInstance.isComplementData()) { return; } Date start = DateUtils.stringToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE)); Date end = DateUtils.stringToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE)); List<Date> complementDate = Lists.newLinkedList(); if (start != null && end != null) { List<Schedule> listSchedules = queryReleaseSchedulerListByProcessDefinitionCode(processInstance.getProcessDefinitionCode()); complementDate = CronUtils.getSelfFireDateList(start, end, listSchedules); }
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
if (cmdParam.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) { complementDate = CronUtils.getSelfScheduleDateList(cmdParam); } if (complementDate.size() > 0 && Flag.NO == processInstance.getIsSubProcess()) { processInstance.setScheduleTime(complementDate.get(0)); } String timezoneId = cmdParam.get(Constants.SCHEDULE_TIMEZONE); String globalParams = curingGlobalParamsService.curingGlobalParams(processInstance.getId(), processDefinition.getGlobalParamMap(), processDefinition.getGlobalParamList(), CommandType.COMPLEMENT_DATA, processInstance.getScheduleTime(), timezoneId); processInstance.setGlobalParams(globalParams); } /** * set sub work process parameters. * 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 */ @Override public void setSubProcessParam(ProcessInstance subProcessInstance) { String cmdParam = subProcessInstance.getCommandParam(); if (Strings.isNullOrEmpty(cmdParam)) { return; } Map<String, String> paramMap = JSONUtils.toMap(cmdParam); if (paramMap.containsKey(CMD_PARAM_SUB_PROCESS)
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
&& 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 (!Strings.isNullOrEmpty(parentInstanceId)) { ProcessInstance parentInstance = findProcessInstanceDetailById(Integer.parseInt(parentInstanceId)); if (parentInstance != null) { subProcessInstance.setGlobalParams(joinGlobalParams(parentInstance.getGlobalParams(), subProcessInstance.getGlobalParams())); subProcessInstance.setVarPool(joinVarPool(parentInstance.getVarPool(), subProcessInstance.getVarPool())); this.saveProcessInstance(subProcessInstance); } else { logger.error("sub process command params error, cannot find parent instance: {} ", cmdParam); } } ProcessInstanceMap processInstanceMap = JSONUtils.parseObject(cmdParam, ProcessInstanceMap.class); if (processInstanceMap == null || processInstanceMap.getParentProcessInstanceId() == 0) { return; } processInstanceMap.setProcessInstanceId(subProcessInstance.getId()); this.updateWorkProcessInstanceMap(processInstanceMap); } /** * join parent global params into sub process. * only the keys doesn't in sub process global would be joined.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* * @param parentGlobalParams parentGlobalParams * @param subGlobalParams subGlobalParams * @return global params join */ private String joinGlobalParams(String parentGlobalParams, String subGlobalParams) { List<Property> parentParams = Lists.newArrayList(JSONUtils.toList(parentGlobalParams, Property.class)); List<Property> subParams = JSONUtils.toList(subGlobalParams, Property.class); Set<String> parentParamKeys = parentParams.stream().map(Property::getProp).collect(toSet()); List<Property> extraSubParams = subParams.stream() .filter(subProp -> !parentParamKeys.contains(subProp.getProp())).collect(Collectors.toList()); parentParams.addAll(extraSubParams); return JSONUtils.toJsonString(parentParams); } /** * join parent var pool params into sub process. * only the keys doesn't in sub process global would be joined. * * @param parentValPool * @param subValPool * @return */ private String joinVarPool(String parentValPool, String subValPool) { List<Property> parentValPools = Lists.newArrayList(JSONUtils.toList(parentValPool, Property.class));
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
parentValPools = parentValPools.stream().filter(valPool -> valPool.getDirect() == Direct.OUT).collect(Collectors.toList()); List<Property> subValPools = Lists.newArrayList(JSONUtils.toList(subValPool, Property.class)); Set<String> parentValPoolKeys = parentValPools.stream().map(Property::getProp).collect(toSet()); List<Property> extraSubValPools = subValPools.stream().filter(sub -> !parentValPoolKeys.contains(sub.getProp())).collect(Collectors.toList()); parentValPools.addAll(extraSubValPools); return JSONUtils.toJsonString(parentValPools); } /** * initialize task instance * * @param taskInstance taskInstance */ private void initTaskInstance(TaskInstance taskInstance) { if (!taskInstance.isSubProcess() && (taskInstance.getState().typeIsCancel() || taskInstance.getState().typeIsFailure())) { taskInstance.setFlag(Flag.NO); updateTaskInstance(taskInstance); return; } taskInstance.setState(ExecutionStatus.SUBMITTED_SUCCESS); updateTaskInstance(taskInstance); } /** * retry submit task to db */ @Override public TaskInstance submitTaskWithRetry(ProcessInstance processInstance, TaskInstance taskInstance, int commitRetryTimes, long commitInterval) { int retryTimes = 1; TaskInstance task = null; while (retryTimes <= commitRetryTimes) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
try { task = processService.submitTask(processInstance, taskInstance); if (task != null && task.getId() != 0) { break; } logger.error( "task commit to db failed , taskCode: {} has already retry {} times, please check the database", taskInstance.getTaskCode(), retryTimes); Thread.sleep(commitInterval); } catch (Exception e) { logger.error("task commit to db failed", e); } finally { retryTimes += 1; } } return task; } /** * // todo: This method need to refactor, we find when the db down, but the taskInstanceId is not 0. It's better to change to void, rather than return TaskInstance * submit task to db * submit sub process to command * * @param processInstance processInstance * @param taskInstance taskInstance * @return task instance */ @Override
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
@Transactional public TaskInstance submitTask(ProcessInstance processInstance, TaskInstance taskInstance) { logger.info("Start save taskInstance to database : {}, processInstance id:{}, state: {}", taskInstance.getName(), taskInstance.getProcessInstanceId(), processInstance.getState()); TaskInstance task = submitTaskInstanceToDB(taskInstance, processInstance); if (task == null) { logger.error("Save taskInstance to db error, task name:{}, process id:{} state: {} ", taskInstance.getName(), taskInstance.getProcessInstance().getId(), processInstance.getState()); return null; } if (!task.getState().typeIsFinished()) { createSubWorkProcess(processInstance, task); } logger.info( "End save taskInstance to db successfully:{}, taskInstanceName: {}, taskInstance state:{}, processInstanceId:{}, processInstanceState: {}", task.getId(), task.getName(), task.getState(), processInstance.getId(), processInstance.getState()); return task; } /** * set work process instance map * consider o
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* repeat running does not generate new sub process instance * set map {parent instance id, task instance id, 0(child instance id)} * * @param parentInstance parentInstance * @param parentTask parentTask * @return process instance map */ private ProcessInstanceMap setProcessInstanceMap(ProcessInstance parentInstance, TaskInstance parentTask) { ProcessInstanceMap processMap = findWorkProcessMapByParent(parentInstance.getId(), parentTask.getId()); if (processMap != null) { return processMap; } if (parentInstance.getCommandType() == CommandType.REPEAT_RUNNING) { processMap = findPreviousTaskProcessMap(parentInstance, parentTask); if (processMap != null) { processMap.setParentTaskInstanceId(parentTask.getId()); updateWorkProcessInstanceMap(processMap); return processMap; } } processMap = new ProcessInstanceMap(); processMap.setParentProcessInstanceId(parentInstance.getId()); processMap.setParentTaskInstanceId(parentTask.getId()); createWorkProcessInstanceMap(processMap); return processMap; } /** * find previous task work process map.
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* * @param parentProcessInstance parentProcessInstance * @param parentTask parentTask * @return process instance map */ private ProcessInstanceMap findPreviousTaskProcessMap(ProcessInstance parentProcessInstance, TaskInstance parentTask) { Integer preTaskId = 0; List<TaskInstance> preTaskList = this.findPreviousTaskListByWorkProcessId(parentProcessInstance.getId()); for (TaskInstance task : preTaskList) { if (task.getName().equals(parentTask.getName())) { preTaskId = task.getId(); ProcessInstanceMap map = findWorkProcessMapByParent(parentProcessInstance.getId(), preTaskId); if (map != null) { return map; } } } logger.info("sub process instance is not found,parent task:{},parent instance:{}", parentTask.getId(), parentProcessInstance.getId()); return null; } /** * create sub work process command * * @param parentProcessInstance parentProcessInstance * @param task task */ @Override public void createSubWorkProcess(ProcessInstance parentProcessInstance, TaskInstance task) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
if (!task.isSubProcess()) { return; } ProcessInstanceMap instanceMap = findWorkProcessMapByParent(parentProcessInstance.getId(), task.getId()); if (null != instanceMap && CommandType.RECOVER_TOLERANCE_FAULT_PROCESS == parentProcessInstance.getCommandType()) { return; } instanceMap = setProcessInstanceMap(parentProcessInstance, task); ProcessInstance childInstance = null; if (instanceMap.getProcessInstanceId() != 0) { childInstance = findProcessInstanceById(instanceMap.getProcessInstanceId()); } Command subProcessCommand = createSubProcessCommand(parentProcessInstance, childInstance, instanceMap, task); updateSubProcessDefinitionByParent(parentProcessInstance, subProcessCommand.getProcessDefinitionCode()); initSubInstanceState(childInstance); createCommand(subProcessCommand); logger.info("sub process command created: {} ", subProcessCommand); } /** * complement data needs transform parent parameter to child. */ protected String getSubWorkFlowParam(ProcessInstanceMap instanceMap, ProcessInstance parentProcessInstance, Map<String, String> fatherParams) { String processMapStr = JSONUtils.toJsonString(instanceMap); Map<String, String> cmdParam = JSONUtils.toMap(processMapStr); if (parentProcessInstance.isComplementData()) { Map<String, String> parentParam = JSONUtils.toMap(parentProcessInstance.getCommandParam()); String endTime = parentParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
String startTime = parentParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE); String scheduleTime = parentParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST); if (StringUtils.isNotEmpty(startTime) && StringUtils.isNotEmpty(endTime)) { cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, endTime); cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, startTime); } if (StringUtils.isNotEmpty(scheduleTime)) { cmdParam.put(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, scheduleTime); } processMapStr = JSONUtils.toJsonString(cmdParam); } if (fatherParams.size() != 0) { cmdParam.put(CMD_PARAM_FATHER_PARAMS, JSONUtils.toJsonString(fatherParams)); processMapStr = JSONUtils.toJsonString(cmdParam); } return processMapStr; } @Override public Map<String, String> getGlobalParamMap(String globalParams) { List<Property> propList; Map<String, String> globalParamMap = new HashMap<>(); if (!Strings.isNullOrEmpty(globalParams)) { propList = JSONUtils.toList(globalParams, Property.class); globalParamMap = propList.stream().collect(Collectors.toMap(Property::getProp, Property::getValue)); } return globalParamMap; } /** * create sub work process command */
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
@Override public Command createSubProcessCommand(ProcessInstance parentProcessInstance, ProcessInstance childInstance, ProcessInstanceMap instanceMap, TaskInstance task) { CommandType commandType = getSubCommandType(parentProcessInstance, childInstance); Map<String, Object> subProcessParam = JSONUtils.toMap(task.getTaskParams(), String.class, Object.class); long childDefineCode = 0L; if (subProcessParam.containsKey(Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE)) { childDefineCode = Long.parseLong(String.valueOf(subProcessParam.get(Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE))); } ProcessDefinition subProcessDefinition = processDefineMapper.queryByCode(childDefineCode); Object localParams = subProcessParam.get(Constants.LOCAL_PARAMS); List<Property> allParam = JSONUtils.toList(JSONUtils.toJsonString(localParams), Property.class); Map<String, String> globalMap = this.getGlobalParamMap(task.getVarPool()); Map<String, String> fatherParams = new HashMap<>(); if (CollectionUtils.isNotEmpty(allParam)) { for (Property info : allParam) { if (Direct.OUT == info.getDirect()) { continue; } fatherParams.put(info.getProp(), globalMap.get(info.getProp())); } } String processParam = getSubWorkFlowParam(instanceMap, parentProcessInstance, fatherParams); int subProcessInstanceId = childInstance == null ? 0 : childInstance.getId(); return new Command( commandType, TaskDependType.TASK_POST, parentProcessInstance.getFailureStrategy(),
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
parentProcessInstance.getExecutorId(), subProcessDefinition.getCode(), processParam, parentProcessInstance.getWarningType(), parentProcessInstance.getWarningGroupId(), parentProcessInstance.getScheduleTime(), task.getWorkerGroup(), task.getEnvironmentCode(), parentProcessInstance.getProcessInstancePriority(), parentProcessInstance.getDryRun(), subProcessInstanceId, subProcessDefinition.getVersion() ); } /** * initialize sub work flow state * child instance state would be initialized when 'recovery from pause/stop/failure' */ private void initSubInstanceState(ProcessInstance childInstance) { if (childInstance != null) { childInstance.setState(ExecutionStatus.RUNNING_EXECUTION); updateProcessInstance(childInstance); } } /** * get sub work flow command type * child instance exist: child command = fatherCommand * child instance not exists: child command = fatherCommand[0] */ private CommandType getSubCommandType(ProcessInstance parentProcessInstance, ProcessInstance childInstance) {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
CommandType commandType = parentProcessInstance.getCommandType(); if (childInstance == null) { String fatherHistoryCommand = parentProcessInstance.getHistoryCmd(); commandType = CommandType.valueOf(fatherHistoryCommand.split(Constants.COMMA)[0]); } return commandType; } /** * update sub process definition * * @param parentProcessInstance parentProcessInstance * @param childDefinitionCode childDefinitionId */ private void updateSubProcessDefinitionByParent(ProcessInstance parentProcessInstance, long childDefinitionCode) { ProcessDefinition fatherDefinition = this.findProcessDefinition(parentProcessInstance.getProcessDefinitionCode(), parentProcessInstance.getProcessDefinitionVersion()); ProcessDefinition childDefinition = this.findProcessDefinitionByCode(childDefinitionCode); if (childDefinition != null && fatherDefinition != null) { childDefinition.setWarningGroupId(fatherDefinition.getWarningGroupId()); processDefineMapper.updateById(childDefinition); } } /** * submit task to mysql * * @param taskInstance taskInstance * @param processInstance processInstance * @return task instance */ @Override
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
public TaskInstance submitTaskInstanceToDB(TaskInstance taskInstance, ProcessInstance processInstance) { ExecutionStatus processInstanceState = processInstance.getState(); if (processInstanceState.typeIsFinished() || processInstanceState == ExecutionStatus.READY_STOP) { logger.warn("processInstance: {} state was: {}, skip submit this task, taskCode: {}", processInstance.getId(), processInstanceState, taskInstance.getTaskCode()); return null; } if (processInstanceState == ExecutionStatus.READY_PAUSE) { taskInstance.setState(ExecutionStatus.PAUSE); } taskInstance.setExecutorId(processInstance.getExecutorId()); taskInstance.setState(getSubmitTaskState(taskInstance, processInstance)); if (taskInstance.getSubmitTime() == null) { taskInstance.setSubmitTime(new Date()); } if (taskInstance.getFirstSubmitTime() == null) { taskInstance.setFirstSubmitTime(taskInstance.getSubmitTime()); } boolean saveResult = saveTaskInstance(taskInstance); if (!saveResult) { return null; } return taskInstance; } /** * get submit task instance state by the work process state * cannot modify the task state when running/kill/submit success, or this * task instance is already exists in task queue .
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* return pause if work process state is ready pause * return stop if work process state is ready stop * if all of above are not satisfied, return submit success * * @param taskInstance taskInstance * @param processInstance processInstance * @return process instance state */ @Override public ExecutionStatus getSubmitTaskState(TaskInstance taskInstance, ProcessInstance processInstance) { ExecutionStatus state = taskInstance.getState(); if ( state == ExecutionStatus.RUNNING_EXECUTION || state == ExecutionStatus.DELAY_EXECUTION || state == ExecutionStatus.KILL || state == ExecutionStatus.DISPATCH ) { return state; } if (processInstance.getState() == ExecutionStatus.READY_PAUSE) { state = ExecutionStatus.PAUSE; } else if (processInstance.getState() == ExecutionStatus.READY_STOP || !checkProcessStrategy(taskInstance, processInstance)) { state = ExecutionStatus.KILL; } else {
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
state = ExecutionStatus.SUBMITTED_SUCCESS; } return state; } /** * check process instance strategy * * @param taskInstance taskInstance * @return check strategy result */ private boolean checkProcessStrategy(TaskInstance taskInstance, ProcessInstance processInstance) { FailureStrategy failureStrategy = processInstance.getFailureStrategy(); if (failureStrategy == FailureStrategy.CONTINUE) { return true; } List<TaskInstance> taskInstances = this.findValidTaskListByProcessId(taskInstance.getProcessInstanceId()); for (TaskInstance task : taskInstances) { if (task.getState() == ExecutionStatus.FAILURE && task.getRetryTimes() >= task.getMaxRetryTimes()) { return false; } } return true; } /** * insert or update work process instance to data base * * @param processInstance processInstance */ @Override
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
public void saveProcessInstance(ProcessInstance processInstance) { if (processInstance == null) { logger.error("save error, process instance is null!"); return; } if (processInstance.getId() != 0) { processInstanceMapper.updateById(processInstance); } else { processInstanceMapper.insert(processInstance); } } /** * insert or update command * * @param command command * @return save command result */ @Override public int saveCommand(Command command) { if (command.getId() != 0) { return commandMapper.updateById(command); } else { return commandMapper.insert(command); } } /** * insert or update task instance * * @param taskInstance taskInstance * @return save task instance result
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
*/ @Override public boolean saveTaskInstance(TaskInstance taskInstance) { if (taskInstance.getId() != 0) { return updateTaskInstance(taskInstance); } else { return createTaskInstance(taskInstance); } } /** * insert task instance * * @param taskInstance taskInstance * @return create task instance result */ @Override public boolean createTaskInstance(TaskInstance taskInstance) { int count = taskInstanceMapper.insert(taskInstance); return count > 0; } /** * update task instance * * @param taskInstance taskInstance * @return update task instance result */ @Override public boolean updateTaskInstance(TaskInstance taskInstance) { int count = taskInstanceMapper.updateById(taskInstance); return count > 0;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
} /** * find task instance by id * * @param taskId task id * @return task instance */ @Override public TaskInstance findTaskInstanceById(Integer taskId) { return taskInstanceMapper.selectById(taskId); } /** * find task instance list by id list * * @param idList task id list * @return task instance list */ @Override public List<TaskInstance> findTaskInstanceByIdList(List<Integer> idList) { if (CollectionUtils.isEmpty(idList)) { return new ArrayList<>(); } return taskInstanceMapper.selectBatchIds(idList); } /** * package task instance */ @Override public void packageTaskInstance(TaskInstance taskInstance, ProcessInstance processInstance) { taskInstance.setProcessInstance(processInstance);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
taskInstance.setProcessDefine(processInstance.getProcessDefinition()); taskInstance.setProcessInstancePriority(processInstance.getProcessInstancePriority()); TaskDefinition taskDefinition = this.findTaskDefinition( taskInstance.getTaskCode(), taskInstance.getTaskDefinitionVersion()); this.updateTaskDefinitionResources(taskDefinition); taskInstance.setTaskDefine(taskDefinition); } /** * Update {@link ResourceInfo} information in {@link TaskDefinition} * * @param taskDefinition the given {@link TaskDefinition} */ @Override public void updateTaskDefinitionResources(TaskDefinition taskDefinition) { Map<String, Object> taskParameters = JSONUtils.parseObject( taskDefinition.getTaskParams(), new TypeReference<Map<String, Object>>() { }); if (taskParameters != null) { if (taskParameters.containsKey("mainJar")) { Object mainJarObj = taskParameters.get("mainJar"); ResourceInfo mainJar = JSONUtils.parseObject( JSONUtils.toJsonString(mainJarObj), ResourceInfo.class); ResourceInfo resourceInfo = updateResourceInfo(mainJar); if (resourceInfo != null) { taskParameters.put("mainJar", resourceInfo);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
} } if (taskParameters.containsKey("resourceList")) { String resourceListStr = JSONUtils.toJsonString(taskParameters.get("resourceList")); List<ResourceInfo> resourceInfos = JSONUtils.toList(resourceListStr, ResourceInfo.class); List<ResourceInfo> updatedResourceInfos = resourceInfos .stream() .map(this::updateResourceInfo) .filter(Objects::nonNull) .collect(Collectors.toList()); taskParameters.put("resourceList", updatedResourceInfos); } taskDefinition.setTaskParams(JSONUtils.toJsonString(taskParameters)); } } /** * update {@link ResourceInfo} by given original ResourceInfo * * @param res origin resource info * @return {@link ResourceInfo} */ private ResourceInfo updateResourceInfo(ResourceInfo res) { ResourceInfo resourceInfo = null; if (res != null) { int resourceId = res.getId(); if (resourceId <= 0) { logger.error("invalid resourceId, {}", resourceId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
return null; } resourceInfo = new ResourceInfo(); Resource resource = getResourceById(resourceId); resourceInfo.setId(resourceId); resourceInfo.setRes(resource.getFileName()); resourceInfo.setResourceName(resource.getFullName()); if (logger.isInfoEnabled()) { logger.info("updated resource info {}", JSONUtils.toJsonString(resourceInfo)); } } return resourceInfo; } /** * get id list by task state * * @param instanceId instanceId * @param state state * @return task instance states */ @Override public List<Integer> findTaskIdByInstanceState(int instanceId, ExecutionStatus state) { return taskInstanceMapper.queryTaskByProcessIdAndState(instanceId, state.ordinal()); } /** * find valid task list by process definition id * * @param processInstanceId processInstanceId
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* @return task instance list */ @Override public List<TaskInstance> findValidTaskListByProcessId(Integer processInstanceId) { return taskInstanceMapper.findValidTaskListByProcessId(processInstanceId, Flag.YES); } /** * find previous task list by work process id * * @param processInstanceId processInstanceId * @return task instance list */ @Override public List<TaskInstance> findPreviousTaskListByWorkProcessId(Integer processInstanceId) { return taskInstanceMapper.findValidTaskListByProcessId(processInstanceId, Flag.NO); } /** * update work process instance map * * @param processInstanceMap processInstanceMap * @return update process instance result */ @Override public int updateWorkProcessInstanceMap(ProcessInstanceMap processInstanceMap) { return processInstanceMapMapper.updateById(processInstanceMap); } /** * create work process instance map * * @param processInstanceMap processInstanceMap
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
* @return create process instance result */ @Override public int createWorkProcessInstanceMap(ProcessInstanceMap processInstanceMap) { int count = 0; if (processInstanceMap != null) { return processInstanceMapMapper.insert(processInstanceMap); } return count; } /** * find work process map by parent process id and parent task id. * * @param parentWorkProcessId parentWorkProcessId * @param parentTaskId parentTaskId * @return process instance map */ @Override public ProcessInstanceMap findWorkProcessMapByParent(Integer parentWorkProcessId, Integer parentTaskId) { return processInstanceMapMapper.queryByParentId(parentWorkProcessId, parentTaskId); } /** * delete work process map by parent process id * * @param parentWorkProcessId parentWorkProcessId * @return delete process map result */ @Override public int deleteWorkProcessMapByParentId(int parentWorkProcessId) { return processInstanceMapMapper.deleteByParentProcessId(parentWorkProcessId);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
} /** * find sub process instance * * @param parentProcessId parentProcessId * @param parentTaskId parentTaskId * @return process instance */ @Override public ProcessInstance findSubProcessInstance(Integer parentProcessId, Integer parentTaskId) { ProcessInstance processInstance = null; ProcessInstanceMap processInstanceMap = processInstanceMapMapper.queryByParentId(parentProcessId, parentTaskId); if (processInstanceMap == null || processInstanceMap.getProcessInstanceId() == 0) { return processInstance; } processInstance = findProcessInstanceById(processInstanceMap.getProcessInstanceId()); return processInstance; } /** * find parent process instance * * @param subProcessId subProcessId * @return process instance */ @Override public ProcessInstance findParentProcessInstance(Integer subProcessId) { ProcessInstance processInstance = null; ProcessInstanceMap processInstanceMap = processInstanceMapMapper.queryBySubProcessId(subProcessId); if (processInstanceMap == null || processInstanceMap.getProcessInstanceId() == 0) { return processInstance;
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
} processInstance = findProcessInstanceById(processInstanceMap.getParentProcessInstanceId()); return processInstance; } /** * update process instance * * @param processInstance processInstance * @return update process instance result */ @Override public int updateProcessInstance(ProcessInstance processInstance) { return processInstanceMapper.updateById(processInstance); } /** * for show in page of taskInstance */ @Override public void changeOutParam(TaskInstance taskInstance) { if (Strings.isNullOrEmpty(taskInstance.getVarPool())) { return; } List<Property> properties = JSONUtils.toList(taskInstance.getVarPool(), Property.class); if (CollectionUtils.isEmpty(properties)) { return; } Map<String, Object> taskParams = JSONUtils.parseObject(taskInstance.getTaskParams(), new TypeReference<Map<String, Object>>() { }); Object localParams = taskParams.get(LOCAL_PARAMS);
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
if (localParams == null) { return; } List<Property> allParam = JSONUtils.toList(JSONUtils.toJsonString(localParams), Property.class); Map<String, String> outProperty = new HashMap<>(); for (Property info : properties) { if (info.getDirect() == Direct.OUT) { outProperty.put(info.getProp(), info.getValue()); } } for (Property info : allParam) { if (info.getDirect() == Direct.OUT) { String paramName = info.getProp(); info.setValue(outProperty.get(paramName)); } } taskParams.put(LOCAL_PARAMS, allParam); taskInstance.setTaskParams(JSONUtils.toJsonString(taskParams)); } /** * convert integer list to string list * * @param intList intList * @return string list */ private List<String> convertIntListToString(List<Integer> intList) { if (intList == null) { return new ArrayList<>(); } List<String> result = new ArrayList<>(intList.size());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
for (Integer intVar : intList) { result.add(String.valueOf(intVar)); } return result; } /** * query schedule by id * * @param id id * @return schedule */ @Override public Schedule querySchedule(int id) { return scheduleMapper.selectById(id); } /** * query Schedule by processDefinitionCode * * @param processDefinitionCode processDefinitionCode * @see Schedule */ @Override public List<Schedule> queryReleaseSchedulerListByProcessDefinitionCode(long processDefinitionCode) { return scheduleMapper.queryReleaseSchedulerListByProcessDefinitionCode(processDefinitionCode); } /** * query Schedule by processDefinitionCode * * @param processDefinitionCodeList processDefinitionCodeList * @see Schedule
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
*/ @Override public Map<Long, String> queryWorkerGroupByProcessDefinitionCodes(List<Long> processDefinitionCodeList) { List<Schedule> processDefinitionScheduleList = scheduleMapper.querySchedulesByProcessDefinitionCodes(processDefinitionCodeList); return processDefinitionScheduleList.stream().collect(Collectors.toMap(Schedule::getProcessDefinitionCode, Schedule::getWorkerGroup)); } /** * query dependent process definition by process definition code * * @param processDefinitionCode processDefinitionCode * @see DependentProcessDefinition */ @Override public List<DependentProcessDefinition> queryDependentProcessDefinitionByProcessDefinitionCode(long processDefinitionCode) { return workFlowLineageMapper.queryDependentProcessDefinitionByProcessDefinitionCode(processDefinitionCode); } /** * query need failover process instance * * @param host host * @return process instance list */ @Override public List<ProcessInstance> queryNeedFailoverProcessInstances(String host) { return processInstanceMapper.queryByHostAndStatus(host, ExecutionStatus.getNeedFailoverWorkflowInstanceState()); } @Override public List<String> queryNeedFailoverProcessInstanceHost() { return processInstanceMapper.queryNeedFailoverProcessInstanceHost(ExecutionStatus.getNeedFailoverWorkflowInstanceState());
closed
apache/dolphinscheduler
https://github.com/apache/dolphinscheduler
10,916
[BUG-BE][Complete Data] Under the serial strategy, the complement function is abnormal.
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Under the serial strategy, the complement function is abnormal. ### What you expected to happen normal execution ### How to reproduce 1. create shell task (sleep 60s) 2. select serial wait strategy 3. run shell task 4. run parallel complement (Choose 3 dates, choose 3 for parallelism) ### Anything else No ### Version dev ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
https://github.com/apache/dolphinscheduler/issues/10916
https://github.com/apache/dolphinscheduler/pull/10917
2a67866718a74a6abc30fb615c0e16978511e3eb
2397423eb6893458cd13866dd16b2c2e92dda437
2022-07-12T19:10:14Z
java
2022-07-13T03:23:47Z
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java
} /** * process need failover process instance * * @param processInstance processInstance */ @Override @Transactional public void processNeedFailoverProcessInstances(ProcessInstance processInstance) { processInstance.setHost(Constants.NULL); processInstanceMapper.updateById(processInstance); ProcessDefinition processDefinition = findProcessDefinition(processInstance.getProcessDefinitionCode(), processInstance.getProcessDefinitionVersion()); Command cmd = new Command(); cmd.setProcessDefinitionCode(processDefinition.getCode()); cmd.setProcessDefinitionVersion(processDefinition.getVersion()); cmd.setProcessInstanceId(processInstance.getId()); cmd.setCommandParam(String.format("{\"%s\":%d}", Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING, processInstance.getId())); cmd.setExecutorId(processInstance.getExecutorId()); cmd.setCommandType(CommandType.RECOVER_TOLERANCE_FAULT_PROCESS); cmd.setProcessInstancePriority(processInstance.getProcessInstancePriority()); createCommand(cmd); } /** * query all need failover task instances by host * * @param host host * @return task instance list */