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
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
* ENDED
*/
public static final String ENDED = "ENDED";
/**
* NEW
*/
public static final String NEW = "NEW";
/**
* NEW_SAVING
*/
public static final String NEW_SAVING = "NEW_SAVING";
/**
* SUBMITTED
*/
public static final String SUBMITTED = "SUBMITTED";
/**
* FAILED
*/
public static final String FAILED = "FAILED";
/**
* KILLED
*/
public static final String KILLED = "KILLED";
/**
* RUNNING
*/
public static final String RUNNING = "RUNNING";
/**
* underline "_"
*/
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
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";
/**
* 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";
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
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';
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";
/**
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
* 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;
/**
* 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";
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
/**
* 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
*/
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[]{
WorkflowExecutionStatus.SUBMITTED_SUCCESS.getCode(),
TaskExecutionStatus.DISPATCH.getCode(),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
WorkflowExecutionStatus.RUNNING_EXECUTION.getCode(),
WorkflowExecutionStatus.DELAY_EXECUTION.getCode(),
WorkflowExecutionStatus.READY_PAUSE.getCode(),
WorkflowExecutionStatus.READY_STOP.getCode(),
TaskExecutionStatus.NEED_FAULT_TOLERANCE.getCode(),
};
public static final int[] RUNNING_PROCESS_STATE = new int[]{
TaskExecutionStatus.RUNNING_EXECUTION.getCode(),
TaskExecutionStatus.SUBMITTED_SUCCESS.getCode(),
TaskExecutionStatus.DISPATCH.getCode(),
WorkflowExecutionStatus.SERIAL_WAIT.getCode()
};
/**
* 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
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
*/
public static final String PAGE_NUMBER = "pageNo";
/**
*
*/
public static final String DATA_LIST = "data";
public static final String TOTAL_LIST = "totalList";
public static final String CURRENT_PAGE = "currentPage";
public static final String TOTAL_PAGE = "totalPage";
public static final String TOTAL = "total";
/**
* workflow
*/
public static final String WORKFLOW_LIST = "workFlowList";
public static final String WORKFLOW_RELATION_LIST = "workFlowRelationList";
/**
* session user
*/
public static final String SESSION_USER = "session.user";
public static final String SESSION_ID = "sessionId";
/**
* 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";
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
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";
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;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
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
*/
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
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
*/
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'";
/**
* 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
*/
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/Constants.java
|
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;
/**
* Security authentication types (supported types: PASSWORD,LDAP)
*/
public static final String SECURITY_CONFIG_TYPE = "securityConfigType";
public static final String SECURITY_CONFIG_TYPE_PASSWORD = "PASSWORD";
public static final String SECURITY_CONFIG_TYPE_LDAP = "LDAP";
/**
* Task Types
*/
public static final String TYPE_UNIVERSAL = "Universal";
public static final String TYPE_DATA_INTEGRATION = "DataIntegration";
public static final String TYPE_CLOUD = "Cloud";
public static final String TYPE_LOGIC = "Logic";
public static final String TYPE_DATA_QUALITY = "DataQuality";
public static final String TYPE_OTHER = "Other";
public static final String TYPE_MACHINE_LEARNING = "MachineLearning";
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.common.utils;
import static org.apache.dolphinscheduler.common.Constants.FOLDER_SEPARATOR;
import static org.apache.dolphinscheduler.common.Constants.FORMAT_S_S;
import static org.apache.dolphinscheduler.common.Constants.RESOURCE_TYPE_FILE;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
import static org.apache.dolphinscheduler.common.Constants.RESOURCE_TYPE_UDF;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.ResUploadType;
import org.apache.dolphinscheduler.common.exception.BaseException;
import org.apache.dolphinscheduler.common.storage.StorageOperate;
import org.apache.dolphinscheduler.plugin.task.api.enums.TaskExecutionStatus;
import org.apache.dolphinscheduler.spi.enums.ResourceType;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.HdfsConfiguration;
import org.apache.hadoop.security.UserGroupInformation;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.security.PrivilegedExceptionAction;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
import java.util.stream.Stream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
/**
* hadoop utils
* single instance
*/
public class HadoopUtils implements Closeable, StorageOperate {
private static final Logger logger = LoggerFactory.getLogger(HadoopUtils.class);
private String hdfsUser = PropertyUtils.getString(Constants.HDFS_ROOT_USER);
public static final String RM_HA_IDS = PropertyUtils.getString(Constants.YARN_RESOURCEMANAGER_HA_RM_IDS);
public static final String APP_ADDRESS = PropertyUtils.getString(Constants.YARN_APPLICATION_STATUS_ADDRESS);
public static final String JOB_HISTORY_ADDRESS = PropertyUtils.getString(Constants.YARN_JOB_HISTORY_STATUS_ADDRESS);
public static final int HADOOP_RESOURCE_MANAGER_HTTP_ADDRESS_PORT_VALUE =
PropertyUtils.getInt(Constants.HADOOP_RESOURCE_MANAGER_HTTPADDRESS_PORT, 8088);
private static final String HADOOP_UTILS_KEY = "HADOOP_UTILS_KEY";
private static final LoadingCache<String, HadoopUtils> cache = CacheBuilder
.newBuilder()
.expireAfterWrite(PropertyUtils.getInt(Constants.KERBEROS_EXPIRE_TIME, 2), TimeUnit.HOURS)
.build(new CacheLoader<String, HadoopUtils>() {
@Override
public HadoopUtils load(String key) throws Exception {
return new HadoopUtils();
}
});
private volatile boolean yarnEnabled = false;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
private Configuration configuration;
private FileSystem fs;
private HadoopUtils() {
hdfsUser = PropertyUtils.getString(Constants.HDFS_ROOT_USER);
init();
initHdfsPath();
}
public static HadoopUtils getInstance() {
return cache.getUnchecked(HADOOP_UTILS_KEY);
}
/**
* init dolphinscheduler root path in hdfs
*/
private void initHdfsPath() {
Path path = new Path(RESOURCE_UPLOAD_PATH);
try {
if (!fs.exists(path)) {
fs.mkdirs(path);
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
/**
* init hadoop configuration
*/
private void init() throws NullPointerException {
try {
configuration = new HdfsConfiguration();
if (CommonUtils.loadKerberosConf(configuration)) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
hdfsUser = "";
}
String defaultFS = configuration.get(Constants.FS_DEFAULT_FS);
if (StringUtils.isBlank(defaultFS)) {
defaultFS = PropertyUtils.getString(Constants.FS_DEFAULT_FS);
}
if (StringUtils.isNotBlank(defaultFS)) {
Map<String, String> fsRelatedProps = PropertyUtils.getPrefixedProperties("fs.");
configuration.set(Constants.FS_DEFAULT_FS, defaultFS);
fsRelatedProps.forEach((key, value) -> configuration.set(key, value));
} else {
logger.error("property:{} can not to be empty, please set!", Constants.FS_DEFAULT_FS);
throw new NullPointerException(
String.format("property: %s can not to be empty, please set!", Constants.FS_DEFAULT_FS));
}
if (!defaultFS.startsWith("file")) {
logger.info("get property:{} -> {}, from core-site.xml hdfs-site.xml ", Constants.FS_DEFAULT_FS,
defaultFS);
}
if (StringUtils.isNotEmpty(hdfsUser)) {
UserGroupInformation ugi = UserGroupInformation.createRemoteUser(hdfsUser);
ugi.doAs((PrivilegedExceptionAction<Boolean>) () -> {
fs = FileSystem.get(configuration);
return true;
});
} else {
logger.warn("resource.hdfs.root.user is not set value!");
fs = FileSystem.get(configuration);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
/**
* @return Configuration
*/
public Configuration getConfiguration() {
return configuration;
}
/**
* @return DefaultFS
*/
public String getDefaultFS() {
return getConfiguration().get(Constants.FS_DEFAULT_FS);
}
/**
* get application url
* if rmHaIds contains xx, it signs not use resourcemanager
* otherwise:
* if rmHaIds is empty, single resourcemanager enabled
* if rmHaIds not empty: resourcemanager HA enabled
*
* @param applicationId application id
* @return url of application
*/
public String getApplicationUrl(String applicationId) throws BaseException {
yarnEnabled = true;
String appUrl = StringUtils.isEmpty(RM_HA_IDS) ? APP_ADDRESS : getAppAddress(APP_ADDRESS, RM_HA_IDS);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
if (StringUtils.isBlank(appUrl)) {
throw new BaseException("yarn application url generation failed");
}
logger.debug("yarn application url:{}, applicationId:{}", appUrl, applicationId);
return String.format(appUrl, HADOOP_RESOURCE_MANAGER_HTTP_ADDRESS_PORT_VALUE, applicationId);
}
public String getJobHistoryUrl(String applicationId) {
String jobId = applicationId.replace("application", "job");
return String.format(JOB_HISTORY_ADDRESS, jobId);
}
/**
* cat file on hdfs
*
* @param hdfsFilePath hdfs file path
* @return byte[] byte array
* @throws IOException errors
*/
public byte[] catFile(String hdfsFilePath) throws IOException {
if (StringUtils.isBlank(hdfsFilePath)) {
logger.error("hdfs file path:{} is blank", hdfsFilePath);
return new byte[0];
}
try (FSDataInputStream fsDataInputStream = fs.open(new Path(hdfsFilePath))) {
return IOUtils.toByteArray(fsDataInputStream);
}
}
/**
* cat file on hdfs
*
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
* @param hdfsFilePath hdfs file path
* @param skipLineNums skip line numbers
* @param limit read how many lines
* @return content of file
* @throws IOException errors
*/
public List<String> catFile(String hdfsFilePath, int skipLineNums, int limit) throws IOException {
if (StringUtils.isBlank(hdfsFilePath)) {
logger.error("hdfs file path:{} is blank", hdfsFilePath);
return Collections.emptyList();
}
try (FSDataInputStream in = fs.open(new Path(hdfsFilePath))) {
BufferedReader br = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));
Stream<String> stream = br.lines().skip(skipLineNums).limit(limit);
return stream.collect(Collectors.toList());
}
}
@Override
public List<String> vimFile(String bucketName, String hdfsFilePath, int skipLineNums,
int limit) throws IOException {
return catFile(hdfsFilePath, skipLineNums, limit);
}
@Override
public void createTenantDirIfNotExists(String tenantCode) throws IOException {
getInstance().mkdir(tenantCode, getHdfsResDir(tenantCode));
getInstance().mkdir(tenantCode, getHdfsUdfDir(tenantCode));
}
@Override
public String getResDir(String tenantCode) {
return getHdfsResDir(tenantCode);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
}
@Override
public String getUdfDir(String tenantCode) {
return getHdfsUdfDir(tenantCode);
}
/**
* make the given file and all non-existent parents into
* directories. Has the semantics of Unix 'mkdir -p'.
* Existence of the directory hierarchy is not an error.
*
* @param hdfsPath path to create
* @return mkdir result
* @throws IOException errors
*/
@Override
public boolean mkdir(String tenantCode, String hdfsPath) throws IOException {
return fs.mkdirs(new Path(hdfsPath));
}
@Override
public String getResourceFileName(String tenantCode, String fullName) {
return getHdfsResourceFileName(tenantCode, fullName);
}
@Override
public String getFileName(ResourceType resourceType, String tenantCode, String fileName) {
return getHdfsFileName(resourceType, tenantCode, fileName);
}
@Override
public void download(String bucketName, String srcHdfsFilePath, String dstFile, boolean deleteSource,
boolean overwrite) throws IOException {
copyHdfsToLocal(srcHdfsFilePath, dstFile, deleteSource, overwrite);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
}
/**
* copy files between FileSystems
*
* @param srcPath source hdfs path
* @param dstPath destination hdfs path
* @param deleteSource whether to delete the src
* @param overwrite whether to overwrite an existing file
* @return if success or not
* @throws IOException errors
*/
@Override
public boolean copy(String srcPath, String dstPath, boolean deleteSource, boolean overwrite) throws IOException {
return FileUtil.copy(fs, new Path(srcPath), fs, new Path(dstPath), deleteSource, overwrite, fs.getConf());
}
/**
* the src file is on the local disk. Add it to FS at
* the given dst name.
*
* @param srcFile local file
* @param dstHdfsPath destination hdfs path
* @param deleteSource whether to delete the src
* @param overwrite whether to overwrite an existing file
* @return if success or not
* @throws IOException errors
*/
public boolean copyLocalToHdfs(String srcFile, String dstHdfsPath, boolean deleteSource,
boolean overwrite) throws IOException {
Path srcPath = new Path(srcFile);
Path dstPath = new Path(dstHdfsPath);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
fs.copyFromLocalFile(deleteSource, overwrite, srcPath, dstPath);
return true;
}
@Override
public boolean upload(String buckName, String srcFile, String dstPath, boolean deleteSource,
boolean overwrite) throws IOException {
return copyLocalToHdfs(srcFile, dstPath, deleteSource, overwrite);
}
/*
* copy hdfs file to local
*
* @param srcHdfsFilePath source hdfs file path
*
* @param dstFile destination file
*
* @param deleteSource delete source
*
* @param overwrite overwrite
*
* @return result of copy hdfs file to local
*
* @throws IOException errors
*/
public boolean copyHdfsToLocal(String srcHdfsFilePath, String dstFile, boolean deleteSource,
boolean overwrite) throws IOException {
Path srcPath = new Path(srcHdfsFilePath);
File dstPath = new File(dstFile);
if (dstPath.exists()) {
if (dstPath.isFile()) {
if (overwrite) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
Files.delete(dstPath.toPath());
}
} else {
logger.error("destination file must be a file");
}
}
if (!dstPath.getParentFile().exists() && !dstPath.getParentFile().mkdirs()) {
return false;
}
return FileUtil.copy(fs, srcPath, dstPath, deleteSource, fs.getConf());
}
/**
* delete a file
*
* @param hdfsFilePath the path to delete.
* @param recursive if path is a directory and set to
* true, the directory is deleted else throws an exception. In
* case of a file the recursive can be set to either true or false.
* @return true if delete is successful else false.
* @throws IOException errors
*/
@Override
public boolean delete(String tenantCode, String hdfsFilePath, boolean recursive) throws IOException {
return fs.delete(new Path(hdfsFilePath), recursive);
}
/**
* check if exists
*
* @param hdfsFilePath source file path
* @return result of exists or not
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
* @throws IOException errors
*/
@Override
public boolean exists(String tenantCode, String hdfsFilePath) throws IOException {
return fs.exists(new Path(hdfsFilePath));
}
/**
* Gets a list of files in the directory
*
* @param filePath file path
* @return {@link FileStatus} file status
* @throws IOException errors
*/
public FileStatus[] listFileStatus(String filePath) throws IOException {
try {
return fs.listStatus(new Path(filePath));
} catch (IOException e) {
logger.error("Get file list exception", e);
throw new IOException("Get file list exception", e);
}
}
/**
* Renames Path src to Path dst. Can take place on local fs
* or remote DFS.
*
* @param src path to be renamed
* @param dst new path after rename
* @return true if rename is successful
* @throws IOException on failure
*/
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
public boolean rename(String src, String dst) throws IOException {
return fs.rename(new Path(src), new Path(dst));
}
/**
* hadoop resourcemanager enabled or not
*
* @return result
*/
public boolean isYarnEnabled() {
return yarnEnabled;
}
/**
* get the state of an application
*
* @param applicationId application id
* @return the return may be null or there may be other parse exceptions
*/
public TaskExecutionStatus getApplicationStatus(String applicationId) throws BaseException {
if (StringUtils.isEmpty(applicationId)) {
return null;
}
String result;
String applicationUrl = getApplicationUrl(applicationId);
logger.debug("generate yarn application url, applicationUrl={}", applicationUrl);
String responseContent = Boolean.TRUE
.equals(PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false))
? KerberosHttpClient.get(applicationUrl)
: HttpUtils.get(applicationUrl);
if (responseContent != null) {
ObjectNode jsonObject = JSONUtils.parseObject(responseContent);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
if (!jsonObject.has("app")) {
return TaskExecutionStatus.FAILURE;
}
result = jsonObject.path("app").path("finalStatus").asText();
} else {
String jobHistoryUrl = getJobHistoryUrl(applicationId);
logger.debug("generate yarn job history application url, jobHistoryUrl={}", jobHistoryUrl);
responseContent = Boolean.TRUE
.equals(PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false))
? KerberosHttpClient.get(jobHistoryUrl)
: HttpUtils.get(jobHistoryUrl);
if (null != responseContent) {
ObjectNode jsonObject = JSONUtils.parseObject(responseContent);
if (!jsonObject.has("job")) {
return TaskExecutionStatus.FAILURE;
}
result = jsonObject.path("job").path("state").asText();
} else {
return TaskExecutionStatus.FAILURE;
}
}
return getExecutionStatus(result);
}
private TaskExecutionStatus getExecutionStatus(String result) {
switch (result) {
case Constants.ACCEPTED:
return TaskExecutionStatus.SUBMITTED_SUCCESS;
case Constants.SUCCEEDED:
case Constants.ENDED:
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
return TaskExecutionStatus.SUCCESS;
case Constants.NEW:
case Constants.NEW_SAVING:
case Constants.SUBMITTED:
case Constants.FAILED:
return TaskExecutionStatus.FAILURE;
case Constants.KILLED:
return TaskExecutionStatus.KILL;
case Constants.RUNNING:
default:
return TaskExecutionStatus.RUNNING_EXECUTION;
}
}
/**
* get data hdfs path
*
* @return data hdfs path
*/
public static String getHdfsDataBasePath() {
if (FOLDER_SEPARATOR.equals(RESOURCE_UPLOAD_PATH)) {
return "";
} else {
return RESOURCE_UPLOAD_PATH;
}
}
/**
* hdfs resource dir
*
* @param tenantCode tenant code
* @param resourceType resource type
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
* @return hdfs resource dir
*/
public static String getHdfsDir(ResourceType resourceType, String tenantCode) {
String hdfsDir = "";
if (resourceType.equals(ResourceType.FILE)) {
hdfsDir = getHdfsResDir(tenantCode);
} else if (resourceType.equals(ResourceType.UDF)) {
hdfsDir = getHdfsUdfDir(tenantCode);
}
return hdfsDir;
}
@Override
public String getDir(ResourceType resourceType, String tenantCode) {
return getHdfsDir(resourceType, tenantCode);
}
/**
* hdfs resource dir
*
* @param tenantCode tenant code
* @return hdfs resource dir
*/
public static String getHdfsResDir(String tenantCode) {
return String.format("%s/" + RESOURCE_TYPE_FILE, getHdfsTenantDir(tenantCode));
}
/**
* hdfs udf dir
*
* @param tenantCode tenant code
* @return get udf dir on hdfs
*/
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
public static String getHdfsUdfDir(String tenantCode) {
return String.format("%s/" + RESOURCE_TYPE_UDF, getHdfsTenantDir(tenantCode));
}
/**
* get hdfs file name
*
* @param resourceType resource type
* @param tenantCode tenant code
* @param fileName file name
* @return hdfs file name
*/
public static String getHdfsFileName(ResourceType resourceType, String tenantCode, String fileName) {
if (fileName.startsWith(FOLDER_SEPARATOR)) {
fileName = fileName.replaceFirst(FOLDER_SEPARATOR, "");
}
return String.format(FORMAT_S_S, getHdfsDir(resourceType, tenantCode), fileName);
}
/**
* get absolute path and name for resource file on hdfs
*
* @param tenantCode tenant code
* @param fileName file name
* @return get absolute path and name for file on hdfs
*/
public static String getHdfsResourceFileName(String tenantCode, String fileName) {
if (fileName.startsWith(FOLDER_SEPARATOR)) {
fileName = fileName.replaceFirst(FOLDER_SEPARATOR, "");
}
return String.format(FORMAT_S_S, getHdfsResDir(tenantCode), fileName);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
/**
* get absolute path and name for udf file on hdfs
*
* @param tenantCode tenant code
* @param fileName file name
* @return get absolute path and name for udf file on hdfs
*/
public static String getHdfsUdfFileName(String tenantCode, String fileName) {
if (fileName.startsWith(FOLDER_SEPARATOR)) {
fileName = fileName.replaceFirst(FOLDER_SEPARATOR, "");
}
return String.format(FORMAT_S_S, getHdfsUdfDir(tenantCode), fileName);
}
/**
* @param tenantCode tenant code
* @return file directory of tenants on hdfs
*/
public static String getHdfsTenantDir(String tenantCode) {
return String.format(FORMAT_S_S, getHdfsDataBasePath(), tenantCode);
}
/**
* getAppAddress
*
* @param appAddress app address
* @param rmHa resource manager ha
* @return app address
*/
public static String getAppAddress(String appAddress, String rmHa) {
String[] split1 = appAddress.split(Constants.DOUBLE_SLASH);
if (split1.length != 2) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
return null;
}
String start = split1[0] + Constants.DOUBLE_SLASH;
String[] split2 = split1[1].split(Constants.COLON);
if (split2.length != 2) {
return null;
}
String end = Constants.COLON + split2[1];
String activeRM = YarnHAAdminUtils.getActiveRMName(start, rmHa);
if (StringUtils.isEmpty(activeRM)) {
return null;
}
return start + activeRM + end;
}
@Override
public void close() throws IOException {
if (fs != null) {
try {
fs.close();
} catch (IOException e) {
logger.error("Close HadoopUtils instance failed", e);
throw new IOException("Close HadoopUtils instance failed", e);
}
}
}
/**
* yarn ha admin utils
*/
private static final class YarnHAAdminUtils {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
/**
* get active resourcemanager node
* @param protocol http protocol
* @param rmIds yarn ha ids
* @return yarn active node
*/
public static String getActiveRMName(String protocol, String rmIds) {
String[] rmIdArr = rmIds.split(Constants.COMMA);
String yarnUrl = protocol + "%s:" + HADOOP_RESOURCE_MANAGER_HTTP_ADDRESS_PORT_VALUE + "/ws/v1/cluster/info";
try {
/**
* send http get request to rm
*/
for (String rmId : rmIdArr) {
String state = getRMState(String.format(yarnUrl, rmId));
if (Constants.HADOOP_RM_STATE_ACTIVE.equals(state)) {
return rmId;
}
}
} catch (Exception e) {
logger.error("yarn ha application url generation failed, message:{}", e.getMessage());
}
return null;
}
/**
* get ResourceManager state
*/
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,821 |
[Bug] [Resource Center] HDFS can only use local mode, not cluster mode
|
### 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
HDFS can only use local mode, not cluster mode
### What you expected to happen
running cluster mode successfully.
### How to reproduce
aboved.
### 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/11821
|
https://github.com/apache/dolphinscheduler/pull/11823
|
ea0b5acccb07474b5c4f0a08eecaa06c55f24d9e
|
ebcffb04aad9db8ec6df1105e4770b187088e701
| 2022-09-07T04:07:07Z |
java
| 2022-09-07T08:40:43Z |
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/HadoopUtils.java
|
public static String getRMState(String url) {
String retStr = Boolean.TRUE
.equals(PropertyUtils.getBoolean(Constants.HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE, false))
? KerberosHttpClient.get(url)
: HttpUtils.get(url);
if (StringUtils.isEmpty(retStr)) {
return null;
}
ObjectNode jsonObject = JSONUtils.parseObject(retStr);
if (!jsonObject.has("clusterInfo")) {
return null;
}
return jsonObject.get("clusterInfo").path("haState").asText();
}
}
@Override
public void deleteTenant(String tenantCode) throws Exception {
String tenantPath = getHdfsDataBasePath() + FOLDER_SEPARATOR + tenantCode;
if (exists(tenantCode, tenantPath)) {
delete(tenantCode, tenantPath, true);
}
}
@Override
public ResUploadType returnStorageType() {
return ResUploadType.HDFS;
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.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.service.impl;
import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_START;
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;
import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_NODES;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_PARAMS;
import static org.apache.dolphinscheduler.common.Constants.COMMA;
import static org.apache.dolphinscheduler.common.Constants.MAX_TASK_TIMEOUT;
import static org.apache.dolphinscheduler.common.Constants.SCHEDULE_TIME_MAX_LENGTH;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant;
import org.apache.dolphinscheduler.api.enums.ExecuteType;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.ExecutorService;
import org.apache.dolphinscheduler.api.service.MonitorService;
import org.apache.dolphinscheduler.api.service.ProjectService;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.CommandType;
import org.apache.dolphinscheduler.common.enums.ComplementDependentMode;
import org.apache.dolphinscheduler.common.enums.CycleEnum;
import org.apache.dolphinscheduler.common.enums.FailureStrategy;
import org.apache.dolphinscheduler.common.enums.Flag;
import org.apache.dolphinscheduler.common.enums.Priority;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.common.enums.RunMode;
import org.apache.dolphinscheduler.common.enums.TaskDependType;
import org.apache.dolphinscheduler.common.enums.TaskGroupQueueStatus;
import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
import org.apache.dolphinscheduler.common.model.Server;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.entity.Command;
import org.apache.dolphinscheduler.dao.entity.DependentProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.ProcessTaskRelation;
import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.Schedule;
import org.apache.dolphinscheduler.dao.entity.TaskDefinition;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import org.apache.dolphinscheduler.dao.entity.TaskGroupQueue;
import org.apache.dolphinscheduler.dao.entity.Tenant;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessTaskRelationMapper;
import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskGroupQueueMapper;
import org.apache.dolphinscheduler.dao.repository.ProcessInstanceDao;
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
import org.apache.dolphinscheduler.remote.command.TaskExecuteStartCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowExecutingDataRequestCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowExecutingDataResponseCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowStateEventChangeCommand;
import org.apache.dolphinscheduler.remote.dto.WorkflowExecuteDto;
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.process.ProcessService;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import java.util.List;
import java.util.Map;
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.Service;
import com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.collect.Lists;
/**
* executor service impl
*/
@Service
public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorService {
private static final Logger logger = LoggerFactory.getLogger(ExecutorServiceImpl.class);
@Autowired
private ProjectMapper projectMapper;
@Autowired
private ProjectService projectService;
@Autowired
private ProcessDefinitionMapper processDefinitionMapper;
@Autowired
private MonitorService monitorService;
@Autowired
private ProcessInstanceMapper processInstanceMapper;
@Autowired
private ProcessService processService;
@Autowired
private ProcessInstanceDao processInstanceDao;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
@Autowired
private StateEventCallbackService stateEventCallbackService;
@Autowired
private TaskDefinitionMapper taskDefinitionMapper;
@Autowired
private ProcessTaskRelationMapper processTaskRelationMapper;
@Autowired
private TaskGroupQueueMapper taskGroupQueueMapper;
/**
* execute process instance
*
* @param loginUser login user
* @param projectCode project code
* @param processDefinitionCode process definition code
* @param cronTime cron time
* @param commandType command type
* @param failureStrategy failure strategy
* @param startNodeList start nodelist
* @param taskDependType node dependency type
* @param warningType warning type
* @param warningGroupId notify group id
* @param processInstancePriority process instance priority
* @param workerGroup worker group name
* @param environmentCode environment code
* @param runMode run mode
* @param timeout timeout
* @param startParams the global param values which pass to new process instance
* @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode
* @return execute process instance code
*/
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
@Override
public Map<String, Object> execProcessInstance(User loginUser, long projectCode, long processDefinitionCode,
String cronTime, CommandType commandType,
FailureStrategy failureStrategy, String startNodeList,
TaskDependType taskDependType, WarningType warningType,
int warningGroupId, RunMode runMode,
Priority processInstancePriority, String workerGroup,
Long environmentCode, Integer timeout,
Map<String, String> startParams, Integer expectedParallelismNumber,
int dryRun, ComplementDependentMode complementDependentMode) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result =
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_START);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (timeout <= 0 || timeout > MAX_TASK_TIMEOUT) {
putMsg(result, Status.TASK_TIMEOUT_PARAMS_ERROR);
return result;
}
ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode);
result = checkProcessDefinitionValid(projectCode, processDefinition, processDefinitionCode,
processDefinition.getVersion());
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (!checkTenantSuitable(processDefinition)) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
logger.error("there is not any valid tenant for the process definition: id:{},name:{}, ",
processDefinition.getId(), processDefinition.getName());
putMsg(result, Status.TENANT_NOT_SUITABLE);
return result;
}
if (!checkScheduleTimeNum(commandType, cronTime)) {
putMsg(result, Status.SCHEDULE_TIME_NUMBER);
return result;
}
if (!checkMasterExists(result)) {
return result;
}
/**
* create command
*/
int create =
this.createCommand(commandType, processDefinition.getCode(), taskDependType, failureStrategy,
startNodeList,
cronTime, warningType, loginUser.getId(), warningGroupId, runMode, processInstancePriority,
workerGroup,
environmentCode, startParams, expectedParallelismNumber, dryRun, complementDependentMode);
if (create > 0) {
processDefinition.setWarningGroupId(warningGroupId);
processDefinitionMapper.updateById(processDefinition);
putMsg(result, Status.SUCCESS);
} else {
putMsg(result, Status.START_PROCESS_INSTANCE_ERROR);
}
return result;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
/**
* check whether master exists
*
* @param result result
* @return master exists return true , otherwise return false
*/
private boolean checkMasterExists(Map<String, Object> result) {
List<Server> masterServers = monitorService.getServerListFromRegistry(true);
if (masterServers.isEmpty()) {
putMsg(result, Status.MASTER_NOT_EXISTS);
return false;
}
return true;
}
/**
* @param complementData
* @param cronTime
* @return CommandType is COMPLEMENT_DATA and cronTime's number is not greater than 100 return true , otherwise return false
*/
private boolean checkScheduleTimeNum(CommandType complementData, String cronTime) {
if (!CommandType.COMPLEMENT_DATA.equals(complementData)) {
return true;
}
if (cronTime == null) {
return true;
}
Map<String, String> cronMap = JSONUtils.toMap(cronTime);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (cronMap.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
String[] stringDates = cronMap.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST).split(COMMA);
if (stringDates.length > SCHEDULE_TIME_MAX_LENGTH) {
return false;
}
}
return true;
}
/**
* check whether the process definition can be executed
*
* @param projectCode project code
* @param processDefinition process definition
* @param processDefineCode process definition code
* @param version process instance verison
* @return check result code
*/
@Override
public Map<String, Object> checkProcessDefinitionValid(long projectCode, ProcessDefinition processDefinition,
long processDefineCode, Integer version) {
Map<String, Object> result = new HashMap<>();
if (processDefinition == null || projectCode != processDefinition.getProjectCode()) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(processDefineCode));
} else if (processDefinition.getReleaseState() != ReleaseState.ONLINE) {
putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, String.valueOf(processDefineCode), version);
} else if (!checkSubProcessDefinitionValid(processDefinition)) {
putMsg(result, Status.SUB_PROCESS_DEFINE_NOT_RELEASE);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
} else {
result.put(Constants.STATUS, Status.SUCCESS);
}
return result;
}
/**
* check whether the current process has subprocesses and validate all subprocesses
*
* @param processDefinition
* @return check result
*/
@Override
public boolean checkSubProcessDefinitionValid(ProcessDefinition processDefinition) {
List<ProcessTaskRelation> processTaskRelations =
processTaskRelationMapper.queryDownstreamByProcessDefinitionCode(processDefinition.getCode());
if (processTaskRelations.isEmpty()) {
return true;
}
Set<Long> relationCodes =
processTaskRelations.stream().map(ProcessTaskRelation::getPostTaskCode).collect(Collectors.toSet());
List<TaskDefinition> taskDefinitions = taskDefinitionMapper.queryByCodeList(relationCodes);
Set<Long> processDefinitionCodeSet = new HashSet<>();
taskDefinitions.stream()
.filter(task -> TaskConstants.TASK_TYPE_SUB_PROCESS.equalsIgnoreCase(task.getTaskType())).forEach(
taskDefinition -> processDefinitionCodeSet.add(Long.valueOf(
JSONUtils.getNodeString(taskDefinition.getTaskParams(),
Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE))));
if (processDefinitionCodeSet.isEmpty()) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
return true;
}
List<ProcessDefinition> processDefinitions = processDefinitionMapper.queryByCodes(processDefinitionCodeSet);
return processDefinitions.stream()
.filter(definition -> definition.getReleaseState().equals(ReleaseState.OFFLINE))
.collect(Collectors.toSet())
.isEmpty();
}
/**
* do action to process instance:pause, stop, repeat, recover from pause, recover from stop,rerun failed task
*
* @param loginUser login user
* @param projectCode project code
* @param processInstanceId process instance id
* @param executeType execute type
* @return execute result code
*/
@Override
public Map<String, Object> execute(User loginUser, long projectCode, Integer processInstanceId,
ExecuteType executeType) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,
ApiFuncIdentificationConstant.map.get(executeType));
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (!checkMasterExists(result)) {
return result;
}
ProcessInstance processInstance = processService.findProcessInstanceDetailById(processInstanceId);
if (processInstance == null) {
putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, processInstanceId);
return result;
}
ProcessDefinition processDefinition =
processService.findProcessDefinition(processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
processDefinition.setReleaseState(ReleaseState.ONLINE);
if (executeType != ExecuteType.STOP && executeType != ExecuteType.PAUSE) {
result =
checkProcessDefinitionValid(projectCode, processDefinition,
processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
}
result = checkExecuteType(processInstance, executeType);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (!checkTenantSuitable(processDefinition)) {
logger.error("there is not any valid tenant for the process definition: id:{},name:{}, ",
processDefinition.getId(), processDefinition.getName());
putMsg(result, Status.TENANT_NOT_SUITABLE);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
// g
Map<String, Object> commandMap =
JSONUtils.parseObject(processInstance.getCommandParam(), new TypeReference<Map<String, Object>>() {
});
String startParams = null;
if (MapUtils.isNotEmpty(commandMap) && executeType == ExecuteType.REPEAT_RUNNING) {
Object startParamsJson = commandMap.get(Constants.CMD_PARAM_START_PARAMS);
if (startParamsJson != null) {
startParams = startParamsJson.toString();
}
}
switch (executeType) {
case REPEAT_RUNNING:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.REPEAT_RUNNING, startParams);
break;
case RECOVER_SUSPENDED_PROCESS:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.RECOVER_SUSPENDED_PROCESS, startParams);
break;
case START_FAILURE_TASK_PROCESS:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.START_FAILURE_TASK_PROCESS, startParams);
break;
case STOP:
if (processInstance.getState() == WorkflowExecutionStatus.READY_STOP) {
putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(),
processInstance.getState());
} else {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
result =
updateProcessInstancePrepare(processInstance, CommandType.STOP,
WorkflowExecutionStatus.READY_STOP);
}
break;
case PAUSE:
if (processInstance.getState() == WorkflowExecutionStatus.READY_PAUSE) {
putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(),
processInstance.getState());
} else {
result = updateProcessInstancePrepare(processInstance, CommandType.PAUSE,
WorkflowExecutionStatus.READY_PAUSE);
}
break;
default:
logger.error("unknown execute type : {}", executeType);
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "unknown execute type");
break;
}
return result;
}
@Override
public Map<String, Object> forceStartTaskInstance(User loginUser, int queueId) {
Map<String, Object> result = new HashMap<>();
TaskGroupQueue taskGroupQueue = taskGroupQueueMapper.selectById(queueId);
// c
ProcessInstance processInstance = processInstanceMapper.selectById(taskGroupQueue.getProcessId());
if (processInstance == null) {
putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, taskGroupQueue.getProcessId());
return result;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
if (!checkMasterExists(result)) {
return result;
}
return forceStart(processInstance, taskGroupQueue);
}
/**
* check tenant suitable
*
* @param processDefinition process definition
* @return true if tenant suitable, otherwise return false
*/
private boolean checkTenantSuitable(ProcessDefinition processDefinition) {
Tenant tenant =
processService.getTenantForProcess(processDefinition.getTenantId(), processDefinition.getUserId());
return tenant != null;
}
/**
* Check the state of process instance and the type of operation match
*
* @param processInstance process instance
* @param executeType execute type
* @return check result code
*/
private Map<String, Object> checkExecuteType(ProcessInstance processInstance, ExecuteType executeType) {
Map<String, Object> result = new HashMap<>();
WorkflowExecutionStatus executionStatus = processInstance.getState();
boolean checkResult = false;
switch (executeType) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
case PAUSE:
if (executionStatus.isRunning()) {
checkResult = true;
}
break;
case STOP:
if (executionStatus.canStop()) {
checkResult = true;
}
break;
case REPEAT_RUNNING:
if (executionStatus.isFinished()) {
checkResult = true;
}
break;
case START_FAILURE_TASK_PROCESS:
if (executionStatus.isFailure()) {
checkResult = true;
}
break;
case RECOVER_SUSPENDED_PROCESS:
if (executionStatus.isPause() || executionStatus.isStop()) {
checkResult = true;
}
break;
default:
break;
}
if (!checkResult) {
putMsg(result, Status.PROCESS_INSTANCE_STATE_OPERATION_ERROR, processInstance.getName(),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
executionStatus.toString(), executeType.toString());
} else {
putMsg(result, Status.SUCCESS);
}
return result;
}
/**
* prepare to update process instance command type and status
*
* @param processInstance process instance
* @param commandType command type
* @param executionStatus execute status
* @return update result
*/
private Map<String, Object> updateProcessInstancePrepare(ProcessInstance processInstance, CommandType commandType,
WorkflowExecutionStatus executionStatus) {
Map<String, Object> result = new HashMap<>();
processInstance.setCommandType(commandType);
processInstance.addHistoryCmd(commandType);
processInstance.setStateWithDesc(executionStatus, commandType.getDescp() + "by ui");
int update = processInstanceDao.updateProcessInstance(processInstance);
// d
if (update > 0) {
// d
// s
WorkflowStateEventChangeCommand workflowStateEventChangeCommand = new WorkflowStateEventChangeCommand(
processInstance.getId(), 0, processInstance.getState(), processInstance.getId(), 0);
Host host = new Host(processInstance.getHost());
stateEventCallbackService.sendResult(host, workflowStateEventChangeCommand.convert2Command());
putMsg(result, Status.SUCCESS);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
} else {
putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR);
}
return result;
}
/**
* prepare to update process instance command type and status
*
* @param processInstance process instance
* @return update result
*/
private Map<String, Object> forceStart(ProcessInstance processInstance, TaskGroupQueue taskGroupQueue) {
Map<String, Object> result = new HashMap<>();
if (taskGroupQueue.getStatus() != TaskGroupQueueStatus.WAIT_QUEUE) {
putMsg(result, Status.TASK_GROUP_QUEUE_ALREADY_START);
return result;
}
taskGroupQueue.setForceStart(Flag.YES.getCode());
processService.updateTaskGroupQueue(taskGroupQueue);
processService.sendStartTask2Master(processInstance, taskGroupQueue.getTaskId(),
org.apache.dolphinscheduler.remote.command.CommandType.TASK_FORCE_STATE_EVENT_REQUEST);
putMsg(result, Status.SUCCESS);
return result;
}
/**
* insert command, used in the implementation of the page, rerun, recovery (pause / failure) execution
*
* @param loginUser login user
* @param instanceId instance id
* @param processDefinitionCode process definition code
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @param processVersion
* @param commandType command type
* @return insert result code
*/
private Map<String, Object> insertCommand(User loginUser, Integer instanceId, long processDefinitionCode,
int processVersion, CommandType commandType, String startParams) {
Map<String, Object> result = new HashMap<>();
// T
Map<String, Object> cmdParam = new HashMap<>();
cmdParam.put(CMD_PARAM_RECOVER_PROCESS_ID_STRING, instanceId);
if (!StringUtils.isEmpty(startParams)) {
cmdParam.put(CMD_PARAM_START_PARAMS, startParams);
}
Command command = new Command();
command.setCommandType(commandType);
command.setProcessDefinitionCode(processDefinitionCode);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
command.setExecutorId(loginUser.getId());
command.setProcessDefinitionVersion(processVersion);
command.setProcessInstanceId(instanceId);
if (!processService.verifyIsNeedCreateCommand(command)) {
putMsg(result, Status.PROCESS_INSTANCE_EXECUTING_COMMAND, String.valueOf(processDefinitionCode));
return result;
}
int create = processService.createCommand(command);
if (create > 0) {
putMsg(result, Status.SUCCESS);
} else {
putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
return result;
}
/**
* check whether sub processes are offline before starting process definition
*
* @param processDefinitionCode process definition code
* @return check result code
*/
@Override
public Map<String, Object> startCheckByProcessDefinedCode(long processDefinitionCode) {
Map<String, Object> result = new HashMap<>();
ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode);
if (processDefinition == null) {
logger.error("process definition is not found");
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "processDefinitionCode");
return result;
}
List<Long> codes = new ArrayList<>();
processService.recurseFindSubProcess(processDefinition.getCode(), codes);
if (!codes.isEmpty()) {
List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(codes);
if (processDefinitionList != null) {
for (ProcessDefinition processDefinitionTmp : processDefinitionList) {
/**
* if there is no online process, exit directly
*/
if (processDefinitionTmp.getReleaseState() != ReleaseState.ONLINE) {
putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, processDefinitionTmp.getName());
logger.info("not release process definition id: {} , name : {}", processDefinitionTmp.getId(),
processDefinitionTmp.getName());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
return result;
}
}
}
}
putMsg(result, Status.SUCCESS);
return result;
}
/**
* create command
*
* @param commandType commandType
* @param processDefineCode processDefineCode
* @param nodeDep nodeDep
* @param failureStrategy failureStrategy
* @param startNodeList startNodeList
* @param schedule schedule
* @param warningType warningType
* @param executorId executorId
* @param warningGroupId warningGroupId
* @param runMode runMode
* @param processInstancePriority processInstancePriority
* @param workerGroup workerGroup
* @param environmentCode environmentCode
* @return command id
*/
private int createCommand(CommandType commandType, long processDefineCode, TaskDependType nodeDep,
FailureStrategy failureStrategy, String startNodeList, String schedule,
WarningType warningType, int executorId, int warningGroupId, RunMode runMode,
Priority processInstancePriority, String workerGroup, Long environmentCode,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
Map<String, String> startParams, Integer expectedParallelismNumber, int dryRun,
ComplementDependentMode complementDependentMode) {
/**
* instantiate command schedule instance
*/
Command command = new Command();
Map<String, String> cmdParam = new HashMap<>();
if (commandType == null) {
command.setCommandType(CommandType.START_PROCESS);
} else {
command.setCommandType(commandType);
}
command.setProcessDefinitionCode(processDefineCode);
if (nodeDep != null) {
command.setTaskDependType(nodeDep);
}
if (failureStrategy != null) {
command.setFailureStrategy(failureStrategy);
}
if (!StringUtils.isEmpty(startNodeList)) {
cmdParam.put(CMD_PARAM_START_NODES, startNodeList);
}
if (warningType != null) {
command.setWarningType(warningType);
}
if (startParams != null && startParams.size() > 0) {
cmdParam.put(CMD_PARAM_START_PARAMS, JSONUtils.toJsonString(startParams));
}
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
command.setExecutorId(executorId);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
command.setWarningGroupId(warningGroupId);
command.setProcessInstancePriority(processInstancePriority);
command.setWorkerGroup(workerGroup);
command.setEnvironmentCode(environmentCode);
command.setDryRun(dryRun);
ProcessDefinition processDefinition = processService.findProcessDefinitionByCode(processDefineCode);
if (processDefinition != null) {
command.setProcessDefinitionVersion(processDefinition.getVersion());
}
command.setProcessInstanceId(0);
// d
if (commandType == CommandType.COMPLEMENT_DATA) {
if (schedule == null || StringUtils.isEmpty(schedule)) {
return 0;
}
if (!isValidateScheduleTime(schedule)) {
return 0;
}
try {
return createComplementCommandList(schedule, runMode, command, expectedParallelismNumber,
complementDependentMode);
} catch (CronParseException cronParseException) {
// W
// c
return 0;
}
} else {
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
return processService.createCommand(command);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
/**
* create complement command
* close left and close right
*
* @param scheduleTimeParam
* @param runMode
* @return
*/
protected int createComplementCommandList(String scheduleTimeParam, RunMode runMode, Command command,
Integer expectedParallelismNumber,
ComplementDependentMode complementDependentMode) throws CronParseException {
int createCount = 0;
String startDate = null;
String endDate = null;
String dateList = null;
int dependentProcessDefinitionCreateCount = 0;
runMode = (runMode == null) ? RunMode.RUN_MODE_SERIAL : runMode;
Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam());
Map<String, String> scheduleParam = JSONUtils.toMap(scheduleTimeParam);
if (scheduleParam.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
dateList = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST);
dateList = removeDuplicates(dateList);
}
if (scheduleParam.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE) && scheduleParam.containsKey(
CMDPARAM_COMPLEMENT_DATA_END_DATE)) {
startDate = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE);
endDate = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE);
}
switch (runMode) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
case RUN_MODE_SERIAL: {
if (StringUtils.isNotEmpty(dateList)) {
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, dateList);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
createCount = processService.createCommand(command);
}
if (startDate != null && endDate != null) {
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, startDate);
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, endDate);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
createCount = processService.createCommand(command);
// d
List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode(
command.getProcessDefinitionCode());
if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) {
logger.info("process code: {} complement dependent in off mode or schedule's size is 0, skip "
+ "dependent complement data", command.getProcessDefinitionCode());
} else {
dependentProcessDefinitionCreateCount += createComplementDependentCommand(schedules, command);
}
}
break;
}
case RUN_MODE_PARALLEL: {
if (startDate != null && endDate != null) {
List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode(
command.getProcessDefinitionCode());
List<ZonedDateTime> listDate = new ArrayList<>(
CronUtils.getSelfFireDateList(DateUtils.stringToZoneDateTime(startDate),
DateUtils.stringToZoneDateTime(endDate), schedules));
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
int listDateSize = listDate.size();
createCount = listDate.size();
if (!CollectionUtils.isEmpty(listDate)) {
if (expectedParallelismNumber != null && expectedParallelismNumber != 0) {
createCount = Math.min(createCount, expectedParallelismNumber);
}
logger.info("In parallel mode, current expectedParallelismNumber:{}", createCount);
// D
// T
int itemsPerCommand = (listDateSize / createCount);
int remainingItems = (listDateSize % createCount);
int startDateIndex = 0;
int endDateIndex = 0;
for (int i = 1; i <= createCount; i++) {
int extra = (i <= remainingItems) ? 1 : 0;
int singleCommandItems = (itemsPerCommand + extra);
if (i == 1) {
endDateIndex += singleCommandItems - 1;
} else {
startDateIndex = endDateIndex + 1;
endDateIndex += singleCommandItems;
}
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE,
DateUtils.dateToString(listDate.get(startDateIndex)));
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE,
DateUtils.dateToString(listDate.get(endDateIndex)));
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
processService.createCommand(command);
if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) {
logger.info(
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
"process code: {} complement dependent in off mode or schedule's size is 0, skip "
+ "dependent complement data",
command.getProcessDefinitionCode());
} else {
dependentProcessDefinitionCreateCount +=
createComplementDependentCommand(schedules, command);
}
}
}
}
if (StringUtils.isNotEmpty(dateList)) {
List<String> listDate = Arrays.asList(dateList.split(COMMA));
createCount = listDate.size();
if (!CollectionUtils.isEmpty(listDate)) {
if (expectedParallelismNumber != null && expectedParallelismNumber != 0) {
createCount = Math.min(createCount, expectedParallelismNumber);
}
logger.info("In parallel mode, current expectedParallelismNumber:{}", createCount);
for (List<String> stringDate : Lists.partition(listDate, createCount)) {
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, String.join(COMMA, stringDate));
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
processService.createCommand(command);
}
}
}
break;
}
default:
break;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
logger.info("create complement command count: {}, create dependent complement command count: {}", createCount,
dependentProcessDefinitionCreateCount);
return createCount;
}
/**
* create complement dependent command
*/
protected int createComplementDependentCommand(List<Schedule> schedules, Command command) {
int dependentProcessDefinitionCreateCount = 0;
Command dependentCommand;
try {
dependentCommand = (Command) BeanUtils.cloneBean(command);
} catch (Exception e) {
logger.error("copy dependent command error: ", e);
return dependentProcessDefinitionCreateCount;
}
List<DependentProcessDefinition> dependentProcessDefinitionList =
getComplementDependentDefinitionList(dependentCommand.getProcessDefinitionCode(),
CronUtils.getMaxCycle(schedules.get(0).getCrontab()), dependentCommand.getWorkerGroup());
dependentCommand.setTaskDependType(TaskDependType.TASK_POST);
for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) {
dependentCommand.setProcessDefinitionCode(dependentProcessDefinition.getProcessDefinitionCode());
dependentCommand.setWorkerGroup(dependentProcessDefinition.getWorkerGroup());
Map<String, String> cmdParam = JSONUtils.toMap(dependentCommand.getCommandParam());
cmdParam.put(CMD_PARAM_START_NODES, String.valueOf(dependentProcessDefinition.getTaskDefinitionCode()));
dependentCommand.setCommandParam(JSONUtils.toJsonString(cmdParam));
dependentProcessDefinitionCreateCount += processService.createCommand(dependentCommand);
}
return dependentProcessDefinitionCreateCount;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
/**
* get complement d list
*/
private List<DependentProcessDefinition> getComplementDependentDefinitionList(long processDefinitionCode,
CycleEnum processDefinitionCycle,
String workerGroup) {
List<DependentProcessDefinition> dependentProcessDefinitionList =
processService.queryDependentProcessDefinitionByProcessDefinitionCode(processDefinitionCode);
return checkDependentProcessDefinitionValid(dependentProcessDefinitionList, processDefinitionCycle,
workerGroup);
}
/**
* Check whether the dependency cycle of the dependent node is consistent with the schedule cycle of
* the d and if there is no worker group in the schedule, use the complement selection's
* worker group
*/
private List<DependentProcessDefinition> checkDependentProcessDefinitionValid(
List<DependentProcessDefinition> dependentProcessDefinitionList,
CycleEnum processDefinitionCycle,
String workerGroup) {
List<DependentProcessDefinition> validDependentProcessDefinitionList = new ArrayList<>();
List<Long> processDefinitionCodeList =
dependentProcessDefinitionList.stream().map(DependentProcessDefinition::getProcessDefinitionCode)
.collect(Collectors.toList());
Map<Long, String> processDefinitionWorkerGroupMap =
processService.queryWorkerGroupByProcessDefinitionCodes(processDefinitionCodeList);
for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) {
if (dependentProcessDefinition.getDependentCycle() == processDefinitionCycle) {
if (processDefinitionWorkerGroupMap
.get(dependentProcessDefinition.getProcessDefinitionCode()) == null) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
dependentProcessDefinition.setWorkerGroup(workerGroup);
}
validDependentProcessDefinitionList.add(dependentProcessDefinition);
}
}
return validDependentProcessDefinitionList;
}
/**
* @param schedule
* @return check error return 0, otherwise 1
*/
private boolean isValidateScheduleTime(String schedule) {
Map<String, String> scheduleResult = JSONUtils.toMap(schedule);
if (scheduleResult == null) {
return false;
}
if (scheduleResult.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
if (scheduleResult.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST) == null) {
return false;
}
}
if (scheduleResult.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)) {
String startDate = scheduleResult.get(CMDPARAM_COMPLEMENT_DATA_START_DATE);
String endDate = scheduleResult.get(CMDPARAM_COMPLEMENT_DATA_END_DATE);
if (startDate == null || endDate == null) {
return false;
}
try {
ZonedDateTime start = DateUtils.stringToZoneDateTime(startDate);
ZonedDateTime end = DateUtils.stringToZoneDateTime(endDate);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (start == null || end == null) {
return false;
}
if (start.isAfter(end)) {
logger.error("complement data error, wrong date start:{} and end date:{} ", start, end);
return false;
}
} catch (Exception ex) {
logger.warn("Parse schedule time error, startDate: {}, endDate: {}", startDate, endDate);
return false;
}
}
return true;
}
/**
* @param scheduleTimeList
* @return remove duplicate date list
*/
private String removeDuplicates(String scheduleTimeList) {
if (StringUtils.isNotEmpty(scheduleTimeList)) {
Set<String> dateSet =
Arrays.stream(scheduleTimeList.split(COMMA)).map(String::trim).collect(Collectors.toSet());
return String.join(COMMA, dateSet);
}
return null;
}
/**
* query executing data of processInstance by master
* @param processInstanceId
* @return
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
*/
@Override
public WorkflowExecuteDto queryExecutingWorkflowByProcessInstanceId(Integer processInstanceId) {
ProcessInstance processInstance = processService.findProcessInstanceDetailById(processInstanceId);
if (processInstance == null) {
return null;
}
Host host = new Host(processInstance.getHost());
WorkflowExecutingDataRequestCommand requestCommand = new WorkflowExecutingDataRequestCommand();
requestCommand.setProcessInstanceId(processInstanceId);
org.apache.dolphinscheduler.remote.command.Command command =
stateEventCallbackService.sendSync(host, requestCommand.convert2Command());
if (command == null) {
return null;
}
WorkflowExecutingDataResponseCommand responseCommand =
JSONUtils.parseObject(command.getBody(), WorkflowExecutingDataResponseCommand.class);
return responseCommand.getWorkflowExecuteDto();
}
@Override
public Map<String, Object> execStreamTaskInstance(User loginUser, long projectCode, long taskDefinitionCode,
int taskDefinitionVersion,
int warningGroupId, String workerGroup, Long environmentCode,
Map<String, String> startParams, int dryRun) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result =
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_START);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
if (!checkMasterExists(result)) {
return result;
}
// t
List<Server> masterServerList = monitorService.getServerListFromRegistry(true);
Host host = new Host(masterServerList.get(0).getHost(), masterServerList.get(0).getPort());
TaskExecuteStartCommand taskExecuteStartCommand = new TaskExecuteStartCommand();
taskExecuteStartCommand.setExecutorId(loginUser.getId());
taskExecuteStartCommand.setExecutorName(loginUser.getUserName());
taskExecuteStartCommand.setProjectCode(projectCode);
taskExecuteStartCommand.setTaskDefinitionCode(taskDefinitionCode);
taskExecuteStartCommand.setTaskDefinitionVersion(taskDefinitionVersion);
taskExecuteStartCommand.setWorkerGroup(workerGroup);
taskExecuteStartCommand.setWarningGroupId(warningGroupId);
taskExecuteStartCommand.setEnvironmentCode(environmentCode);
taskExecuteStartCommand.setStartParams(startParams);
taskExecuteStartCommand.setDryRun(dryRun);
org.apache.dolphinscheduler.remote.command.Command response =
stateEventCallbackService.sendSync(host, taskExecuteStartCommand.convert2Command());
if (response != null) {
putMsg(result, Status.SUCCESS);
} else {
putMsg(result, Status.START_TASK_INSTANCE_ERROR);
}
return result;
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DependentProcessDefinition.java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.dao.entity;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.CycleEnum;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.plugin.task.api.model.DependentItem;
import org.apache.dolphinscheduler.plugin.task.api.model.DependentTaskModel;
import org.apache.dolphinscheduler.plugin.task.api.parameters.DependentParameters;
import java.util.List;
/**
* dependent process definition
*/
public class DependentProcessDefinition {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DependentProcessDefinition.java
|
/**
* process definition code
*/
private long processDefinitionCode;
/**
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DependentProcessDefinition.java
|
* process definition name
*/
private String processDefinitionName;
/**
* task definition name
*/
private long taskDefinitionCode;
/**
* task definition params
*/
private String taskParams;
/**
* schedule worker group
*/
private String workerGroup;
/**
* get dependent cycle
* @return CycleEnum
*/
public CycleEnum getDependentCycle() {
DependentParameters dependentParameters = this.getDependentParameters();
List<DependentTaskModel> dependentTaskModelList = dependentParameters.getDependTaskList();
for (DependentTaskModel dependentTaskModel : dependentTaskModelList) {
List<DependentItem> dependentItemList = dependentTaskModel.getDependItemList();
for (DependentItem dependentItem : dependentItemList) {
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode()) {
return cycle2CycleEnum(dependentItem.getCycle());
}
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DependentProcessDefinition.java
|
return CycleEnum.DAY;
}
public CycleEnum cycle2CycleEnum(String cycle) {
CycleEnum cycleEnum = null;
switch (cycle) {
case "day":
cycleEnum = CycleEnum.DAY;
break;
case "hour":
cycleEnum = CycleEnum.HOUR;
break;
case "week":
cycleEnum = CycleEnum.WEEK;
break;
case "month":
cycleEnum = CycleEnum.MONTH;
break;
default:
break;
}
return cycleEnum;
}
public DependentParameters getDependentParameters() {
return JSONUtils.parseObject(getDependence(), DependentParameters.class);
}
public String getDependence() {
return JSONUtils.getNodeString(this.taskParams, Constants.DEPENDENCE);
}
public String getProcessDefinitionName() {
return this.processDefinitionName;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,732 |
[Bug] [Dependent] Dependent downstream trigger error when schedule cycle not day.
|
### 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
Dependent downstream trigger error when schedule cycle not day.
### What you expected to happen
Can normal schedule downstream when upstream rerun use denpendency mode.
```
DependentProcessDefinition.getDependentCycle()
if (this.getProcessDefinitionCode() == dependentItem.getDefinitionCode())
```
this.getProcessDefinitionCode() should use upstream process code.
### How to reproduce
create two workflow, parent, child, child denpend on parent and schedule evert hour.
### Anything else
_No response_
### Version
3.0.0
### 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/11732
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-09-01T07:54:18Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/DependentProcessDefinition.java
|
}
public void setProcessDefinitionName(String name) {
this.processDefinitionName = name;
}
public long getProcessDefinitionCode() {
return this.processDefinitionCode;
}
public void setProcessDefinitionCode(long code) {
this.processDefinitionCode = code;
}
public long getTaskDefinitionCode() {
return this.taskDefinitionCode;
}
public void setTaskDefinitionCode(long code) {
this.taskDefinitionCode = code;
}
public String getTaskParams() {
return this.taskParams;
}
public void setTaskParams(String taskParams) {
this.taskParams = taskParams;
}
public String getWorkerGroup() {
return this.workerGroup;
}
public void setWorkerGroup(String workerGroup) {
this.workerGroup = workerGroup;
}
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.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.service.impl;
import static org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant.WORKFLOW_START;
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;
import static org.apache.dolphinscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_NODES;
import static org.apache.dolphinscheduler.common.Constants.CMD_PARAM_START_PARAMS;
import static org.apache.dolphinscheduler.common.Constants.COMMA;
import static org.apache.dolphinscheduler.common.Constants.MAX_TASK_TIMEOUT;
import static org.apache.dolphinscheduler.common.Constants.SCHEDULE_TIME_MAX_LENGTH;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant;
import org.apache.dolphinscheduler.api.enums.ExecuteType;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.ExecutorService;
import org.apache.dolphinscheduler.api.service.MonitorService;
import org.apache.dolphinscheduler.api.service.ProjectService;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.common.enums.CommandType;
import org.apache.dolphinscheduler.common.enums.ComplementDependentMode;
import org.apache.dolphinscheduler.common.enums.CycleEnum;
import org.apache.dolphinscheduler.common.enums.FailureStrategy;
import org.apache.dolphinscheduler.common.enums.Flag;
import org.apache.dolphinscheduler.common.enums.Priority;
import org.apache.dolphinscheduler.common.enums.ReleaseState;
import org.apache.dolphinscheduler.common.enums.RunMode;
import org.apache.dolphinscheduler.common.enums.TaskDependType;
import org.apache.dolphinscheduler.common.enums.TaskGroupQueueStatus;
import org.apache.dolphinscheduler.common.enums.WarningType;
import org.apache.dolphinscheduler.common.enums.WorkflowExecutionStatus;
import org.apache.dolphinscheduler.common.model.Server;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.entity.Command;
import org.apache.dolphinscheduler.dao.entity.DependentProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.ProcessDefinition;
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
import org.apache.dolphinscheduler.dao.entity.ProcessTaskRelation;
import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.Schedule;
import org.apache.dolphinscheduler.dao.entity.TaskDefinition;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import org.apache.dolphinscheduler.dao.entity.TaskGroupQueue;
import org.apache.dolphinscheduler.dao.entity.Tenant;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.ProcessDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessInstanceMapper;
import org.apache.dolphinscheduler.dao.mapper.ProcessTaskRelationMapper;
import org.apache.dolphinscheduler.dao.mapper.ProjectMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskDefinitionMapper;
import org.apache.dolphinscheduler.dao.mapper.TaskGroupQueueMapper;
import org.apache.dolphinscheduler.dao.repository.ProcessInstanceDao;
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;
import org.apache.dolphinscheduler.remote.command.TaskExecuteStartCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowExecutingDataRequestCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowExecutingDataResponseCommand;
import org.apache.dolphinscheduler.remote.command.WorkflowStateEventChangeCommand;
import org.apache.dolphinscheduler.remote.dto.WorkflowExecuteDto;
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.process.ProcessService;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
import java.util.List;
import java.util.Map;
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.Service;
import com.fasterxml.jackson.core.type.TypeReference;
import com.google.common.collect.Lists;
/**
* executor service impl
*/
@Service
public class ExecutorServiceImpl extends BaseServiceImpl implements ExecutorService {
private static final Logger logger = LoggerFactory.getLogger(ExecutorServiceImpl.class);
@Autowired
private ProjectMapper projectMapper;
@Autowired
private ProjectService projectService;
@Autowired
private ProcessDefinitionMapper processDefinitionMapper;
@Autowired
private MonitorService monitorService;
@Autowired
private ProcessInstanceMapper processInstanceMapper;
@Autowired
private ProcessService processService;
@Autowired
private ProcessInstanceDao processInstanceDao;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
@Autowired
private StateEventCallbackService stateEventCallbackService;
@Autowired
private TaskDefinitionMapper taskDefinitionMapper;
@Autowired
private ProcessTaskRelationMapper processTaskRelationMapper;
@Autowired
private TaskGroupQueueMapper taskGroupQueueMapper;
/**
* execute process instance
*
* @param loginUser login user
* @param projectCode project code
* @param processDefinitionCode process definition code
* @param cronTime cron time
* @param commandType command type
* @param failureStrategy failure strategy
* @param startNodeList start nodelist
* @param taskDependType node dependency type
* @param warningType warning type
* @param warningGroupId notify group id
* @param processInstancePriority process instance priority
* @param workerGroup worker group name
* @param environmentCode environment code
* @param runMode run mode
* @param timeout timeout
* @param startParams the global param values which pass to new process instance
* @param expectedParallelismNumber the expected parallelism number when execute complement in parallel mode
* @return execute process instance code
*/
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
@Override
public Map<String, Object> execProcessInstance(User loginUser, long projectCode, long processDefinitionCode,
String cronTime, CommandType commandType,
FailureStrategy failureStrategy, String startNodeList,
TaskDependType taskDependType, WarningType warningType,
int warningGroupId, RunMode runMode,
Priority processInstancePriority, String workerGroup,
Long environmentCode, Integer timeout,
Map<String, String> startParams, Integer expectedParallelismNumber,
int dryRun, ComplementDependentMode complementDependentMode) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result =
projectService.checkProjectAndAuth(loginUser, project, projectCode, WORKFLOW_START);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (timeout <= 0 || timeout > MAX_TASK_TIMEOUT) {
putMsg(result, Status.TASK_TIMEOUT_PARAMS_ERROR);
return result;
}
ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode);
result = checkProcessDefinitionValid(projectCode, processDefinition, processDefinitionCode,
processDefinition.getVersion());
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (!checkTenantSuitable(processDefinition)) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
logger.error("there is not any valid tenant for the process definition: id:{},name:{}, ",
processDefinition.getId(), processDefinition.getName());
putMsg(result, Status.TENANT_NOT_SUITABLE);
return result;
}
if (!checkScheduleTimeNum(commandType, cronTime)) {
putMsg(result, Status.SCHEDULE_TIME_NUMBER);
return result;
}
if (!checkMasterExists(result)) {
return result;
}
/**
* create command
*/
int create =
this.createCommand(commandType, processDefinition.getCode(), taskDependType, failureStrategy,
startNodeList,
cronTime, warningType, loginUser.getId(), warningGroupId, runMode, processInstancePriority,
workerGroup,
environmentCode, startParams, expectedParallelismNumber, dryRun, complementDependentMode);
if (create > 0) {
processDefinition.setWarningGroupId(warningGroupId);
processDefinitionMapper.updateById(processDefinition);
putMsg(result, Status.SUCCESS);
} else {
putMsg(result, Status.START_PROCESS_INSTANCE_ERROR);
}
return result;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
/**
* check whether master exists
*
* @param result result
* @return master exists return true , otherwise return false
*/
private boolean checkMasterExists(Map<String, Object> result) {
List<Server> masterServers = monitorService.getServerListFromRegistry(true);
if (masterServers.isEmpty()) {
putMsg(result, Status.MASTER_NOT_EXISTS);
return false;
}
return true;
}
/**
* @param complementData
* @param cronTime
* @return CommandType is COMPLEMENT_DATA and cronTime's number is not greater than 100 return true , otherwise return false
*/
private boolean checkScheduleTimeNum(CommandType complementData, String cronTime) {
if (!CommandType.COMPLEMENT_DATA.equals(complementData)) {
return true;
}
if (cronTime == null) {
return true;
}
Map<String, String> cronMap = JSONUtils.toMap(cronTime);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (cronMap.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
String[] stringDates = cronMap.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST).split(COMMA);
if (stringDates.length > SCHEDULE_TIME_MAX_LENGTH) {
return false;
}
}
return true;
}
/**
* check whether the process definition can be executed
*
* @param projectCode project code
* @param processDefinition process definition
* @param processDefineCode process definition code
* @param version process instance verison
* @return check result code
*/
@Override
public Map<String, Object> checkProcessDefinitionValid(long projectCode, ProcessDefinition processDefinition,
long processDefineCode, Integer version) {
Map<String, Object> result = new HashMap<>();
if (processDefinition == null || projectCode != processDefinition.getProjectCode()) {
putMsg(result, Status.PROCESS_DEFINE_NOT_EXIST, String.valueOf(processDefineCode));
} else if (processDefinition.getReleaseState() != ReleaseState.ONLINE) {
putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, String.valueOf(processDefineCode), version);
} else if (!checkSubProcessDefinitionValid(processDefinition)) {
putMsg(result, Status.SUB_PROCESS_DEFINE_NOT_RELEASE);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
} else {
result.put(Constants.STATUS, Status.SUCCESS);
}
return result;
}
/**
* check whether the current process has subprocesses and validate all subprocesses
*
* @param processDefinition
* @return check result
*/
@Override
public boolean checkSubProcessDefinitionValid(ProcessDefinition processDefinition) {
List<ProcessTaskRelation> processTaskRelations =
processTaskRelationMapper.queryDownstreamByProcessDefinitionCode(processDefinition.getCode());
if (processTaskRelations.isEmpty()) {
return true;
}
Set<Long> relationCodes =
processTaskRelations.stream().map(ProcessTaskRelation::getPostTaskCode).collect(Collectors.toSet());
List<TaskDefinition> taskDefinitions = taskDefinitionMapper.queryByCodeList(relationCodes);
Set<Long> processDefinitionCodeSet = new HashSet<>();
taskDefinitions.stream()
.filter(task -> TaskConstants.TASK_TYPE_SUB_PROCESS.equalsIgnoreCase(task.getTaskType())).forEach(
taskDefinition -> processDefinitionCodeSet.add(Long.valueOf(
JSONUtils.getNodeString(taskDefinition.getTaskParams(),
Constants.CMD_PARAM_SUB_PROCESS_DEFINE_CODE))));
if (processDefinitionCodeSet.isEmpty()) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
return true;
}
List<ProcessDefinition> processDefinitions = processDefinitionMapper.queryByCodes(processDefinitionCodeSet);
return processDefinitions.stream()
.filter(definition -> definition.getReleaseState().equals(ReleaseState.OFFLINE))
.collect(Collectors.toSet())
.isEmpty();
}
/**
* do action to process instance:pause, stop, repeat, recover from pause, recover from stop,rerun failed task
*
* @param loginUser login user
* @param projectCode project code
* @param processInstanceId process instance id
* @param executeType execute type
* @return execute result code
*/
@Override
public Map<String, Object> execute(User loginUser, long projectCode, Integer processInstanceId,
ExecuteType executeType) {
Project project = projectMapper.queryByCode(projectCode);
Map<String, Object> result = projectService.checkProjectAndAuth(loginUser, project, projectCode,
ApiFuncIdentificationConstant.map.get(executeType));
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
if (!checkMasterExists(result)) {
return result;
}
ProcessInstance processInstance = processService.findProcessInstanceDetailById(processInstanceId);
if (processInstance == null) {
putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, processInstanceId);
return result;
}
ProcessDefinition processDefinition =
processService.findProcessDefinition(processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
processDefinition.setReleaseState(ReleaseState.ONLINE);
if (executeType != ExecuteType.STOP && executeType != ExecuteType.PAUSE) {
result =
checkProcessDefinitionValid(projectCode, processDefinition,
processInstance.getProcessDefinitionCode(),
processInstance.getProcessDefinitionVersion());
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
}
result = checkExecuteType(processInstance, executeType);
if (result.get(Constants.STATUS) != Status.SUCCESS) {
return result;
}
if (!checkTenantSuitable(processDefinition)) {
logger.error("there is not any valid tenant for the process definition: id:{},name:{}, ",
processDefinition.getId(), processDefinition.getName());
putMsg(result, Status.TENANT_NOT_SUITABLE);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
// g
Map<String, Object> commandMap =
JSONUtils.parseObject(processInstance.getCommandParam(), new TypeReference<Map<String, Object>>() {
});
String startParams = null;
if (MapUtils.isNotEmpty(commandMap) && executeType == ExecuteType.REPEAT_RUNNING) {
Object startParamsJson = commandMap.get(Constants.CMD_PARAM_START_PARAMS);
if (startParamsJson != null) {
startParams = startParamsJson.toString();
}
}
switch (executeType) {
case REPEAT_RUNNING:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.REPEAT_RUNNING, startParams);
break;
case RECOVER_SUSPENDED_PROCESS:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.RECOVER_SUSPENDED_PROCESS, startParams);
break;
case START_FAILURE_TASK_PROCESS:
result = insertCommand(loginUser, processInstanceId, processDefinition.getCode(),
processDefinition.getVersion(), CommandType.START_FAILURE_TASK_PROCESS, startParams);
break;
case STOP:
if (processInstance.getState() == WorkflowExecutionStatus.READY_STOP) {
putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(),
processInstance.getState());
} else {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
result =
updateProcessInstancePrepare(processInstance, CommandType.STOP,
WorkflowExecutionStatus.READY_STOP);
}
break;
case PAUSE:
if (processInstance.getState() == WorkflowExecutionStatus.READY_PAUSE) {
putMsg(result, Status.PROCESS_INSTANCE_ALREADY_CHANGED, processInstance.getName(),
processInstance.getState());
} else {
result = updateProcessInstancePrepare(processInstance, CommandType.PAUSE,
WorkflowExecutionStatus.READY_PAUSE);
}
break;
default:
logger.error("unknown execute type : {}", executeType);
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "unknown execute type");
break;
}
return result;
}
@Override
public Map<String, Object> forceStartTaskInstance(User loginUser, int queueId) {
Map<String, Object> result = new HashMap<>();
TaskGroupQueue taskGroupQueue = taskGroupQueueMapper.selectById(queueId);
// c
ProcessInstance processInstance = processInstanceMapper.selectById(taskGroupQueue.getProcessId());
if (processInstance == null) {
putMsg(result, Status.PROCESS_INSTANCE_NOT_EXIST, taskGroupQueue.getProcessId());
return result;
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
if (!checkMasterExists(result)) {
return result;
}
return forceStart(processInstance, taskGroupQueue);
}
/**
* check tenant suitable
*
* @param processDefinition process definition
* @return true if tenant suitable, otherwise return false
*/
private boolean checkTenantSuitable(ProcessDefinition processDefinition) {
Tenant tenant =
processService.getTenantForProcess(processDefinition.getTenantId(), processDefinition.getUserId());
return tenant != null;
}
/**
* Check the state of process instance and the type of operation match
*
* @param processInstance process instance
* @param executeType execute type
* @return check result code
*/
private Map<String, Object> checkExecuteType(ProcessInstance processInstance, ExecuteType executeType) {
Map<String, Object> result = new HashMap<>();
WorkflowExecutionStatus executionStatus = processInstance.getState();
boolean checkResult = false;
switch (executeType) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
case PAUSE:
if (executionStatus.isRunning()) {
checkResult = true;
}
break;
case STOP:
if (executionStatus.canStop()) {
checkResult = true;
}
break;
case REPEAT_RUNNING:
if (executionStatus.isFinished()) {
checkResult = true;
}
break;
case START_FAILURE_TASK_PROCESS:
if (executionStatus.isFailure()) {
checkResult = true;
}
break;
case RECOVER_SUSPENDED_PROCESS:
if (executionStatus.isPause() || executionStatus.isStop()) {
checkResult = true;
}
break;
default:
break;
}
if (!checkResult) {
putMsg(result, Status.PROCESS_INSTANCE_STATE_OPERATION_ERROR, processInstance.getName(),
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
executionStatus.toString(), executeType.toString());
} else {
putMsg(result, Status.SUCCESS);
}
return result;
}
/**
* prepare to update process instance command type and status
*
* @param processInstance process instance
* @param commandType command type
* @param executionStatus execute status
* @return update result
*/
private Map<String, Object> updateProcessInstancePrepare(ProcessInstance processInstance, CommandType commandType,
WorkflowExecutionStatus executionStatus) {
Map<String, Object> result = new HashMap<>();
processInstance.setCommandType(commandType);
processInstance.addHistoryCmd(commandType);
processInstance.setStateWithDesc(executionStatus, commandType.getDescp() + "by ui");
int update = processInstanceDao.updateProcessInstance(processInstance);
// d
if (update > 0) {
// d
// s
WorkflowStateEventChangeCommand workflowStateEventChangeCommand = new WorkflowStateEventChangeCommand(
processInstance.getId(), 0, processInstance.getState(), processInstance.getId(), 0);
Host host = new Host(processInstance.getHost());
stateEventCallbackService.sendResult(host, workflowStateEventChangeCommand.convert2Command());
putMsg(result, Status.SUCCESS);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
} else {
putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR);
}
return result;
}
/**
* prepare to update process instance command type and status
*
* @param processInstance process instance
* @return update result
*/
private Map<String, Object> forceStart(ProcessInstance processInstance, TaskGroupQueue taskGroupQueue) {
Map<String, Object> result = new HashMap<>();
if (taskGroupQueue.getStatus() != TaskGroupQueueStatus.WAIT_QUEUE) {
putMsg(result, Status.TASK_GROUP_QUEUE_ALREADY_START);
return result;
}
taskGroupQueue.setForceStart(Flag.YES.getCode());
processService.updateTaskGroupQueue(taskGroupQueue);
processService.sendStartTask2Master(processInstance, taskGroupQueue.getTaskId(),
org.apache.dolphinscheduler.remote.command.CommandType.TASK_FORCE_STATE_EVENT_REQUEST);
putMsg(result, Status.SUCCESS);
return result;
}
/**
* insert command, used in the implementation of the page, rerun, recovery (pause / failure) execution
*
* @param loginUser login user
* @param instanceId instance id
* @param processDefinitionCode process definition code
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
* @param processVersion
* @param commandType command type
* @return insert result code
*/
private Map<String, Object> insertCommand(User loginUser, Integer instanceId, long processDefinitionCode,
int processVersion, CommandType commandType, String startParams) {
Map<String, Object> result = new HashMap<>();
// T
Map<String, Object> cmdParam = new HashMap<>();
cmdParam.put(CMD_PARAM_RECOVER_PROCESS_ID_STRING, instanceId);
if (!StringUtils.isEmpty(startParams)) {
cmdParam.put(CMD_PARAM_START_PARAMS, startParams);
}
Command command = new Command();
command.setCommandType(commandType);
command.setProcessDefinitionCode(processDefinitionCode);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
command.setExecutorId(loginUser.getId());
command.setProcessDefinitionVersion(processVersion);
command.setProcessInstanceId(instanceId);
if (!processService.verifyIsNeedCreateCommand(command)) {
putMsg(result, Status.PROCESS_INSTANCE_EXECUTING_COMMAND, String.valueOf(processDefinitionCode));
return result;
}
int create = processService.createCommand(command);
if (create > 0) {
putMsg(result, Status.SUCCESS);
} else {
putMsg(result, Status.EXECUTE_PROCESS_INSTANCE_ERROR);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
return result;
}
/**
* check whether sub processes are offline before starting process definition
*
* @param processDefinitionCode process definition code
* @return check result code
*/
@Override
public Map<String, Object> startCheckByProcessDefinedCode(long processDefinitionCode) {
Map<String, Object> result = new HashMap<>();
ProcessDefinition processDefinition = processDefinitionMapper.queryByCode(processDefinitionCode);
if (processDefinition == null) {
logger.error("process definition is not found");
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, "processDefinitionCode");
return result;
}
List<Long> codes = new ArrayList<>();
processService.recurseFindSubProcess(processDefinition.getCode(), codes);
if (!codes.isEmpty()) {
List<ProcessDefinition> processDefinitionList = processDefinitionMapper.queryByCodes(codes);
if (processDefinitionList != null) {
for (ProcessDefinition processDefinitionTmp : processDefinitionList) {
/**
* if there is no online process, exit directly
*/
if (processDefinitionTmp.getReleaseState() != ReleaseState.ONLINE) {
putMsg(result, Status.PROCESS_DEFINE_NOT_RELEASE, processDefinitionTmp.getName());
logger.info("not release process definition id: {} , name : {}", processDefinitionTmp.getId(),
processDefinitionTmp.getName());
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
return result;
}
}
}
}
putMsg(result, Status.SUCCESS);
return result;
}
/**
* create command
*
* @param commandType commandType
* @param processDefineCode processDefineCode
* @param nodeDep nodeDep
* @param failureStrategy failureStrategy
* @param startNodeList startNodeList
* @param schedule schedule
* @param warningType warningType
* @param executorId executorId
* @param warningGroupId warningGroupId
* @param runMode runMode
* @param processInstancePriority processInstancePriority
* @param workerGroup workerGroup
* @param environmentCode environmentCode
* @return command id
*/
private int createCommand(CommandType commandType, long processDefineCode, TaskDependType nodeDep,
FailureStrategy failureStrategy, String startNodeList, String schedule,
WarningType warningType, int executorId, int warningGroupId, RunMode runMode,
Priority processInstancePriority, String workerGroup, Long environmentCode,
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
Map<String, String> startParams, Integer expectedParallelismNumber, int dryRun,
ComplementDependentMode complementDependentMode) {
/**
* instantiate command schedule instance
*/
Command command = new Command();
Map<String, String> cmdParam = new HashMap<>();
if (commandType == null) {
command.setCommandType(CommandType.START_PROCESS);
} else {
command.setCommandType(commandType);
}
command.setProcessDefinitionCode(processDefineCode);
if (nodeDep != null) {
command.setTaskDependType(nodeDep);
}
if (failureStrategy != null) {
command.setFailureStrategy(failureStrategy);
}
if (!StringUtils.isEmpty(startNodeList)) {
cmdParam.put(CMD_PARAM_START_NODES, startNodeList);
}
if (warningType != null) {
command.setWarningType(warningType);
}
if (startParams != null && startParams.size() > 0) {
cmdParam.put(CMD_PARAM_START_PARAMS, JSONUtils.toJsonString(startParams));
}
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
command.setExecutorId(executorId);
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
command.setWarningGroupId(warningGroupId);
command.setProcessInstancePriority(processInstancePriority);
command.setWorkerGroup(workerGroup);
command.setEnvironmentCode(environmentCode);
command.setDryRun(dryRun);
ProcessDefinition processDefinition = processService.findProcessDefinitionByCode(processDefineCode);
if (processDefinition != null) {
command.setProcessDefinitionVersion(processDefinition.getVersion());
}
command.setProcessInstanceId(0);
// d
if (commandType == CommandType.COMPLEMENT_DATA) {
if (schedule == null || StringUtils.isEmpty(schedule)) {
return 0;
}
if (!isValidateScheduleTime(schedule)) {
return 0;
}
try {
return createComplementCommandList(schedule, runMode, command, expectedParallelismNumber,
complementDependentMode);
} catch (CronParseException cronParseException) {
// W
// c
return 0;
}
} else {
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
return processService.createCommand(command);
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
}
/**
* create complement command
* close left and close right
*
* @param scheduleTimeParam
* @param runMode
* @return
*/
protected int createComplementCommandList(String scheduleTimeParam, RunMode runMode, Command command,
Integer expectedParallelismNumber,
ComplementDependentMode complementDependentMode) throws CronParseException {
int createCount = 0;
String startDate = null;
String endDate = null;
String dateList = null;
int dependentProcessDefinitionCreateCount = 0;
runMode = (runMode == null) ? RunMode.RUN_MODE_SERIAL : runMode;
Map<String, String> cmdParam = JSONUtils.toMap(command.getCommandParam());
Map<String, String> scheduleParam = JSONUtils.toMap(scheduleTimeParam);
if (scheduleParam.containsKey(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST)) {
dateList = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST);
dateList = removeDuplicates(dateList);
}
if (scheduleParam.containsKey(CMDPARAM_COMPLEMENT_DATA_START_DATE) && scheduleParam.containsKey(
CMDPARAM_COMPLEMENT_DATA_END_DATE)) {
startDate = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE);
endDate = scheduleParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE);
}
switch (runMode) {
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
case RUN_MODE_SERIAL: {
if (StringUtils.isNotEmpty(dateList)) {
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, dateList);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
createCount = processService.createCommand(command);
}
if (startDate != null && endDate != null) {
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE, startDate);
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE, endDate);
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
createCount = processService.createCommand(command);
// d
List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode(
command.getProcessDefinitionCode());
if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) {
logger.info("process code: {} complement dependent in off mode or schedule's size is 0, skip "
+ "dependent complement data", command.getProcessDefinitionCode());
} else {
dependentProcessDefinitionCreateCount += createComplementDependentCommand(schedules, command);
}
}
break;
}
case RUN_MODE_PARALLEL: {
if (startDate != null && endDate != null) {
List<Schedule> schedules = processService.queryReleaseSchedulerListByProcessDefinitionCode(
command.getProcessDefinitionCode());
List<ZonedDateTime> listDate = new ArrayList<>(
CronUtils.getSelfFireDateList(DateUtils.stringToZoneDateTime(startDate),
DateUtils.stringToZoneDateTime(endDate), schedules));
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
int listDateSize = listDate.size();
createCount = listDate.size();
if (!CollectionUtils.isEmpty(listDate)) {
if (expectedParallelismNumber != null && expectedParallelismNumber != 0) {
createCount = Math.min(createCount, expectedParallelismNumber);
}
logger.info("In parallel mode, current expectedParallelismNumber:{}", createCount);
// D
// T
int itemsPerCommand = (listDateSize / createCount);
int remainingItems = (listDateSize % createCount);
int startDateIndex = 0;
int endDateIndex = 0;
for (int i = 1; i <= createCount; i++) {
int extra = (i <= remainingItems) ? 1 : 0;
int singleCommandItems = (itemsPerCommand + extra);
if (i == 1) {
endDateIndex += singleCommandItems - 1;
} else {
startDateIndex = endDateIndex + 1;
endDateIndex += singleCommandItems;
}
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_START_DATE,
DateUtils.dateToString(listDate.get(startDateIndex)));
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_END_DATE,
DateUtils.dateToString(listDate.get(endDateIndex)));
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
processService.createCommand(command);
if (schedules.isEmpty() || complementDependentMode == ComplementDependentMode.OFF_MODE) {
logger.info(
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
"process code: {} complement dependent in off mode or schedule's size is 0, skip "
+ "dependent complement data",
command.getProcessDefinitionCode());
} else {
dependentProcessDefinitionCreateCount +=
createComplementDependentCommand(schedules, command);
}
}
}
}
if (StringUtils.isNotEmpty(dateList)) {
List<String> listDate = Arrays.asList(dateList.split(COMMA));
createCount = listDate.size();
if (!CollectionUtils.isEmpty(listDate)) {
if (expectedParallelismNumber != null && expectedParallelismNumber != 0) {
createCount = Math.min(createCount, expectedParallelismNumber);
}
logger.info("In parallel mode, current expectedParallelismNumber:{}", createCount);
for (List<String> stringDate : Lists.partition(listDate, createCount)) {
cmdParam.put(CMDPARAM_COMPLEMENT_DATA_SCHEDULE_DATE_LIST, String.join(COMMA, stringDate));
command.setCommandParam(JSONUtils.toJsonString(cmdParam));
processService.createCommand(command);
}
}
}
break;
}
default:
break;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
logger.info("create complement command count: {}, create dependent complement command count: {}", createCount,
dependentProcessDefinitionCreateCount);
return createCount;
}
/**
* create complement dependent command
*/
protected int createComplementDependentCommand(List<Schedule> schedules, Command command) {
int dependentProcessDefinitionCreateCount = 0;
Command dependentCommand;
try {
dependentCommand = (Command) BeanUtils.cloneBean(command);
} catch (Exception e) {
logger.error("copy dependent command error: ", e);
return dependentProcessDefinitionCreateCount;
}
List<DependentProcessDefinition> dependentProcessDefinitionList =
getComplementDependentDefinitionList(dependentCommand.getProcessDefinitionCode(),
CronUtils.getMaxCycle(schedules.get(0).getCrontab()), dependentCommand.getWorkerGroup());
dependentCommand.setTaskDependType(TaskDependType.TASK_POST);
for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) {
dependentCommand.setProcessDefinitionCode(dependentProcessDefinition.getProcessDefinitionCode());
dependentCommand.setWorkerGroup(dependentProcessDefinition.getWorkerGroup());
Map<String, String> cmdParam = JSONUtils.toMap(dependentCommand.getCommandParam());
cmdParam.put(CMD_PARAM_START_NODES, String.valueOf(dependentProcessDefinition.getTaskDefinitionCode()));
dependentCommand.setCommandParam(JSONUtils.toJsonString(cmdParam));
dependentProcessDefinitionCreateCount += processService.createCommand(dependentCommand);
}
return dependentProcessDefinitionCreateCount;
}
|
closed
|
apache/dolphinscheduler
|
https://github.com/apache/dolphinscheduler
| 11,709 |
[Bug] [Dependent] Dependent triger error version downstream
|
### 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 historical version of the workflow is triggered downstream when dependency mode complement is enabled upstream
### What you expected to happen
Use the version of the day of the run.
### How to reproduce




### Anything else
_No response_
### Version
3.0.0
### 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/11709
|
https://github.com/apache/dolphinscheduler/pull/11734
|
2e61c76c225ccfd39a7860fb6fcd6653ef86b9a7
|
37325b4c3410c2fe2f025c16363ea0c3a157647e
| 2022-08-31T07:15:08Z |
java
| 2022-09-08T07:08:10Z |
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ExecutorServiceImpl.java
|
/**
* get complement d list
*/
private List<DependentProcessDefinition> getComplementDependentDefinitionList(long processDefinitionCode,
CycleEnum processDefinitionCycle,
String workerGroup) {
List<DependentProcessDefinition> dependentProcessDefinitionList =
processService.queryDependentProcessDefinitionByProcessDefinitionCode(processDefinitionCode);
return checkDependentProcessDefinitionValid(dependentProcessDefinitionList, processDefinitionCycle,
workerGroup);
}
/**
* Check whether the dependency cycle of the dependent node is consistent with the schedule cycle of
* the d and if there is no worker group in the schedule, use the complement selection's
* worker group
*/
private List<DependentProcessDefinition> checkDependentProcessDefinitionValid(
List<DependentProcessDefinition> dependentProcessDefinitionList,
CycleEnum processDefinitionCycle,
String workerGroup) {
List<DependentProcessDefinition> validDependentProcessDefinitionList = new ArrayList<>();
List<Long> processDefinitionCodeList =
dependentProcessDefinitionList.stream().map(DependentProcessDefinition::getProcessDefinitionCode)
.collect(Collectors.toList());
Map<Long, String> processDefinitionWorkerGroupMap =
processService.queryWorkerGroupByProcessDefinitionCodes(processDefinitionCodeList);
for (DependentProcessDefinition dependentProcessDefinition : dependentProcessDefinitionList) {
if (dependentProcessDefinition.getDependentCycle() == processDefinitionCycle) {
if (processDefinitionWorkerGroupMap
.get(dependentProcessDefinition.getProcessDefinitionCode()) == null) {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.