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 | 7,857 | [Bug] [Edit User Info] Problems caused by modifying the administrator user information. | ### 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
- User state
When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable.

The same problem exists in the user management section.

- Authorized operation of admin user
The administrator should have all the permissions by default, and there is no need to perform authorization related operations.

### What you expected to happen
Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself.
### How to reproduce
Log in with any identity to modify your personal status.
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [ ] 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/7857 | https://github.com/apache/dolphinscheduler/pull/7891 | 7151c545783ed811b652b1a06a16aa228e3f1121 | 24eb40c2b24f3361617ae59c9264fa52546033db | 2022-01-06T13:41:11Z | java | 2022-01-08T10:01:22Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java | User user = createUser(userName, userPassword, email, 1, "", "", Flag.NO.ordinal());
putMsg(result, Status.SUCCESS);
result.put(Constants.DATA_LIST, user);
return result;
}
/**
* activate user, only system admin have permission, change user state code 0 to 1
*
* @param loginUser login user
* @param userName user name
* @return create result code
*/
@Override
public Map<String, Object> activateUser(User loginUser, String userName) {
Map<String, Object> result = new HashMap<>();
result.put(Constants.STATUS, false);
if (!isAdmin(loginUser)) {
putMsg(result, Status.USER_NO_OPERATION_PERM);
return result;
}
if (!CheckUtils.checkUserName(userName)) {
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, userName);
return result;
}
User user = userMapper.queryByUserNameAccurately(userName);
if (user == null) {
putMsg(result, Status.USER_NOT_EXIST, userName);
return result;
}
if (user.getState() != Flag.NO.ordinal()) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,857 | [Bug] [Edit User Info] Problems caused by modifying the administrator user information. | ### 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
- User state
When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable.

The same problem exists in the user management section.

- Authorized operation of admin user
The administrator should have all the permissions by default, and there is no need to perform authorization related operations.

### What you expected to happen
Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself.
### How to reproduce
Log in with any identity to modify your personal status.
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [ ] 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/7857 | https://github.com/apache/dolphinscheduler/pull/7891 | 7151c545783ed811b652b1a06a16aa228e3f1121 | 24eb40c2b24f3361617ae59c9264fa52546033db | 2022-01-06T13:41:11Z | java | 2022-01-08T10:01:22Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java | putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, userName);
return result;
}
user.setState(Flag.YES.ordinal());
Date now = new Date();
user.setUpdateTime(now);
userMapper.updateById(user);
User responseUser = userMapper.queryByUserNameAccurately(userName);
putMsg(result, Status.SUCCESS);
result.put(Constants.DATA_LIST, responseUser);
return result;
}
/**
* activate user, only system admin have permission, change users state code 0 to 1
*
* @param loginUser login user
* @param userNames user name
* @return create result code
*/
@Override
public Map<String, Object> batchActivateUser(User loginUser, List<String> userNames) {
Map<String, Object> result = new HashMap<>();
if (!isAdmin(loginUser)) {
putMsg(result, Status.USER_NO_OPERATION_PERM);
return result;
}
int totalSuccess = 0;
List<String> successUserNames = new ArrayList<>();
Map<String, Object> successRes = new HashMap<>();
int totalFailed = 0; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,857 | [Bug] [Edit User Info] Problems caused by modifying the administrator user information. | ### 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
- User state
When I logged in as an administrator, I modified the user information, changed the administrator's status to disabled, and modified the administrator's user name, all interfaces were unavailable.

The same problem exists in the user management section.

- Authorized operation of admin user
The administrator should have all the permissions by default, and there is no need to perform authorization related operations.

### What you expected to happen
Administrators cannot modify their own status, but they can modify the status of ordinary users. Ordinary users cannot modify their own status and the status of administrators and other ordinary users. The administrator does not need to assign any permissions to himself.
### How to reproduce
Log in with any identity to modify your personal status.
### Anything else
_No response_
### Version
dev
### Are you willing to submit PR?
- [ ] 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/7857 | https://github.com/apache/dolphinscheduler/pull/7891 | 7151c545783ed811b652b1a06a16aa228e3f1121 | 24eb40c2b24f3361617ae59c9264fa52546033db | 2022-01-06T13:41:11Z | java | 2022-01-08T10:01:22Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java | List<Map<String, String>> failedInfo = new ArrayList<>();
Map<String, Object> failedRes = new HashMap<>();
for (String userName : userNames) {
Map<String, Object> tmpResult = activateUser(loginUser, userName);
if (tmpResult.get(Constants.STATUS) != Status.SUCCESS) {
totalFailed++;
Map<String, String> failedBody = new HashMap<>();
failedBody.put("userName", userName);
Status status = (Status) tmpResult.get(Constants.STATUS);
String errorMessage = MessageFormat.format(status.getMsg(), userName);
failedBody.put("msg", errorMessage);
failedInfo.add(failedBody);
} else {
totalSuccess++;
successUserNames.add(userName);
}
}
successRes.put("sum", totalSuccess);
successRes.put("userName", successUserNames);
failedRes.put("sum", totalFailed);
failedRes.put("info", failedInfo);
Map<String, Object> res = new HashMap<>();
res.put("success", successRes);
res.put("failed", failedRes);
putMsg(result, Status.SUCCESS);
result.put(Constants.DATA_LIST, res);
return result;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | /*
* Lcensed to the Apache Software Foundaton (ASF) under one or more
* contrbutor lcense agreements. See the NOTICE fle dstrbuted wth
* ths work for addtonal nformaton regardng copyrght ownershp.
* The ASF lcenses ths fle to You under the Apache Lcense, Verson 2.0 |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | * (the "Lcense"); you may not use ths fle except n complance wth
* the Lcense. You may obtan a copy of the Lcense at
*
* http://www.apache.org/lcenses/LICENSE-2.0
*
* Unless requred by applcable law or agreed to n wrtng, software
* dstrbuted under the Lcense s dstrbuted on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, ether express or mpled.
* See the Lcense for the specfc language governng permssons and
* lmtatons under the Lcense.
*/
package org.apache.dolphnscheduler.server.master.runner;
mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_END_DATE;
mport statc org.apache.dolphnscheduler.common.Constants.CMDPARAM_COMPLEMENT_DATA_START_DATE;
mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_RECOVERY_START_NODE_STRING;
mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_RECOVER_PROCESS_ID_STRING;
mport statc org.apache.dolphnscheduler.common.Constants.CMD_PARAM_START_NODES;
mport statc org.apache.dolphnscheduler.common.Constants.DEFAULT_WORKER_GROUP;
mport org.apache.dolphnscheduler.common.Constants;
mport org.apache.dolphnscheduler.common.enums.CommandType;
mport org.apache.dolphnscheduler.common.enums.DependResult;
mport org.apache.dolphnscheduler.common.enums.Drect;
mport org.apache.dolphnscheduler.common.enums.ExecutonStatus;
mport org.apache.dolphnscheduler.common.enums.FalureStrategy;
mport org.apache.dolphnscheduler.common.enums.Flag;
mport org.apache.dolphnscheduler.common.enums.Prorty;
mport org.apache.dolphnscheduler.common.enums.StateEvent;
mport org.apache.dolphnscheduler.common.enums.StateEventType;
mport org.apache.dolphnscheduler.common.enums.TaskDependType;
mport org.apache.dolphnscheduler.common.enums.TaskGroupQueueStatus; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | mport org.apache.dolphnscheduler.common.enums.TaskTmeoutStrategy;
mport org.apache.dolphnscheduler.common.enums.TmeoutFlag;
mport org.apache.dolphnscheduler.common.graph.DAG;
mport org.apache.dolphnscheduler.common.model.TaskNode;
mport org.apache.dolphnscheduler.common.model.TaskNodeRelaton;
mport org.apache.dolphnscheduler.common.process.ProcessDag;
mport org.apache.dolphnscheduler.common.process.Property;
mport org.apache.dolphnscheduler.common.utls.DateUtls;
mport org.apache.dolphnscheduler.common.utls.JSONUtls;
mport org.apache.dolphnscheduler.common.utls.NetUtls;
mport org.apache.dolphnscheduler.common.utls.ParameterUtls;
mport org.apache.dolphnscheduler.dao.entty.Command;
mport org.apache.dolphnscheduler.dao.entty.Envronment;
mport org.apache.dolphnscheduler.dao.entty.ProcessDefnton;
mport org.apache.dolphnscheduler.dao.entty.ProcessInstance;
mport org.apache.dolphnscheduler.dao.entty.ProcessTaskRelaton;
mport org.apache.dolphnscheduler.dao.entty.ProjectUser;
mport org.apache.dolphnscheduler.dao.entty.Schedule;
mport org.apache.dolphnscheduler.dao.entty.TaskDefntonLog;
mport org.apache.dolphnscheduler.dao.entty.TaskGroupQueue;
mport org.apache.dolphnscheduler.dao.entty.TaskInstance;
mport org.apache.dolphnscheduler.dao.utls.DagHelper;
mport org.apache.dolphnscheduler.remote.command.HostUpdateCommand;
mport org.apache.dolphnscheduler.remote.utls.Host;
mport org.apache.dolphnscheduler.server.master.confg.MasterConfg;
mport org.apache.dolphnscheduler.server.master.dspatch.executor.NettyExecutorManager;
mport org.apache.dolphnscheduler.server.master.runner.task.ITaskProcessor;
mport org.apache.dolphnscheduler.server.master.runner.task.TaskActon;
mport org.apache.dolphnscheduler.server.master.runner.task.TaskProcessorFactory;
mport org.apache.dolphnscheduler.servce.alert.ProcessAlertManager; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | mport org.apache.dolphnscheduler.servce.process.ProcessServce;
mport org.apache.dolphnscheduler.servce.quartz.cron.CronUtls;
mport org.apache.dolphnscheduler.servce.queue.PeerTaskInstancePrortyQueue;
mport org.apache.commons.collectons.CollectonUtls;
mport org.apache.commons.lang.StrngUtls;
mport java.utl.ArrayLst;
mport java.utl.Arrays;
mport java.utl.Collecton;
mport java.utl.Date;
mport java.utl.HashMap;
mport java.utl.Iterator;
mport java.utl.Lst;
mport java.utl.Map;
mport java.utl.Objects;
mport java.utl.Set;
mport java.utl.concurrent.ConcurrentHashMap;
mport java.utl.concurrent.ConcurrentLnkedQueue;
mport java.utl.concurrent.atomc.AtomcBoolean;
mport org.slf4j.Logger;
mport org.slf4j.LoggerFactory;
mport com.google.common.collect.Lsts;
/**
* master exec thread,splt dag
*/
publc class WorkflowExecuteThread {
/**
* logger of WorkflowExecuteThread
*/
prvate statc fnal Logger logger = LoggerFactory.getLogger(WorkflowExecuteThread.class);
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | * master confg
*/
prvate MasterConfg masterConfg;
/**
* process servce
*/
prvate ProcessServce processServce;
/**
* alert manager
*/
prvate ProcessAlertManager processAlertManager;
/**
* netty executor manager
*/
prvate NettyExecutorManager nettyExecutorManager;
/**
* process nstance
*/
prvate ProcessInstance processInstance;
/**
* process defnton
*/
prvate ProcessDefnton processDefnton;
/**
* the object of DAG
*/
prvate DAG<Strng, TaskNode, TaskNodeRelaton> dag;
/**
* key of workflow
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | prvate Strng key;
/**
* start flag, true: start nodes submt completely
*/
prvate boolean sStart = false;
/**
* submt falure nodes
*/
prvate boolean taskFaledSubmt = false;
/**
* task nstance hash map, taskId as key
*/
prvate Map<Integer, TaskInstance> taskInstanceMap = new ConcurrentHashMap<>();
/**
* runnng TaskNode, taskId as key
*/
prvate fnal Map<Integer, ITaskProcessor> actveTaskProcessorMaps = new ConcurrentHashMap<>();
/**
* vald task map, taskCode as key, taskId as value
*/
prvate Map<Strng, Integer> valdTaskMap = new ConcurrentHashMap<>();
/**
* error task map, taskCode as key, taskId as value
*/
prvate Map<Strng, Integer> errorTaskMap = new ConcurrentHashMap<>();
/**
* complete task map, taskCode as key, taskId as value
*/
prvate Map<Strng, Integer> completeTaskMap = new ConcurrentHashMap<>();
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | * depend faled task map, taskCode as key, taskId as value
*/
prvate Map<Strng, Integer> dependFaledTaskMap = new ConcurrentHashMap<>();
/**
* forbdden task map, code as key
*/
prvate Map<Strng, TaskNode> forbddenTaskMap = new ConcurrentHashMap<>();
/**
* skp task map, code as key
*/
prvate Map<Strng, TaskNode> skpTaskNodeMap = new ConcurrentHashMap<>();
/**
* complement date lst
*/
prvate Lst<Date> complementLstDate = Lsts.newLnkedLst();
/**
* state event queue
*/
prvate ConcurrentLnkedQueue<StateEvent> stateEvents = new ConcurrentLnkedQueue<>();
/**
* ready to submt task queue
*/
prvate PeerTaskInstancePrortyQueue readyToSubmtTaskQueue = new PeerTaskInstancePrortyQueue();
/**
* state wheel execute thread
*/
prvate StateWheelExecuteThread stateWheelExecuteThread;
/**
* constructor of WorkflowExecuteThread
* |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | * @param processInstance processInstance
* @param processServce processServce
* @param nettyExecutorManager nettyExecutorManager
* @param processAlertManager processAlertManager
* @param masterConfg masterConfg
* @param stateWheelExecuteThread stateWheelExecuteThread
*/
publc WorkflowExecuteThread(ProcessInstance processInstance
, ProcessServce processServce
, NettyExecutorManager nettyExecutorManager
, ProcessAlertManager processAlertManager
, MasterConfg masterConfg
, StateWheelExecuteThread stateWheelExecuteThread) {
ths.processServce = processServce;
ths.processInstance = processInstance;
ths.masterConfg = masterConfg;
ths.nettyExecutorManager = nettyExecutorManager;
ths.processAlertManager = processAlertManager;
ths.stateWheelExecuteThread = stateWheelExecuteThread;
}
/**
* the process start nodes are submtted completely.
*/
publc boolean sStart() {
return ths.sStart;
}
/**
* handle event
*/
publc vod handleEvents() { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | f (!sStart) {
return;
}
whle (!ths.stateEvents.sEmpty()) {
try {
StateEvent stateEvent = ths.stateEvents.peek();
f (stateEventHandler(stateEvent)) {
ths.stateEvents.remove(stateEvent);
}
} catch (Excepton e) {
logger.error("state handle error:", e);
}
}
}
publc Strng getKey() {
f (StrngUtls.sNotEmpty(key)
|| ths.processDefnton == null) {
return key;
}
key = Strng.format("%d_%d_%d",
ths.processDefnton.getCode(),
ths.processDefnton.getVerson(),
ths.processInstance.getId());
return key;
}
publc boolean addStateEvent(StateEvent stateEvent) {
f (processInstance.getId() != stateEvent.getProcessInstanceId()) {
logger.nfo("state event would be abounded :{}", stateEvent.toStrng());
return false;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | ths.stateEvents.add(stateEvent);
return true;
}
publc nt eventSze() {
return ths.stateEvents.sze();
}
publc ProcessInstance getProcessInstance() {
return ths.processInstance;
}
prvate boolean stateEventHandler(StateEvent stateEvent) {
logger.nfo("process event: {}", stateEvent.toStrng());
f (!checkProcessInstance(stateEvent)) {
return false;
}
boolean result = false;
swtch (stateEvent.getType()) {
case PROCESS_STATE_CHANGE:
result = processStateChangeHandler(stateEvent);
break;
case TASK_STATE_CHANGE:
result = taskStateChangeHandler(stateEvent);
break;
case PROCESS_TIMEOUT:
result = processTmeout();
break;
case TASK_TIMEOUT:
result = taskTmeout(stateEvent);
break;
case WAIT_TASK_GROUP:
result = checkForceStartAndWakeUp(stateEvent); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | break;
default:
break;
}
f (result) {
ths.stateEvents.remove(stateEvent);
}
return result;
}
prvate boolean checkForceStartAndWakeUp(StateEvent stateEvent) {
TaskGroupQueue taskGroupQueue = ths.processServce.loadTaskGroupQueue(stateEvent.getTaskInstanceId());
f (taskGroupQueue.getForceStart() == Flag.YES.getCode()) {
ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(stateEvent.getTaskInstanceId());
TaskInstance taskInstance = ths.processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId());
ProcessInstance processInstance = ths.processServce.fndProcessInstanceById(taskInstance.getProcessInstanceId());
taskProcessor.nt(taskInstance, processInstance);
taskProcessor.acton(TaskActon.DISPATCH);
ths.processServce.updateTaskGroupQueueStatus(taskGroupQueue.getId(), TaskGroupQueueStatus.ACQUIRE_SUCCESS.getCode());
return true;
}
f (taskGroupQueue.getInQueue() == Flag.YES.getCode()) {
boolean acqureTaskGroup = processServce.acqureTaskGroupAgan(taskGroupQueue);
f (acqureTaskGroup) {
ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(stateEvent.getTaskInstanceId());
TaskInstance taskInstance = ths.processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId());
ProcessInstance processInstance = ths.processServce.fndProcessInstanceById(taskInstance.getProcessInstanceId());
taskProcessor.nt(taskInstance, processInstance);
taskProcessor.acton(TaskActon.DISPATCH);
return true;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | }
return false;
}
prvate boolean taskTmeout(StateEvent stateEvent) {
f (!checkTaskInstanceByStateEvent(stateEvent)) {
return true;
}
TaskInstance taskInstance = taskInstanceMap.get(stateEvent.getTaskInstanceId());
f (TmeoutFlag.CLOSE == taskInstance.getTaskDefne().getTmeoutFlag()) {
return true;
}
TaskTmeoutStrategy taskTmeoutStrategy = taskInstance.getTaskDefne().getTmeoutNotfyStrategy();
f (TaskTmeoutStrategy.FAILED == taskTmeoutStrategy) {
ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(stateEvent.getTaskInstanceId());
taskProcessor.acton(TaskActon.TIMEOUT);
} else {
processAlertManager.sendTaskTmeoutAlert(processInstance, taskInstance, taskInstance.getTaskDefne());
}
return true;
}
prvate boolean processTmeout() {
ths.processAlertManager.sendProcessTmeoutAlert(ths.processInstance, ths.processDefnton);
return true;
}
prvate boolean taskStateChangeHandler(StateEvent stateEvent) {
f (!checkTaskInstanceByStateEvent(stateEvent)) {
return true;
}
TaskInstance task = getTaskInstance(stateEvent.getTaskInstanceId());
f (task.getState() == null) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | logger.error("task state s null, state handler error: {}", stateEvent);
return true;
}
f (task.getState().typeIsFnshed() && !completeTaskMap.contansKey(Long.toStrng(task.getTaskCode()))) {
taskFnshed(task);
f (task.getTaskGroupId() > 0) {
TaskInstance nextTaskInstance = ths.processServce.releaseTaskGroup(task);
f (nextTaskInstance != null) {
f (nextTaskInstance.getProcessInstanceId() == task.getProcessInstanceId()) {
StateEvent nextEvent = new StateEvent();
nextEvent.setProcessInstanceId(ths.processInstance.getId());
nextEvent.setTaskInstanceId(nextTaskInstance.getId());
nextEvent.setType(StateEventType.WAIT_TASK_GROUP);
ths.stateEvents.add(nextEvent);
} else {
ProcessInstance processInstance = ths.processServce.fndProcessInstanceById(nextTaskInstance.getProcessInstanceId());
ths.processServce.sendStartTask2Master(processInstance, nextTaskInstance.getId(),
org.apache.dolphnscheduler.remote.command.CommandType.TASK_WAKEUP_EVENT_REQUEST);
}
}
}
} else f (actveTaskProcessorMaps.contansKey(stateEvent.getTaskInstanceId())) {
ITaskProcessor TaskProcessor = actveTaskProcessorMaps.get(stateEvent.getTaskInstanceId());
TaskProcessor.acton(TaskActon.RUN);
f (TaskProcessor.taskState().typeIsFnshed()) {
task = processServce.fndTaskInstanceById(stateEvent.getTaskInstanceId());
taskFnshed(task);
}
} else { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | logger.error("state handler error: {}", stateEvent);
}
return true;
}
prvate vod taskFnshed(TaskInstance task) {
logger.nfo("work flow {} task {} state:{} ",
processInstance.getId(),
task.getId(),
task.getState());
f (task.taskCanRetry()) {
addTaskToStandByLst(task);
f (!task.retryTaskIntervalOverTme()) {
logger.nfo("falure task wll be submtted: process d: {}, task nstance d: {} state:{} retry tmes:{} / {}, nterval:{}",
processInstance.getId(),
task.getId(),
task.getState(),
task.getRetryTmes(),
task.getMaxRetryTmes(),
task.getRetryInterval());
stateWheelExecuteThread.addTask4TmeoutCheck(task);
stateWheelExecuteThread.addTask4RetryCheck(task);
} else {
submtStandByTask();
stateWheelExecuteThread.removeTask4TmeoutCheck(task);
stateWheelExecuteThread.removeTask4RetryCheck(task);
}
return;
}
completeTaskMap.put(Long.toStrng(task.getTaskCode()), task.getId());
actveTaskProcessorMaps.remove(task.getId()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | stateWheelExecuteThread.removeTask4TmeoutCheck(task);
stateWheelExecuteThread.removeTask4RetryCheck(task);
f (task.getState().typeIsSuccess()) {
processInstance.setVarPool(task.getVarPool());
processServce.saveProcessInstance(processInstance);
submtPostNode(Long.toStrng(task.getTaskCode()));
} else f (task.getState().typeIsFalure()) {
f (task.sCondtonsTask()
|| DagHelper.haveCondtonsAfterNode(Long.toStrng(task.getTaskCode()), dag)) {
submtPostNode(Long.toStrng(task.getTaskCode()));
} else {
errorTaskMap.put(Long.toStrng(task.getTaskCode()), task.getId());
f (processInstance.getFalureStrategy() == FalureStrategy.END) {
kllAllTasks();
}
}
}
ths.updateProcessInstanceState();
}
/**
* update process nstance
*/
publc vod refreshProcessInstance(nt processInstanceId) {
logger.nfo("process nstance update: {}", processInstanceId);
processInstance = processServce.fndProcessInstanceById(processInstanceId);
processDefnton = processServce.fndProcessDefnton(processInstance.getProcessDefntonCode(),
processInstance.getProcessDefntonVerson());
processInstance.setProcessDefnton(processDefnton);
}
/** |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | * update task nstance
*/
publc vod refreshTaskInstance(nt taskInstanceId) {
logger.nfo("task nstance update: {} ", taskInstanceId);
TaskInstance taskInstance = processServce.fndTaskInstanceById(taskInstanceId);
f (taskInstance == null) {
logger.error("can not fnd task nstance, d:{}", taskInstanceId);
return;
}
processServce.packageTaskInstance(taskInstance, processInstance);
taskInstanceMap.put(taskInstance.getId(), taskInstance);
valdTaskMap.remove(Long.toStrng(taskInstance.getTaskCode()));
f (Flag.YES == taskInstance.getFlag()) {
valdTaskMap.put(Long.toStrng(taskInstance.getTaskCode()), taskInstance.getId());
}
}
/**
* check process nstance by state event
*/
publc boolean checkProcessInstance(StateEvent stateEvent) {
f (ths.processInstance.getId() != stateEvent.getProcessInstanceId()) {
logger.error("msmatch process nstance d: {}, state event:{}",
ths.processInstance.getId(),
stateEvent);
return false;
}
return true;
}
/**
* check f task nstance exst by state event |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | */
publc boolean checkTaskInstanceByStateEvent(StateEvent stateEvent) {
f (stateEvent.getTaskInstanceId() == 0) {
logger.error("task nstance d null, state event:{}", stateEvent);
return false;
}
f (!taskInstanceMap.contansKey(stateEvent.getTaskInstanceId())) {
logger.error("msmatch task nstance d, event:{}", stateEvent);
return false;
}
return true;
}
/**
* check f task nstance exst by task code
*/
publc boolean checkTaskInstanceByCode(long taskCode) {
f (taskInstanceMap == null || taskInstanceMap.sze() == 0) {
return false;
}
for (TaskInstance taskInstance : taskInstanceMap.values()) {
f (taskInstance.getTaskCode() == taskCode) {
return true;
}
}
return false;
}
/**
* check f task nstance exst by d
*/
publc boolean checkTaskInstanceById(nt taskInstanceId) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | f (taskInstanceMap == null || taskInstanceMap.sze() == 0) {
return false;
}
return taskInstanceMap.contansKey(taskInstanceId);
}
/**
* get task nstance from memory
*/
publc TaskInstance getTaskInstance(nt taskInstanceId) {
f (taskInstanceMap.contansKey(taskInstanceId)) {
return taskInstanceMap.get(taskInstanceId);
}
return null;
}
prvate boolean processStateChangeHandler(StateEvent stateEvent) {
try {
logger.nfo("process:{} state {} change to {}", processInstance.getId(), processInstance.getState(), stateEvent.getExecutonStatus());
f (processComplementData()) {
return true;
}
f (stateEvent.getExecutonStatus().typeIsFnshed()) {
endProcess();
}
f (processInstance.getState() == ExecutonStatus.READY_STOP) {
kllAllTasks();
}
return true;
} catch (Excepton e) {
logger.error("process state change error:", e);
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | return true;
}
prvate boolean processComplementData() throws Excepton {
f (!needComplementProcess()) {
return false;
}
f (processInstance.getState() == ExecutonStatus.READY_STOP) {
return false;
}
Date scheduleDate = processInstance.getScheduleTme();
f (scheduleDate == null) {
scheduleDate = complementLstDate.get(0);
} else f (processInstance.getState().typeIsFnshed()) {
endProcess();
f (complementLstDate.sze() <= 0) {
logger.nfo("process complement end. process d:{}", processInstance.getId());
return true;
}
nt ndex = complementLstDate.ndexOf(scheduleDate);
f (ndex >= complementLstDate.sze() - 1 || !processInstance.getState().typeIsSuccess()) {
logger.nfo("process complement end. process d:{}", processInstance.getId());
return true;
}
logger.nfo("process complement contnue. process d:{}, schedule tme:{} complementLstDate:{}",
processInstance.getId(),
processInstance.getScheduleTme(),
complementLstDate.toStrng());
scheduleDate = complementLstDate.get(ndex + 1); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | processInstance.setId(0);
}
processInstance.setScheduleTme(scheduleDate);
Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam());
f (cmdParam.contansKey(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING)) {
cmdParam.remove(Constants.CMD_PARAM_RECOVERY_START_NODE_STRING);
processInstance.setCommandParam(JSONUtls.toJsonStrng(cmdParam));
}
processInstance.setState(ExecutonStatus.RUNNING_EXECUTION);
processInstance.setGlobalParams(ParameterUtls.curngGlobalParams(
processDefnton.getGlobalParamMap(),
processDefnton.getGlobalParamLst(),
CommandType.COMPLEMENT_DATA, processInstance.getScheduleTme()));
processInstance.setStartTme(new Date());
processInstance.setRestartTme(processInstance.getStartTme());
processInstance.setEndTme(null);
processServce.saveProcessInstance(processInstance);
ths.taskInstanceMap.clear();
startProcess();
return true;
}
prvate boolean needComplementProcess() {
f (processInstance.sComplementData()
&& Flag.NO == processInstance.getIsSubProcess()) {
return true;
}
return false;
}
/**
* process start handle |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | */
publc vod startProcess() {
f (ths.taskInstanceMap.sze() > 0) {
return;
}
try {
sStart = false;
buldFlowDag();
ntTaskQueue();
submtPostNode(null);
sStart = true;
} catch (Excepton e) {
logger.error("start process error, process nstance d:{}", processInstance.getId(), e);
}
}
/**
* process end handle
*/
prvate vod endProcess() {
ths.stateEvents.clear();
f (processDefnton.getExecutonType().typeIsSeralWat()) {
checkSeralProcess(processDefnton);
}
f (processInstance.getState().typeIsWatngThread()) {
processServce.createRecoveryWatngThreadCommand(null, processInstance);
}
f (processAlertManager.sNeedToSendWarnng(processInstance)) {
ProjectUser projectUser = processServce.queryProjectWthUserByProcessInstanceId(processInstance.getId());
processAlertManager.sendAlertProcessInstance(processInstance, getValdTaskLst(), projectUser);
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | f (checkTaskQueue()) {
processServce.releaseAllTaskGroup(processInstance.getId());
}
}
publc vod checkSeralProcess(ProcessDefnton processDefnton) {
nt nextInstanceId = processInstance.getNextProcessInstanceId();
f (nextInstanceId == 0) {
ProcessInstance nextProcessInstance = ths.processServce.loadNextProcess4Seral(processInstance.getProcessDefnton().getCode(), ExecutonStatus.SERIAL_WAIT.getCode());
f (nextProcessInstance == null) {
return;
}
nextInstanceId = nextProcessInstance.getId();
}
ProcessInstance nextProcessInstance = ths.processServce.fndProcessInstanceById(nextInstanceId);
f (nextProcessInstance.getState().typeIsFnshed() || nextProcessInstance.getState().typeIsRunnng()) {
return;
}
Map<Strng, Object> cmdParam = new HashMap<>();
cmdParam.put(CMD_PARAM_RECOVER_PROCESS_ID_STRING, nextInstanceId);
Command command = new Command();
command.setCommandType(CommandType.RECOVER_SERIAL_WAIT);
command.setProcessDefntonCode(processDefnton.getCode());
command.setCommandParam(JSONUtls.toJsonStrng(cmdParam));
processServce.createCommand(command);
}
/**
* generate process dag
*
* @throws Excepton excepton |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | */
prvate vod buldFlowDag() throws Excepton {
f (ths.dag != null) {
return;
}
processDefnton = processServce.fndProcessDefnton(processInstance.getProcessDefntonCode(),
processInstance.getProcessDefntonVerson());
processInstance.setProcessDefnton(processDefnton);
Lst<TaskInstance> recoverNodeLst = getStartTaskInstanceLst(processInstance.getCommandParam());
Lst<ProcessTaskRelaton> processTaskRelatons = processServce.fndRelatonByCode(processDefnton.getCode(), processDefnton.getVerson());
Lst<TaskDefntonLog> taskDefntonLogs = processServce.getTaskDefneLogLstByRelaton(processTaskRelatons);
Lst<TaskNode> taskNodeLst = processServce.transformTask(processTaskRelatons, taskDefntonLogs);
forbddenTaskMap.clear();
taskNodeLst.forEach(taskNode -> {
f (taskNode.sForbdden()) {
forbddenTaskMap.put(Long.toStrng(taskNode.getCode()), taskNode);
}
});
Lst<Strng> recoveryNodeCodeLst = getRecoveryNodeCodeLst(recoverNodeLst);
Lst<Strng> startNodeNameLst = parseStartNodeName(processInstance.getCommandParam());
ProcessDag processDag = generateFlowDag(taskNodeLst,
startNodeNameLst, recoveryNodeCodeLst, processInstance.getTaskDependType());
f (processDag == null) {
logger.error("processDag s null");
return;
}
dag = DagHelper.buldDagGraph(processDag);
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | /**
* nt task queue
*/
prvate vod ntTaskQueue() {
taskFaledSubmt = false;
actveTaskProcessorMaps.clear();
dependFaledTaskMap.clear();
completeTaskMap.clear();
errorTaskMap.clear();
f (!sNewProcessInstance()) {
Lst<TaskInstance> valdTaskInstanceLst = processServce.fndValdTaskLstByProcessId(processInstance.getId());
for (TaskInstance task : valdTaskInstanceLst) {
valdTaskMap.put(Long.toStrng(task.getTaskCode()), task.getId());
taskInstanceMap.put(task.getId(), task);
f (task.sTaskComplete()) {
completeTaskMap.put(Long.toStrng(task.getTaskCode()), task.getId());
}
f (task.sCondtonsTask() || DagHelper.haveCondtonsAfterNode(Long.toStrng(task.getTaskCode()), dag)) {
contnue;
}
f (task.getState().typeIsFalure() && !task.taskCanRetry()) {
errorTaskMap.put(Long.toStrng(task.getTaskCode()), task.getId());
}
}
}
f (processInstance.sComplementData() && complementLstDate.sze() == 0) {
Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam());
f (cmdParam != null && cmdParam.contansKey(CMDPARAM_COMPLEMENT_DATA_START_DATE)) {
Date start = DateUtls.strngToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_START_DATE));
Date end = DateUtls.strngToDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE)); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | Lst<Schedule> schedules = processServce.queryReleaseSchedulerLstByProcessDefntonCode(processInstance.getProcessDefntonCode());
f (complementLstDate.sze() == 0 && needComplementProcess()) {
complementLstDate = CronUtls.getSelfFreDateLst(start, end, schedules);
logger.nfo(" process defnton code:{} complement data: {}",
processInstance.getProcessDefntonCode(), complementLstDate.toStrng());
f (complementLstDate.sze() > 0 && Flag.NO == processInstance.getIsSubProcess()) {
processInstance.setScheduleTme(complementLstDate.get(0));
processInstance.setGlobalParams(ParameterUtls.curngGlobalParams(
processDefnton.getGlobalParamMap(),
processDefnton.getGlobalParamLst(),
CommandType.COMPLEMENT_DATA, processInstance.getScheduleTme()));
processServce.updateProcessInstance(processInstance);
}
}
}
}
}
/**
* submt task to execute
*
* @param taskInstance task nstance
* @return TaskInstance
*/
prvate TaskInstance submtTaskExec(TaskInstance taskInstance) {
try {
processServce.packageTaskInstance(taskInstance, processInstance);
ITaskProcessor taskProcessor = TaskProcessorFactory.getTaskProcessor(taskInstance.getTaskType());
taskProcessor.nt(taskInstance, processInstance);
f (taskInstance.getState() == ExecutonStatus.RUNNING_EXECUTION |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | && taskProcessor.getType().equalsIgnoreCase(Constants.COMMON_TASK_TYPE)) {
notfyProcessHostUpdate(taskInstance);
}
boolean submt = taskProcessor.acton(TaskActon.SUBMIT);
f (!submt) {
logger.error("process d:{} name:{} submt standby task d:{} name:{} faled!",
processInstance.getId(), processInstance.getName(),
taskInstance.getId(), taskInstance.getName());
return null;
}
valdTaskMap.put(Long.toStrng(taskInstance.getTaskCode()), taskInstance.getId());
taskInstanceMap.put(taskInstance.getId(), taskInstance);
actveTaskProcessorMaps.put(taskInstance.getId(), taskProcessor);
taskProcessor.acton(TaskActon.RUN);
stateWheelExecuteThread.addTask4TmeoutCheck(taskInstance);
stateWheelExecuteThread.addTask4RetryCheck(taskInstance);
f (taskProcessor.taskState().typeIsFnshed()) {
StateEvent stateEvent = new StateEvent();
stateEvent.setProcessInstanceId(ths.processInstance.getId());
stateEvent.setTaskInstanceId(taskInstance.getId());
stateEvent.setExecutonStatus(taskProcessor.taskState());
stateEvent.setType(StateEventType.TASK_STATE_CHANGE);
ths.stateEvents.add(stateEvent);
}
return taskInstance;
} catch (Excepton e) {
logger.error("submt standby task error", e);
return null;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | prvate vod notfyProcessHostUpdate(TaskInstance taskInstance) {
f (StrngUtls.sEmpty(taskInstance.getHost())) {
return;
}
try {
HostUpdateCommand hostUpdateCommand = new HostUpdateCommand();
hostUpdateCommand.setProcessHost(NetUtls.getAddr(masterConfg.getLstenPort()));
hostUpdateCommand.setTaskInstanceId(taskInstance.getId());
Host host = new Host(taskInstance.getHost());
nettyExecutorManager.doExecute(host, hostUpdateCommand.convert2Command());
} catch (Excepton e) {
logger.error("notfy process host update", e);
}
}
/**
* fnd task nstance n db.
* n case submt more than one same name task n the same tme.
*
* @param taskCode task code
* @param taskVerson task verson
* @return TaskInstance
*/
prvate TaskInstance fndTaskIfExsts(Long taskCode, nt taskVerson) {
Lst<TaskInstance> valdTaskInstanceLst = getValdTaskLst();
for (TaskInstance taskInstance : valdTaskInstanceLst) {
f (taskInstance.getTaskCode() == taskCode && taskInstance.getTaskDefntonVerson() == taskVerson) {
return taskInstance;
}
}
return null; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | }
/**
* encapsulaton task
*
* @param processInstance process nstance
* @param taskNode taskNode
* @return TaskInstance
*/
prvate TaskInstance createTaskInstance(ProcessInstance processInstance, TaskNode taskNode) {
TaskInstance taskInstance = fndTaskIfExsts(taskNode.getCode(), taskNode.getVerson());
f (taskInstance == null) {
taskInstance = new TaskInstance();
taskInstance.setTaskCode(taskNode.getCode());
taskInstance.setTaskDefntonVerson(taskNode.getVerson());
taskInstance.setName(taskNode.getName());
taskInstance.setState(ExecutonStatus.SUBMITTED_SUCCESS);
taskInstance.setProcessInstanceId(processInstance.getId());
taskInstance.setTaskType(taskNode.getType().toUpperCase());
taskInstance.setAlertFlag(Flag.NO);
taskInstance.setStartTme(null);
taskInstance.setFlag(Flag.YES);
taskInstance.setDryRun(processInstance.getDryRun()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | taskInstance.setRetryTmes(0);
taskInstance.setMaxRetryTmes(taskNode.getMaxRetryTmes());
taskInstance.setRetryInterval(taskNode.getRetryInterval());
taskInstance.setTaskParams(taskNode.getTaskParams());
taskInstance.setTaskGroupId(taskNode.getTaskGroupId());
taskInstance.setTaskGroupProrty(taskNode.getTaskGroupProrty());
f (taskNode.getTaskInstanceProrty() == null) {
taskInstance.setTaskInstanceProrty(Prorty.MEDIUM);
} else {
taskInstance.setTaskInstanceProrty(taskNode.getTaskInstanceProrty());
}
Strng processWorkerGroup = processInstance.getWorkerGroup();
processWorkerGroup = StrngUtls.sBlank(processWorkerGroup) ? DEFAULT_WORKER_GROUP : processWorkerGroup;
Strng taskWorkerGroup = StrngUtls.sBlank(taskNode.getWorkerGroup()) ? processWorkerGroup : taskNode.getWorkerGroup();
Long processEnvronmentCode = Objects.sNull(processInstance.getEnvronmentCode()) ? -1 : processInstance.getEnvronmentCode();
Long taskEnvronmentCode = Objects.sNull(taskNode.getEnvronmentCode()) ? processEnvronmentCode : taskNode.getEnvronmentCode();
f (!processWorkerGroup.equals(DEFAULT_WORKER_GROUP) && taskWorkerGroup.equals(DEFAULT_WORKER_GROUP)) {
taskInstance.setWorkerGroup(processWorkerGroup);
taskInstance.setEnvronmentCode(processEnvronmentCode);
} else {
taskInstance.setWorkerGroup(taskWorkerGroup);
taskInstance.setEnvronmentCode(taskEnvronmentCode);
}
f (!taskInstance.getEnvronmentCode().equals(-1L)) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | Envronment envronment = processServce.fndEnvronmentByCode(taskInstance.getEnvronmentCode());
f (Objects.nonNull(envronment) && StrngUtls.sNotEmpty(envronment.getConfg())) {
taskInstance.setEnvronmentConfg(envronment.getConfg());
}
}
taskInstance.setDelayTme(taskNode.getDelayTme());
}
return taskInstance;
}
publc vod getPreVarPool(TaskInstance taskInstance, Set<Strng> preTask) {
Map<Strng, Property> allProperty = new HashMap<>();
Map<Strng, TaskInstance> allTaskInstance = new HashMap<>();
f (CollectonUtls.sNotEmpty(preTask)) {
for (Strng preTaskCode : preTask) {
Integer taskId = completeTaskMap.get(preTaskCode);
f (taskId == null) {
contnue;
}
TaskInstance preTaskInstance = taskInstanceMap.get(taskId);
f (preTaskInstance == null) {
contnue;
}
Strng preVarPool = preTaskInstance.getVarPool();
f (StrngUtls.sNotEmpty(preVarPool)) {
Lst<Property> propertes = JSONUtls.toLst(preVarPool, Property.class);
for (Property nfo : propertes) {
setVarPoolValue(allProperty, allTaskInstance, preTaskInstance, nfo);
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | }
f (allProperty.sze() > 0) {
taskInstance.setVarPool(JSONUtls.toJsonStrng(allProperty.values()));
}
}
}
prvate vod setVarPoolValue(Map<Strng, Property> allProperty, Map<Strng, TaskInstance> allTaskInstance, TaskInstance preTaskInstance, Property thsProperty) {
thsProperty.setDrect(Drect.IN);
Strng proName = thsProperty.getProp();
f (allProperty.contansKey(proName)) {
Property otherPro = allProperty.get(proName);
f (StrngUtls.sEmpty(thsProperty.getValue())) {
allProperty.put(proName, otherPro);
} else f (StrngUtls.sNotEmpty(otherPro.getValue())) {
TaskInstance otherTask = allTaskInstance.get(proName);
f (otherTask.getEndTme().getTme() > preTaskInstance.getEndTme().getTme()) {
allProperty.put(proName, thsProperty);
allTaskInstance.put(proName, preTaskInstance);
} else {
allProperty.put(proName, otherPro);
}
} else {
allProperty.put(proName, thsProperty);
allTaskInstance.put(proName, preTaskInstance); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | }
} else {
allProperty.put(proName, thsProperty);
allTaskInstance.put(proName, preTaskInstance);
}
}
/**
* get complete task nstance map, taskCode as key
*/
prvate Map<Strng, TaskInstance> getCompleteTaskInstanceMap() {
Map<Strng, TaskInstance> completeTaskInstanceMap = new HashMap<>();
for (Integer taskInstanceId : completeTaskMap.values()) {
TaskInstance taskInstance = taskInstanceMap.get(taskInstanceId);
completeTaskInstanceMap.put(Long.toStrng(taskInstance.getTaskCode()), taskInstance);
}
return completeTaskInstanceMap;
}
/**
* get vald task lst
*/
prvate Lst<TaskInstance> getValdTaskLst() {
Lst<TaskInstance> valdTaskInstanceLst = new ArrayLst<>();
for (Integer taskInstanceId : valdTaskMap.values()) {
valdTaskInstanceLst.add(taskInstanceMap.get(taskInstanceId));
}
return valdTaskInstanceLst;
}
prvate vod submtPostNode(Strng parentNodeCode) {
Set<Strng> submtTaskNodeLst = DagHelper.parsePostNodes(parentNodeCode, skpTaskNodeMap, dag, getCompleteTaskInstanceMap());
Lst<TaskInstance> taskInstances = new ArrayLst<>(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | for (Strng taskNode : submtTaskNodeLst) {
TaskNode taskNodeObject = dag.getNode(taskNode);
f (checkTaskInstanceByCode(taskNodeObject.getCode())) {
contnue;
}
TaskInstance task = createTaskInstance(processInstance, taskNodeObject);
taskInstances.add(task);
}
for (TaskInstance task : taskInstances) {
f (readyToSubmtTaskQueue.contans(task)) {
contnue;
}
f (completeTaskMap.contansKey(Long.toStrng(task.getTaskCode()))) {
logger.nfo("task {} has already run success", task.getName());
contnue;
}
f (task.getState().typeIsPause() || task.getState().typeIsCancel()) {
logger.nfo("task {} stopped, the state s {}", task.getName(), task.getState());
contnue;
}
addTaskToStandByLst(task);
}
submtStandByTask();
updateProcessInstanceState();
}
/**
* determne whether the dependences of the task node are complete
*
* @return DependResult |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | */
prvate DependResult sTaskDepsComplete(Strng taskCode) {
Collecton<Strng> startNodes = dag.getBegnNode();
f (startNodes.contans(taskCode)) {
return DependResult.SUCCESS;
}
TaskNode taskNode = dag.getNode(taskCode);
Lst<Strng> ndrectDepCodeLst = new ArrayLst<>();
setIndrectDepLst(taskCode, ndrectDepCodeLst);
for (Strng depsNode : ndrectDepCodeLst) {
f (dag.contansNode(depsNode) && !skpTaskNodeMap.contansKey(depsNode)) {
f (!completeTaskMap.contansKey(depsNode)) {
return DependResult.WAITING;
}
Integer depsTaskId = completeTaskMap.get(depsNode);
ExecutonStatus depTaskState = taskInstanceMap.get(depsTaskId).getState();
f (depTaskState.typeIsPause() || depTaskState.typeIsCancel()) {
return DependResult.NON_EXEC;
}
f (taskNode.sCondtonsTask()) {
contnue;
}
f (!dependTaskSuccess(depsNode, taskCode)) {
return DependResult.FAILED;
}
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | logger.nfo("taskCode: {} completeDependTaskLst: {}", taskCode, Arrays.toStrng(completeTaskMap.keySet().toArray()));
return DependResult.SUCCESS;
}
/**
* Ths functon s specally used to handle the dependency stuaton where the parent node s a prohbted node.
* When the parent node s a forbdden node, the dependency relatonshp should contnue to be traced
*
* @param taskCode taskCode
* @param ndrectDepCodeLst All ndrectly dependent nodes
*/
prvate vod setIndrectDepLst(Strng taskCode, Lst<Strng> ndrectDepCodeLst) {
TaskNode taskNode = dag.getNode(taskCode);
Lst<Strng> depCodeLst = taskNode.getDepLst();
for (Strng depsNode : depCodeLst) {
f (forbddenTaskMap.contansKey(depsNode)) {
setIndrectDepLst(depsNode, ndrectDepCodeLst);
} else {
ndrectDepCodeLst.add(depsNode);
}
}
}
/**
* depend node s completed, but here need check the condton task branch s the next node
*/
prvate boolean dependTaskSuccess(Strng dependNodeName, Strng nextNodeName) {
f (dag.getNode(dependNodeName).sCondtonsTask()) {
Lst<Strng> nextTaskLst = DagHelper.parseCondtonTask(dependNodeName, skpTaskNodeMap, dag, getCompleteTaskInstanceMap());
f (!nextTaskLst.contans(nextNodeName)) {
return false; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | }
} else {
Integer taskInstanceId = completeTaskMap.get(dependNodeName);
ExecutonStatus depTaskState = taskInstanceMap.get(taskInstanceId).getState();
f (depTaskState.typeIsFalure()) {
return false;
}
}
return true;
}
/**
* query task nstance by complete state
*
* @param state state
* @return task nstance lst
*/
prvate Lst<TaskInstance> getCompleteTaskByState(ExecutonStatus state) {
Lst<TaskInstance> resultLst = new ArrayLst<>();
for (Integer taskInstanceId : completeTaskMap.values()) {
TaskInstance taskInstance = taskInstanceMap.get(taskInstanceId);
f (taskInstance != null && taskInstance.getState() == state) {
resultLst.add(taskInstance);
}
}
return resultLst;
}
/**
* where there are ongong tasks
*
* @param state state |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | * @return ExecutonStatus
*/
prvate ExecutonStatus runnngState(ExecutonStatus state) {
f (state == ExecutonStatus.READY_STOP
|| state == ExecutonStatus.READY_PAUSE
|| state == ExecutonStatus.WAITING_THREAD
|| state == ExecutonStatus.DELAY_EXECUTION) {
return state;
} else {
return ExecutonStatus.RUNNING_EXECUTION;
}
}
/**
* exsts falure task,contans submt falure、dependency falure,execute falure(retry after)
*
* @return Boolean whether has faled task
*/
prvate boolean hasFaledTask() {
f (ths.taskFaledSubmt) {
return true;
}
f (ths.errorTaskMap.sze() > 0) {
return true;
}
return ths.dependFaledTaskMap.sze() > 0;
}
/**
* process nstance falure
* |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | * @return Boolean whether process nstance faled
*/
prvate boolean processFaled() {
f (hasFaledTask()) {
f (processInstance.getFalureStrategy() == FalureStrategy.END) {
return true;
}
f (processInstance.getFalureStrategy() == FalureStrategy.CONTINUE) {
return readyToSubmtTaskQueue.sze() == 0 && actveTaskProcessorMaps.sze() == 0;
}
}
return false;
}
/**
* whether task for watng thread
*
* @return Boolean whether has watng thread task
*/
prvate boolean hasWatngThreadTask() {
Lst<TaskInstance> watngLst = getCompleteTaskByState(ExecutonStatus.WAITING_THREAD);
return CollectonUtls.sNotEmpty(watngLst);
}
/**
* prepare for pause
* 1,faled retry task n the preparaton queue , returns to falure drectly
* 2,exsts pause task,complement not completed, pendng submsson of tasks, return to suspenson
* 3,success
*
* @return ExecutonStatus
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | prvate ExecutonStatus processReadyPause() {
f (hasRetryTaskInStandBy()) {
return ExecutonStatus.FAILURE;
}
Lst<TaskInstance> pauseLst = getCompleteTaskByState(ExecutonStatus.PAUSE);
f (CollectonUtls.sNotEmpty(pauseLst)
|| !sComplementEnd()
|| readyToSubmtTaskQueue.sze() > 0) {
return ExecutonStatus.PAUSE;
} else {
return ExecutonStatus.SUCCESS;
}
}
/**
* generate the latest process nstance status by the tasks state
*
* @return process nstance executon status
*/
prvate ExecutonStatus getProcessInstanceState(ProcessInstance nstance) {
ExecutonStatus state = nstance.getState();
f (actveTaskProcessorMaps.sze() > 0 || hasRetryTaskInStandBy()) {
// actve
return runnngState(state);
}
// process falure
f (processFaled()) {
return ExecutonStatus.FAILURE;
}
// watng thread
f (hasWatngThreadTask()) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | return ExecutonStatus.WAITING_THREAD;
}
// pause
f (state == ExecutonStatus.READY_PAUSE) {
return processReadyPause();
}
// stop
f (state == ExecutonStatus.READY_STOP) {
Lst<TaskInstance> stopLst = getCompleteTaskByState(ExecutonStatus.STOP);
Lst<TaskInstance> kllLst = getCompleteTaskByState(ExecutonStatus.KILL);
f (CollectonUtls.sNotEmpty(stopLst)
|| CollectonUtls.sNotEmpty(kllLst)
|| !sComplementEnd()) {
return ExecutonStatus.STOP;
} else {
return ExecutonStatus.SUCCESS;
}
}
// success
f (state == ExecutonStatus.RUNNING_EXECUTION) {
Lst<TaskInstance> kllTasks = getCompleteTaskByState(ExecutonStatus.KILL);
f (readyToSubmtTaskQueue.sze() > 0) {
//tasks cu
return ExecutonStatus.RUNNING_EXECUTION;
} else f (CollectonUtls.sNotEmpty(kllTasks)) {
// tasks m
return ExecutonStatus.FAILURE;
} else {
// f the
return ExecutonStatus.SUCCESS; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | }
}
return state;
}
/**
* whether complement end
*
* @return Boolean whether s complement end
*/
prvate boolean sComplementEnd() {
f (!processInstance.sComplementData()) {
return true;
}
try {
Map<Strng, Strng> cmdParam = JSONUtls.toMap(processInstance.getCommandParam());
Date endTme = DateUtls.getScheduleDate(cmdParam.get(CMDPARAM_COMPLEMENT_DATA_END_DATE));
return processInstance.getScheduleTme().equals(endTme);
} catch (Excepton e) {
logger.error("complement end faled ", e);
return false;
}
}
/**
* updateProcessInstance process nstance state
* after each batch of tasks s executed, the status of the process nstance s updated
*/
prvate vod updateProcessInstanceState() {
ExecutonStatus state = getProcessInstanceState(processInstance);
f (processInstance.getState() != state) {
logger.nfo( |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | "work flow process nstance [d: {}, name:{}], state change from {} to {}, cmd type: {}",
processInstance.getId(), processInstance.getName(),
processInstance.getState(), state,
processInstance.getCommandType());
processInstance.setState(state);
f (state.typeIsFnshed()) {
processInstance.setEndTme(new Date());
}
processServce.updateProcessInstance(processInstance);
StateEvent stateEvent = new StateEvent();
stateEvent.setExecutonStatus(processInstance.getState());
stateEvent.setProcessInstanceId(ths.processInstance.getId());
stateEvent.setType(StateEventType.PROCESS_STATE_CHANGE);
ths.processStateChangeHandler(stateEvent);
}
}
/**
* get task dependency result
*
* @param taskInstance task nstance
* @return DependResult
*/
prvate DependResult getDependResultForTask(TaskInstance taskInstance) {
return sTaskDepsComplete(Long.toStrng(taskInstance.getTaskCode()));
}
/**
* add task to standby lst
*
* @param taskInstance task nstance
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | prvate vod addTaskToStandByLst(TaskInstance taskInstance) {
logger.nfo("add task to stand by lst: {}", taskInstance.getName());
try {
f (!readyToSubmtTaskQueue.contans(taskInstance)) {
readyToSubmtTaskQueue.put(taskInstance);
}
} catch (Excepton e) {
logger.error("add task nstance to readyToSubmtTaskQueue error, taskName: {}", taskInstance.getName(), e);
}
}
/**
* remove task from stand by lst
*
* @param taskInstance task nstance
*/
prvate vod removeTaskFromStandbyLst(TaskInstance taskInstance) {
logger.nfo("remove task from stand by lst, d: {} name:{}",
taskInstance.getId(),
taskInstance.getName());
try {
readyToSubmtTaskQueue.remove(taskInstance);
} catch (Excepton e) {
logger.error("remove task nstance from readyToSubmtTaskQueue error, task d:{}, Name: {}",
taskInstance.getId(),
taskInstance.getName(), e);
}
}
/**
* has retry task n standby
* |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | * @return Boolean whether has retry task n standby
*/
prvate boolean hasRetryTaskInStandBy() {
for (Iterator<TaskInstance> ter = readyToSubmtTaskQueue.terator(); ter.hasNext(); ) {
f (ter.next().getState().typeIsFalure()) {
return true;
}
}
return false;
}
/**
* close the on gong tasks
*/
prvate vod kllAllTasks() {
logger.nfo("kll called on process nstance d: {}, num: {}", processInstance.getId(),
actveTaskProcessorMaps.sze());
for (nt taskId : actveTaskProcessorMaps.keySet()) {
TaskInstance taskInstance = processServce.fndTaskInstanceById(taskId);
f (taskInstance == null || taskInstance.getState().typeIsFnshed()) {
contnue;
}
ITaskProcessor taskProcessor = actveTaskProcessorMaps.get(taskId);
taskProcessor.acton(TaskActon.STOP);
f (taskProcessor.taskState().typeIsFnshed()) {
StateEvent stateEvent = new StateEvent();
stateEvent.setType(StateEventType.TASK_STATE_CHANGE);
stateEvent.setProcessInstanceId(ths.processInstance.getId());
stateEvent.setTaskInstanceId(taskInstance.getId());
stateEvent.setExecutonStatus(taskProcessor.taskState());
ths.addStateEvent(stateEvent); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | }
}
}
publc boolean workFlowFnsh() {
return ths.processInstance.getState().typeIsFnshed();
}
/**
* handlng the lst of tasks to be submtted
*/
prvate vod submtStandByTask() {
try {
nt length = readyToSubmtTaskQueue.sze();
for (nt = 0; < length; ++) {
TaskInstance task = readyToSubmtTaskQueue.peek();
f (task == null) {
contnue;
}
// stop ta
f (task.taskCanRetry()) {
TaskInstance retryTask = processServce.fndTaskInstanceById(task.getId());
f (retryTask != null && retryTask.getState().equals(ExecutonStatus.FORCED_SUCCESS)) {
task.setState(retryTask.getState());
logger.nfo("task: {} has been forced success, put t nto complete task lst and stop retryng", task.getName());
removeTaskFromStandbyLst(task);
completeTaskMap.put(Long.toStrng(task.getTaskCode()), task.getId());
taskInstanceMap.put(task.getId(), task);
submtPostNode(Long.toStrng(task.getTaskCode()));
contnue;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | //nt var
f (task.sFrstRun()) {
//get pre
Set<Strng> preTask = dag.getPrevousNodes(Long.toStrng(task.getTaskCode()));
getPreVarPool(task, preTask);
}
DependResult dependResult = getDependResultForTask(task);
f (DependResult.SUCCESS == dependResult) {
f (task.retryTaskIntervalOverTme()) {
nt orgnalId = task.getId();
TaskInstance taskInstance = submtTaskExec(task);
f (taskInstance == null) {
ths.taskFaledSubmt = true;
} else {
removeTaskFromStandbyLst(task);
f (taskInstance.getId() != orgnalId) {
actveTaskProcessorMaps.remove(orgnalId);
}
}
}
} else f (DependResult.FAILED == dependResult) {
// f the
dependFaledTaskMap.put(Long.toStrng(task.getTaskCode()), task.getId());
removeTaskFromStandbyLst(task);
logger.nfo("task {},d:{} depend result : {}", task.getName(), task.getId(), dependResult);
} else f (DependResult.NON_EXEC == dependResult) {
// for som
removeTaskFromStandbyLst(task);
logger.nfo("remove task {},d:{} , because depend result : {}", task.getName(), task.getId(), dependResult);
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | }
} catch (Excepton e) {
logger.error("submt standby task error", e);
}
}
/**
* get recovery task nstance
*
* @param taskId task d
* @return recovery task nstance
*/
prvate TaskInstance getRecoveryTaskInstance(Strng taskId) {
f (!StrngUtls.sNotEmpty(taskId)) {
return null;
}
try {
Integer ntId = Integer.valueOf(taskId);
TaskInstance task = processServce.fndTaskInstanceById(ntId);
f (task == null) {
logger.error("start node d cannot be found: {}", taskId);
} else {
return task;
}
} catch (Excepton e) {
logger.error("get recovery task nstance faled ", e);
}
return null;
}
/**
* get start task nstance lst |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | *
* @param cmdParam command param
* @return task nstance lst
*/
prvate Lst<TaskInstance> getStartTaskInstanceLst(Strng cmdParam) {
Lst<TaskInstance> nstanceLst = new ArrayLst<>();
Map<Strng, Strng> paramMap = JSONUtls.toMap(cmdParam);
f (paramMap != null && paramMap.contansKey(CMD_PARAM_RECOVERY_START_NODE_STRING)) {
Strng[] dLst = paramMap.get(CMD_PARAM_RECOVERY_START_NODE_STRING).splt(Constants.COMMA);
for (Strng nodeId : dLst) {
TaskInstance task = getRecoveryTaskInstance(nodeId);
f (task != null) {
nstanceLst.add(task);
}
}
}
return nstanceLst;
}
/**
* parse "StartNodeNameLst" from cmd param
*
* @param cmdParam command param
* @return start node name lst
*/
prvate Lst<Strng> parseStartNodeName(Strng cmdParam) {
Lst<Strng> startNodeNameLst = new ArrayLst<>();
Map<Strng, Strng> paramMap = JSONUtls.toMap(cmdParam);
f (paramMap == null) {
return startNodeNameLst;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | f (paramMap.contansKey(CMD_PARAM_START_NODES)) {
startNodeNameLst = Arrays.asLst(paramMap.get(CMD_PARAM_START_NODES).splt(Constants.COMMA));
}
return startNodeNameLst;
}
/**
* generate start node code lst from parsng command param;
* f "StartNodeIdLst" exsts n command param, return StartNodeIdLst
*
* @return recovery node code lst
*/
prvate Lst<Strng> getRecoveryNodeCodeLst(Lst<TaskInstance> recoverNodeLst) {
Lst<Strng> recoveryNodeCodeLst = new ArrayLst<>();
f (CollectonUtls.sNotEmpty(recoverNodeLst)) {
for (TaskInstance task : recoverNodeLst) {
recoveryNodeCodeLst.add(Long.toStrng(task.getTaskCode()));
}
}
return recoveryNodeCodeLst;
}
/**
* generate flow dag
*
* @param totalTaskNodeLst total task node lst
* @param startNodeNameLst start node name lst
* @param recoveryNodeCodeLst recovery node code lst
* @param depNodeType depend node type
* @return ProcessDag process dag
* @throws Excepton excepton
*/ |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,788 | [Bug] [MasterServer] Submit duplicate tasks | ### 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
1.Many SQL tasks submitted at the same time
2.It will be retried when a task fails, and may be submitted multiple times when retrying
3.The task instance code is the same for multiple submissions
[INFO] 2022-01-04 00:50:34.791 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838135 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION
[INFO] 2022-01-04 00:50:35.315 org.apache.dolphinscheduler.service.process.ProcessService:[1076] - end submit task to db successfully:6838145 013.XXX:SUBMITTED_SUCCESS complete, instance id:609369 state: RUNNING_EXECUTION



### What you expected to happen
When the task is retried, submit it once.
### How to reproduce
The reason is unknown.
### Anything else
_No response_
### Version
2.0.1
### Are you willing to submit PR?
- [ ] 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/7788 | https://github.com/apache/dolphinscheduler/pull/7809 | 24a97fda75c362d4acf97867d7dfcb4cccbb26a3 | a8c592bd93f9705666546204a34a7e48acd8c31b | 2022-01-04T08:17:05Z | java | 2022-01-11T14:54:42Z | dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteThread.java | publc ProcessDag generateFlowDag(Lst<TaskNode> totalTaskNodeLst,
Lst<Strng> startNodeNameLst,
Lst<Strng> recoveryNodeCodeLst,
TaskDependType depNodeType) throws Excepton {
return DagHelper.generateFlowDag(totalTaskNodeLst, startNodeNameLst, recoveryNodeCodeLst, depNodeType);
}
/**
* check task queue
*/
prvate boolean checkTaskQueue() {
AtomcBoolean result = new AtomcBoolean(false);
taskInstanceMap.forEach((d, taskInstance) -> {
f (taskInstance != null && taskInstance.getTaskGroupId() > 0) {
result.set(true);
}
});
return result.get();
}
/**
* s new process nstance
*/
prvate boolean sNewProcessInstance() {
f (ExecutonStatus.RUNNING_EXECUTION == processInstance.getState() && processInstance.getRunTmes() == 1) {
return true;
} else {
return false;
}
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,935 | [Bug] [API] There're a few issues about running test cases in the class of AlertGroupControllerTest | ### 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
When I run the test cases of AlertGroupControllerTest , it failed at the test case of test010CreateAlertgroup and test060VerifyGroupName. It's because that these test cases didn't run orderly. So as running the test case of test010CreateAlertgroup , maybe the other test cases have been executed before.
More details are as follows:



### What you expected to happen
I expect that these test cases can be executed successfully.
### How to reproduce
You can run the whole test cases of AlertGroupControllerTest.
### 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/7935 | https://github.com/apache/dolphinscheduler/pull/7954 | 3edc58cbddd6df515aa89f6a9ef5b17cfee9da63 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 2022-01-11T04:55:55Z | java | 2022-01-12T05:30:54Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.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
* |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,935 | [Bug] [API] There're a few issues about running test cases in the class of AlertGroupControllerTest | ### 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
When I run the test cases of AlertGroupControllerTest , it failed at the test case of test010CreateAlertgroup and test060VerifyGroupName. It's because that these test cases didn't run orderly. So as running the test case of test010CreateAlertgroup , maybe the other test cases have been executed before.
More details are as follows:



### What you expected to happen
I expect that these test cases can be executed successfully.
### How to reproduce
You can run the whole test cases of AlertGroupControllerTest.
### 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/7935 | https://github.com/apache/dolphinscheduler/pull/7954 | 3edc58cbddd6df515aa89f6a9ef5b17cfee9da63 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 2022-01-11T04:55:55Z | java | 2022-01-12T05:30:54Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | * 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.controller;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.AlertType;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
/**
* alert group controller test
*/
public class AlertGroupControllerTest extends AbstractControllerTest {
private static final Logger logger = LoggerFactory.getLogger(AlertGroupController.class); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,935 | [Bug] [API] There're a few issues about running test cases in the class of AlertGroupControllerTest | ### 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
When I run the test cases of AlertGroupControllerTest , it failed at the test case of test010CreateAlertgroup and test060VerifyGroupName. It's because that these test cases didn't run orderly. So as running the test case of test010CreateAlertgroup , maybe the other test cases have been executed before.
More details are as follows:



### What you expected to happen
I expect that these test cases can be executed successfully.
### How to reproduce
You can run the whole test cases of AlertGroupControllerTest.
### 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/7935 | https://github.com/apache/dolphinscheduler/pull/7954 | 3edc58cbddd6df515aa89f6a9ef5b17cfee9da63 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 2022-01-11T04:55:55Z | java | 2022-01-12T05:30:54Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | @Test
public void test010CreateAlertgroup() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", "cxc test group name");
paramsMap.add("groupType", AlertType.EMAIL.toString());
paramsMap.add("description", "cxc junit 测试告警描述");
paramsMap.add("alertInstanceIds", "");
MvcResult mvcResult = mockMvc.perform(post("/alert-groups")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isCreated())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test020List() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
MvcResult mvcResult = mockMvc.perform(get("/alert-groups/list")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,935 | [Bug] [API] There're a few issues about running test cases in the class of AlertGroupControllerTest | ### 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
When I run the test cases of AlertGroupControllerTest , it failed at the test case of test010CreateAlertgroup and test060VerifyGroupName. It's because that these test cases didn't run orderly. So as running the test case of test010CreateAlertgroup , maybe the other test cases have been executed before.
More details are as follows:



### What you expected to happen
I expect that these test cases can be executed successfully.
### How to reproduce
You can run the whole test cases of AlertGroupControllerTest.
### 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/7935 | https://github.com/apache/dolphinscheduler/pull/7954 | 3edc58cbddd6df515aa89f6a9ef5b17cfee9da63 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 2022-01-11T04:55:55Z | java | 2022-01-12T05:30:54Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | @Test
public void test030ListPaging() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("pageNo", "1");
paramsMap.add("searchVal", AlertType.EMAIL.toString());
paramsMap.add("pageSize", "1");
MvcResult mvcResult = mockMvc.perform(get("/alert-groups")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test040QueryAlertGroupById() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("id", "1");
MvcResult mvcResult = mockMvc.perform(post("/alert-groups/query")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,935 | [Bug] [API] There're a few issues about running test cases in the class of AlertGroupControllerTest | ### 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
When I run the test cases of AlertGroupControllerTest , it failed at the test case of test010CreateAlertgroup and test060VerifyGroupName. It's because that these test cases didn't run orderly. So as running the test case of test010CreateAlertgroup , maybe the other test cases have been executed before.
More details are as follows:



### What you expected to happen
I expect that these test cases can be executed successfully.
### How to reproduce
You can run the whole test cases of AlertGroupControllerTest.
### 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/7935 | https://github.com/apache/dolphinscheduler/pull/7954 | 3edc58cbddd6df515aa89f6a9ef5b17cfee9da63 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 2022-01-11T04:55:55Z | java | 2022-01-12T05:30:54Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | @Test
public void test050UpdateAlertgroup() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", "cxc test group name");
paramsMap.add("groupType", AlertType.EMAIL.toString());
paramsMap.add("description", "update alter group");
paramsMap.add("alertInstanceIds", "");
MvcResult mvcResult = mockMvc.perform(put("/alert-groups/1")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test060VerifyGroupName() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", "cxc test group name");
MvcResult mvcResult = mockMvc.perform(get("/alert-groups/verify-name")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,935 | [Bug] [API] There're a few issues about running test cases in the class of AlertGroupControllerTest | ### 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
When I run the test cases of AlertGroupControllerTest , it failed at the test case of test010CreateAlertgroup and test060VerifyGroupName. It's because that these test cases didn't run orderly. So as running the test case of test010CreateAlertgroup , maybe the other test cases have been executed before.
More details are as follows:



### What you expected to happen
I expect that these test cases can be executed successfully.
### How to reproduce
You can run the whole test cases of AlertGroupControllerTest.
### 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/7935 | https://github.com/apache/dolphinscheduler/pull/7954 | 3edc58cbddd6df515aa89f6a9ef5b17cfee9da63 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 2022-01-11T04:55:55Z | java | 2022-01-12T05:30:54Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | }
@Test
public void test070VerifyGroupNameNotExit() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", "cxc test group name xx");
MvcResult mvcResult = mockMvc.perform(get("/alert-groups/verify-name")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test080DelAlertgroupById() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
MvcResult mvcResult = mockMvc.perform(delete("/alert-groups/1")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.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.enums;
import java.util.Locale;
import java.util.Optional;
import org.springframework.context.i18n.LocaleContextHolder;
/**
* status enum // todo #4855 One category one interval |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | */
public enum Status {
SUCCESS(0, "success", "成功"),
INTERNAL_SERVER_ERROR_ARGS(10000, "Internal Server Error: {0}", "服务端异常: {0}"),
REQUEST_PARAMS_NOT_VALID_ERROR(10001, "request parameter {0} is not valid", "请求参数[{0}]无效"),
TASK_TIMEOUT_PARAMS_ERROR(10002, "task timeout parameter is not valid", "任务超时参数无效"),
USER_NAME_EXIST(10003, "user name already exists", "用户名已存在"),
USER_NAME_NULL(10004, "user name is null", "用户名不能为空"),
HDFS_OPERATION_ERROR(10006, "hdfs operation error", "hdfs操作错误"),
TASK_INSTANCE_NOT_FOUND(10008, "task instance not found", "任务实例不存在"),
OS_TENANT_CODE_EXIST(10009, "os tenant code {0} already exists", "操作系统租户[{0}]已存在"),
USER_NOT_EXIST(10010, "user {0} not exists", "用户[{0}]不存在"),
ALERT_GROUP_NOT_EXIST(10011, "alarm group not found", "告警组不存在"),
ALERT_GROUP_EXIST(10012, "alarm group already exists", "告警组名称已存在"),
USER_NAME_PASSWD_ERROR(10013, "user name or password error", "用户名或密码错误"),
LOGIN_SESSION_FAILED(10014, "create session failed!", "创建session失败"),
DATASOURCE_EXIST(10015, "data source name already exists", "数据源名称已存在"),
DATASOURCE_CONNECT_FAILED(10016, "data source connection failed", "建立数据源连接失败"),
TENANT_NOT_EXIST(10017, "tenant not exists", "租户不存在"),
PROJECT_NOT_FOUND(10018, "project {0} not found ", "项目[{0}]不存在"),
PROJECT_ALREADY_EXISTS(10019, "project {0} already exists", "项目名称[{0}]已存在"),
TASK_INSTANCE_NOT_EXISTS(10020, "task instance {0} does not exist", "任务实例[{0}]不存在"),
TASK_INSTANCE_NOT_SUB_WORKFLOW_INSTANCE(10021, "task instance {0} is not sub process instance", "任务实例[{0}]不是子流程实例"),
SCHEDULE_CRON_NOT_EXISTS(10022, "scheduler crontab {0} does not exist", "调度配置定时表达式[{0}]不存在"),
SCHEDULE_CRON_ONLINE_FORBID_UPDATE(10023, "online status does not allow update operations", "调度配置上线状态不允许修改"),
SCHEDULE_CRON_CHECK_FAILED(10024, "scheduler crontab expression validation failure: {0}", "调度配置定时表达式验证失败: {0}"),
MASTER_NOT_EXISTS(10025, "master does not exist", "无可用master节点"),
SCHEDULE_STATUS_UNKNOWN(10026, "unknown status: {0}", "未知状态: {0}"),
CREATE_ALERT_GROUP_ERROR(10027, "create alert group error", "创建告警组错误"),
QUERY_ALL_ALERTGROUP_ERROR(10028, "query all alertgroup error", "查询告警组错误"), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | LIST_PAGING_ALERT_GROUP_ERROR(10029, "list paging alert group error", "分页查询告警组错误"),
UPDATE_ALERT_GROUP_ERROR(10030, "update alert group error", "更新告警组错误"),
DELETE_ALERT_GROUP_ERROR(10031, "delete alert group error", "删除告警组错误"),
ALERT_GROUP_GRANT_USER_ERROR(10032, "alert group grant user error", "告警组授权用户错误"),
CREATE_DATASOURCE_ERROR(10033, "create datasource error", "创建数据源错误"),
UPDATE_DATASOURCE_ERROR(10034, "update datasource error", "更新数据源错误"),
QUERY_DATASOURCE_ERROR(10035, "query datasource error", "查询数据源错误"),
CONNECT_DATASOURCE_FAILURE(10036, "connect datasource failure", "建立数据源连接失败"),
CONNECTION_TEST_FAILURE(10037, "connection test failure", "测试数据源连接失败"),
DELETE_DATA_SOURCE_FAILURE(10038, "delete data source failure", "删除数据源失败"),
VERIFY_DATASOURCE_NAME_FAILURE(10039, "verify datasource name failure", "验证数据源名称失败"),
UNAUTHORIZED_DATASOURCE(10040, "unauthorized datasource", "未经授权的数据源"),
AUTHORIZED_DATA_SOURCE(10041, "authorized data source", "授权数据源失败"),
LOGIN_SUCCESS(10042, "login success", "登录成功"),
USER_LOGIN_FAILURE(10043, "user login failure", "用户登录失败"),
LIST_WORKERS_ERROR(10044, "list workers error", "查询worker列表错误"),
LIST_MASTERS_ERROR(10045, "list masters error", "查询master列表错误"),
UPDATE_PROJECT_ERROR(10046, "update project error", "更新项目信息错误"),
QUERY_PROJECT_DETAILS_BY_CODE_ERROR(10047, "query project details by code error", "查询项目详细信息错误"),
CREATE_PROJECT_ERROR(10048, "create project error", "创建项目错误"),
LOGIN_USER_QUERY_PROJECT_LIST_PAGING_ERROR(10049, "login user query project list paging error", "分页查询项目列表错误"),
DELETE_PROJECT_ERROR(10050, "delete project error", "删除项目错误"),
QUERY_UNAUTHORIZED_PROJECT_ERROR(10051, "query unauthorized project error", "查询未授权项目错误"),
QUERY_AUTHORIZED_PROJECT(10052, "query authorized project", "查询授权项目错误"),
QUERY_QUEUE_LIST_ERROR(10053, "query queue list error", "查询队列列表错误"),
CREATE_RESOURCE_ERROR(10054, "create resource error", "创建资源错误"),
UPDATE_RESOURCE_ERROR(10055, "update resource error", "更新资源错误"),
QUERY_RESOURCES_LIST_ERROR(10056, "query resources list error", "查询资源列表错误"),
QUERY_RESOURCES_LIST_PAGING(10057, "query resources list paging", "分页查询资源列表错误"),
DELETE_RESOURCE_ERROR(10058, "delete resource error", "删除资源错误"), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | VERIFY_RESOURCE_BY_NAME_AND_TYPE_ERROR(10059, "verify resource by name and type error", "资源名称或类型验证错误"),
VIEW_RESOURCE_FILE_ON_LINE_ERROR(10060, "view resource file online error", "查看资源文件错误"),
CREATE_RESOURCE_FILE_ON_LINE_ERROR(10061, "create resource file online error", "创建资源文件错误"),
RESOURCE_FILE_IS_EMPTY(10062, "resource file is empty", "资源文件内容不能为空"),
EDIT_RESOURCE_FILE_ON_LINE_ERROR(10063, "edit resource file online error", "更新资源文件错误"),
DOWNLOAD_RESOURCE_FILE_ERROR(10064, "download resource file error", "下载资源文件错误"),
CREATE_UDF_FUNCTION_ERROR(10065, "create udf function error", "创建UDF函数错误"),
VIEW_UDF_FUNCTION_ERROR(10066, "view udf function error", "查询UDF函数错误"),
UPDATE_UDF_FUNCTION_ERROR(10067, "update udf function error", "更新UDF函数错误"),
QUERY_UDF_FUNCTION_LIST_PAGING_ERROR(10068, "query udf function list paging error", "分页查询UDF函数列表错误"),
QUERY_DATASOURCE_BY_TYPE_ERROR(10069, "query datasource by type error", "查询数据源信息错误"),
VERIFY_UDF_FUNCTION_NAME_ERROR(10070, "verify udf function name error", "UDF函数名称验证错误"),
DELETE_UDF_FUNCTION_ERROR(10071, "delete udf function error", "删除UDF函数错误"),
AUTHORIZED_FILE_RESOURCE_ERROR(10072, "authorized file resource error", "授权资源文件错误"),
AUTHORIZE_RESOURCE_TREE(10073, "authorize resource tree display error", "授权资源目录树错误"),
UNAUTHORIZED_UDF_FUNCTION_ERROR(10074, "unauthorized udf function error", "查询未授权UDF函数错误"),
AUTHORIZED_UDF_FUNCTION_ERROR(10075, "authorized udf function error", "授权UDF函数错误"),
CREATE_SCHEDULE_ERROR(10076, "create schedule error", "创建调度配置错误"),
UPDATE_SCHEDULE_ERROR(10077, "update schedule error", "更新调度配置错误"),
PUBLISH_SCHEDULE_ONLINE_ERROR(10078, "publish schedule online error", "上线调度配置错误"),
OFFLINE_SCHEDULE_ERROR(10079, "offline schedule error", "下线调度配置错误"),
QUERY_SCHEDULE_LIST_PAGING_ERROR(10080, "query schedule list paging error", "分页查询调度配置列表错误"),
QUERY_SCHEDULE_LIST_ERROR(10081, "query schedule list error", "查询调度配置列表错误"),
QUERY_TASK_LIST_PAGING_ERROR(10082, "query task list paging error", "分页查询任务列表错误"),
QUERY_TASK_RECORD_LIST_PAGING_ERROR(10083, "query task record list paging error", "分页查询任务记录错误"),
CREATE_TENANT_ERROR(10084, "create tenant error", "创建租户错误"),
QUERY_TENANT_LIST_PAGING_ERROR(10085, "query tenant list paging error", "分页查询租户列表错误"),
QUERY_TENANT_LIST_ERROR(10086, "query tenant list error", "查询租户列表错误"),
UPDATE_TENANT_ERROR(10087, "update tenant error", "更新租户错误"),
DELETE_TENANT_BY_ID_ERROR(10088, "delete tenant by id error", "删除租户错误"), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | VERIFY_OS_TENANT_CODE_ERROR(10089, "verify os tenant code error", "操作系统租户验证错误"),
CREATE_USER_ERROR(10090, "create user error", "创建用户错误"),
QUERY_USER_LIST_PAGING_ERROR(10091, "query user list paging error", "分页查询用户列表错误"),
UPDATE_USER_ERROR(10092, "update user error", "更新用户错误"),
DELETE_USER_BY_ID_ERROR(10093, "delete user by id error", "删除用户错误"),
GRANT_PROJECT_ERROR(10094, "grant project error", "授权项目错误"),
GRANT_RESOURCE_ERROR(10095, "grant resource error", "授权资源错误"),
GRANT_UDF_FUNCTION_ERROR(10096, "grant udf function error", "授权UDF函数错误"),
GRANT_DATASOURCE_ERROR(10097, "grant datasource error", "授权数据源错误"),
GET_USER_INFO_ERROR(10098, "get user info error", "获取用户信息错误"),
USER_LIST_ERROR(10099, "user list error", "查询用户列表错误"),
VERIFY_USERNAME_ERROR(10100, "verify username error", "用户名验证错误"),
UNAUTHORIZED_USER_ERROR(10101, "unauthorized user error", "查询未授权用户错误"),
AUTHORIZED_USER_ERROR(10102, "authorized user error", "查询授权用户错误"),
QUERY_TASK_INSTANCE_LOG_ERROR(10103, "view task instance log error", "查询任务实例日志错误"),
DOWNLOAD_TASK_INSTANCE_LOG_FILE_ERROR(10104, "download task instance log file error", "下载任务日志文件错误"),
CREATE_PROCESS_DEFINITION_ERROR(10105, "create process definition error", "创建工作流错误"),
VERIFY_PROCESS_DEFINITION_NAME_UNIQUE_ERROR(10106, "verify process definition name unique error", "工作流定义名称验证错误"),
UPDATE_PROCESS_DEFINITION_ERROR(10107, "update process definition error", "更新工作流定义错误"),
RELEASE_PROCESS_DEFINITION_ERROR(10108, "release process definition error", "上线工作流错误"),
QUERY_DETAIL_OF_PROCESS_DEFINITION_ERROR(10109, "query detail of process definition error", "查询工作流详细信息错误"),
QUERY_PROCESS_DEFINITION_LIST(10110, "query process definition list", "查询工作流列表错误"),
ENCAPSULATION_TREEVIEW_STRUCTURE_ERROR(10111, "encapsulation treeview structure error", "查询工作流树形图数据错误"),
GET_TASKS_LIST_BY_PROCESS_DEFINITION_ID_ERROR(10112, "get tasks list by process definition id error", "查询工作流定义节点信息错误"),
QUERY_PROCESS_INSTANCE_LIST_PAGING_ERROR(10113, "query process instance list paging error", "分页查询工作流实例列表错误"),
QUERY_TASK_LIST_BY_PROCESS_INSTANCE_ID_ERROR(10114, "query task list by process instance id error", "查询任务实例列表错误"),
UPDATE_PROCESS_INSTANCE_ERROR(10115, "update process instance error", "更新工作流实例错误"),
QUERY_PROCESS_INSTANCE_BY_ID_ERROR(10116, "query process instance by id error", "查询工作流实例错误"),
DELETE_PROCESS_INSTANCE_BY_ID_ERROR(10117, "delete process instance by id error", "删除工作流实例错误"),
QUERY_SUB_PROCESS_INSTANCE_DETAIL_INFO_BY_TASK_ID_ERROR(10118, "query sub process instance detail info by task id error", "查询子流程任务实例错误"), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | QUERY_PARENT_PROCESS_INSTANCE_DETAIL_INFO_BY_SUB_PROCESS_INSTANCE_ID_ERROR(10119, "query parent process instance detail info by sub process instance id error", "查询子流程该工作流实例错误"),
QUERY_PROCESS_INSTANCE_ALL_VARIABLES_ERROR(10120, "query process instance all variables error", "查询工作流自定义变量信息错误"),
ENCAPSULATION_PROCESS_INSTANCE_GANTT_STRUCTURE_ERROR(10121, "encapsulation process instance gantt structure error", "查询工作流实例甘特图数据错误"),
QUERY_PROCESS_DEFINITION_LIST_PAGING_ERROR(10122, "query process definition list paging error", "分页查询工作流定义列表错误"),
SIGN_OUT_ERROR(10123, "sign out error", "退出错误"),
OS_TENANT_CODE_HAS_ALREADY_EXISTS(10124, "os tenant code has already exists", "操作系统租户已存在"),
IP_IS_EMPTY(10125, "ip is empty", "IP地址不能为空"),
SCHEDULE_CRON_REALEASE_NEED_NOT_CHANGE(10126, "schedule release is already {0}", "调度配置上线错误[{0}]"),
CREATE_QUEUE_ERROR(10127, "create queue error", "创建队列错误"),
QUEUE_NOT_EXIST(10128, "queue {0} not exists", "队列ID[{0}]不存在"),
QUEUE_VALUE_EXIST(10129, "queue value {0} already exists", "队列值[{0}]已存在"),
QUEUE_NAME_EXIST(10130, "queue name {0} already exists", "队列名称[{0}]已存在"),
UPDATE_QUEUE_ERROR(10131, "update queue error", "更新队列信息错误"),
NEED_NOT_UPDATE_QUEUE(10132, "no content changes, no updates are required", "数据未变更,不需要更新队列信息"),
VERIFY_QUEUE_ERROR(10133, "verify queue error", "验证队列信息错误"),
NAME_NULL(10134, "name must be not null", "名称不能为空"),
NAME_EXIST(10135, "name {0} already exists", "名称[{0}]已存在"),
SAVE_ERROR(10136, "save error", "保存错误"),
DELETE_PROJECT_ERROR_DEFINES_NOT_NULL(10137, "please delete the process definitions in project first!", "请先删除全部工作流定义"),
BATCH_DELETE_PROCESS_INSTANCE_BY_IDS_ERROR(10117, "batch delete process instance by ids {0} error", "批量删除工作流实例错误: {0}"),
PREVIEW_SCHEDULE_ERROR(10139, "preview schedule error", "预览调度配置错误"),
PARSE_TO_CRON_EXPRESSION_ERROR(10140, "parse cron to cron expression error", "解析调度表达式错误"),
SCHEDULE_START_TIME_END_TIME_SAME(10141, "The start time must not be the same as the end", "开始时间不能和结束时间一样"),
DELETE_TENANT_BY_ID_FAIL(10142, "delete tenant by id fail, for there are {0} process instances in executing using it", "删除租户失败,有[{0}]个运行中的工作流实例正在使用"),
DELETE_TENANT_BY_ID_FAIL_DEFINES(10143, "delete tenant by id fail, for there are {0} process definitions using it", "删除租户失败,有[{0}]个工作流定义正在使用"),
DELETE_TENANT_BY_ID_FAIL_USERS(10144, "delete tenant by id fail, for there are {0} users using it", "删除租户失败,有[{0}]个用户正在使用"),
DELETE_WORKER_GROUP_BY_ID_FAIL(10145, "delete worker group by id fail, for there are {0} process instances in executing using it", "删除Worker分组失败,有[{0}]个运行中的工作流实例正在使用"),
QUERY_WORKER_GROUP_FAIL(10146, "query worker group fail ", "查询worker分组失败"),
DELETE_WORKER_GROUP_FAIL(10147, "delete worker group fail ", "删除worker分组失败"),
USER_DISABLED(10148, "The current user is disabled", "当前用户已停用"), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | COPY_PROCESS_DEFINITION_ERROR(10149, "copy process definition from {0} to {1} error : {2}", "从{0}复制工作流到{1}错误 : {2}"),
MOVE_PROCESS_DEFINITION_ERROR(10150, "move process definition from {0} to {1} error : {2}", "从{0}移动工作流到{1}错误 : {2}"),
SWITCH_PROCESS_DEFINITION_VERSION_ERROR(10151, "Switch process definition version error", "切换工作流版本出错"),
SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_ERROR(10152
, "Switch process definition version error: not exists process definition, [process definition id {0}]", "切换工作流版本出错:工作流不存在,[工作流id {0}]"),
SWITCH_PROCESS_DEFINITION_VERSION_NOT_EXIST_PROCESS_DEFINITION_VERSION_ERROR(10153
, "Switch process definition version error: not exists process definition version, [process definition id {0}] [version number {1}]", "切换工作流版本出错:工作流版本信息不存在,[工作流id {0}] [版本号 {1}]"),
QUERY_PROCESS_DEFINITION_VERSIONS_ERROR(10154, "query process definition versions error", "查询工作流历史版本信息出错"),
DELETE_PROCESS_DEFINITION_VERSION_ERROR(10156, "delete process definition version error", "删除工作流历史版本出错"),
QUERY_USER_CREATED_PROJECT_ERROR(10157, "query user created project error error", "查询用户创建的项目错误"),
PROCESS_DEFINITION_CODES_IS_EMPTY(10158, "process definition codes is empty", "工作流CODES不能为空"),
BATCH_COPY_PROCESS_DEFINITION_ERROR(10159, "batch copy process definition error", "复制工作流错误"),
BATCH_MOVE_PROCESS_DEFINITION_ERROR(10160, "batch move process definition error", "移动工作流错误"),
QUERY_WORKFLOW_LINEAGE_ERROR(10161, "query workflow lineage error", "查询血缘失败"),
QUERY_AUTHORIZED_AND_USER_CREATED_PROJECT_ERROR(10162, "query authorized and user created project error error", "查询授权的和用户创建的项目错误"),
DELETE_PROCESS_DEFINITION_BY_CODE_FAIL(10163, "delete process definition by code fail, for there are {0} process instances in executing using it", "删除工作流定义失败,有[{0}]个运行中的工作流实例正在使用"),
CHECK_OS_TENANT_CODE_ERROR(10164, "Please enter the English os tenant code", "请输入英文操作系统租户"),
FORCE_TASK_SUCCESS_ERROR(10165, "force task success error", "强制成功任务实例错误"),
TASK_INSTANCE_STATE_OPERATION_ERROR(10166, "the status of task instance {0} is {1},Cannot perform force success operation", "任务实例[{0}]的状态是[{1}],无法执行强制成功操作"),
DATASOURCE_TYPE_NOT_EXIST(10167, "data source type not exist", "数据源类型不存在"),
PROCESS_DEFINITION_NAME_EXIST(10168, "process definition name {0} already exists", "工作流定义名称[{0}]已存在"),
DATASOURCE_DB_TYPE_ILLEGAL(10169, "datasource type illegal", "数据源类型参数不合法"),
DATASOURCE_PORT_ILLEGAL(10170, "datasource port illegal", "数据源端口参数不合法"),
DATASOURCE_OTHER_PARAMS_ILLEGAL(10171, "datasource other params illegal", "数据源其他参数不合法"),
DATASOURCE_NAME_ILLEGAL(10172, "datasource name illegal", "数据源名称不合法"),
DATASOURCE_HOST_ILLEGAL(10173, "datasource host illegal", "数据源HOST不合法"),
DELETE_WORKER_GROUP_NOT_EXIST(10174, "delete worker group not exist ", "删除worker分组不存在"),
CREATE_WORKER_GROUP_FORBIDDEN_IN_DOCKER(10175, "create worker group forbidden in docker ", "创建worker分组在docker中禁止"),
DELETE_WORKER_GROUP_FORBIDDEN_IN_DOCKER(10176, "delete worker group forbidden in docker ", "删除worker分组在docker中禁止"),
WORKER_ADDRESS_INVALID(10177, "worker address {0} invalid", "worker地址[{0}]无效"), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | QUERY_WORKER_ADDRESS_LIST_FAIL(10178, "query worker address list fail ", "查询worker地址列表失败"),
TRANSFORM_PROJECT_OWNERSHIP(10179, "Please transform project ownership [{0}]", "请先转移项目所有权[{0}]"),
QUERY_ALERT_GROUP_ERROR(10180, "query alert group error", "查询告警组错误"),
CURRENT_LOGIN_USER_TENANT_NOT_EXIST(10181, "the tenant of the currently login user is not specified", "未指定当前登录用户的租户"),
REVOKE_PROJECT_ERROR(10182, "revoke project error", "撤销项目授权错误"),
QUERY_AUTHORIZED_USER(10183, "query authorized user error", "查询拥有项目权限的用户错误"),
PROJECT_NOT_EXIST(10190, "This project was not found. Please refresh page.", "该项目不存在,请刷新页面"),
UDF_FUNCTION_NOT_EXIST(20001, "UDF function not found", "UDF函数不存在"),
UDF_FUNCTION_EXISTS(20002, "UDF function already exists", "UDF函数已存在"),
RESOURCE_NOT_EXIST(20004, "resource not exist", "资源不存在"),
RESOURCE_EXIST(20005, "resource already exists", "资源已存在"),
RESOURCE_SUFFIX_NOT_SUPPORT_VIEW(20006, "resource suffix do not support online viewing", "资源文件后缀不支持查看"),
RESOURCE_SIZE_EXCEED_LIMIT(20007, "upload resource file size exceeds limit", "上传资源文件大小超过限制"),
RESOURCE_SUFFIX_FORBID_CHANGE(20008, "resource suffix not allowed to be modified", "资源文件后缀不支持修改"),
UDF_RESOURCE_SUFFIX_NOT_JAR(20009, "UDF resource suffix name must be jar", "UDF资源文件后缀名只支持[jar]"),
HDFS_COPY_FAIL(20010, "hdfs copy {0} -> {1} fail", "hdfs复制失败:[{0}] -> [{1}]"),
RESOURCE_FILE_EXIST(20011, "resource file {0} already exists in hdfs,please delete it or change name!", "资源文件[{0}]在hdfs中已存在,请删除或修改资源名"),
RESOURCE_FILE_NOT_EXIST(20012, "resource file {0} not exists in hdfs!", "资源文件[{0}]在hdfs中不存在"),
UDF_RESOURCE_IS_BOUND(20013, "udf resource file is bound by UDF functions:{0}", "udf函数绑定了资源文件[{0}]"),
RESOURCE_IS_USED(20014, "resource file is used by process definition", "资源文件被上线的流程定义使用了"),
PARENT_RESOURCE_NOT_EXIST(20015, "parent resource not exist", "父资源文件不存在"),
RESOURCE_NOT_EXIST_OR_NO_PERMISSION(20016, "resource not exist or no permission,please view the task node and remove error resource", "请检查任务节点并移除无权限或者已删除的资源"),
RESOURCE_IS_AUTHORIZED(20017, "resource is authorized to user {0},suffix not allowed to be modified", "资源文件已授权其他用户[{0}],后缀不允许修改"),
USER_NO_OPERATION_PERM(30001, "user has no operation privilege", "当前用户没有操作权限"),
USER_NO_OPERATION_PROJECT_PERM(30002, "user {0} is not has project {1} permission", "当前用户[{0}]没有[{1}]项目的操作权限"),
PROCESS_INSTANCE_NOT_EXIST(50001, "process instance {0} does not exist", "工作流实例[{0}]不存在"),
PROCESS_INSTANCE_EXIST(50002, "process instance {0} already exists", "工作流实例[{0}]已存在"),
PROCESS_DEFINE_NOT_EXIST(50003, "process definition {0} does not exist", "工作流定义[{0}]不存在"),
PROCESS_DEFINE_NOT_RELEASE(50004, "process definition {0} not on line", "工作流定义[{0}]不是上线状态"),
PROCESS_INSTANCE_ALREADY_CHANGED(50005, "the status of process instance {0} is already {1}", "工作流实例[{0}]的状态已经是[{1}]"), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | PROCESS_INSTANCE_STATE_OPERATION_ERROR(50006, "the status of process instance {0} is {1},Cannot perform {2} operation", "工作流实例[{0}]的状态是[{1}],无法执行[{2}]操作"),
SUB_PROCESS_INSTANCE_NOT_EXIST(50007, "the task belong to process instance does not exist", "子工作流实例不存在"),
PROCESS_DEFINE_NOT_ALLOWED_EDIT(50008, "process definition {0} does not allow edit", "工作流定义[{0}]不允许修改"),
PROCESS_INSTANCE_EXECUTING_COMMAND(50009, "process instance {0} is executing the command, please wait ...", "工作流实例[{0}]正在执行命令,请稍等..."),
PROCESS_INSTANCE_NOT_SUB_PROCESS_INSTANCE(50010, "process instance {0} is not sub process instance", "工作流实例[{0}]不是子工作流实例"),
TASK_INSTANCE_STATE_COUNT_ERROR(50011, "task instance state count error", "查询各状态任务实例数错误"),
COUNT_PROCESS_INSTANCE_STATE_ERROR(50012, "count process instance state error", "查询各状态流程实例数错误"),
COUNT_PROCESS_DEFINITION_USER_ERROR(50013, "count process definition user error", "查询各用户流程定义数错误"),
START_PROCESS_INSTANCE_ERROR(50014, "start process instance error", "运行工作流实例错误"),
BATCH_START_PROCESS_INSTANCE_ERROR(50014, "batch start process instance error: {0}", "批量运行工作流实例错误: {0}"),
EXECUTE_PROCESS_INSTANCE_ERROR(50015, "execute process instance error", "操作工作流实例错误"),
CHECK_PROCESS_DEFINITION_ERROR(50016, "check process definition error", "工作流定义错误"),
QUERY_RECIPIENTS_AND_COPYERS_BY_PROCESS_DEFINITION_ERROR(50017, "query recipients and copyers by process definition error", "查询收件人和抄送人错误"),
DATA_IS_NOT_VALID(50017, "data {0} not valid", "数据[{0}]无效"),
DATA_IS_NULL(50018, "data {0} is null", "数据[{0}]不能为空"),
PROCESS_NODE_HAS_CYCLE(50019, "process node has cycle", "流程节点间存在循环依赖"),
PROCESS_NODE_S_PARAMETER_INVALID(50020, "process node {0} parameter invalid", "流程节点[{0}]参数无效"),
PROCESS_DEFINE_STATE_ONLINE(50021, "process definition [{0}] is already on line", "工作流定义[{0}]已上线"),
DELETE_PROCESS_DEFINE_BY_CODE_ERROR(50022, "delete process definition by code error", "删除工作流定义错误"),
SCHEDULE_CRON_STATE_ONLINE(50023, "the status of schedule {0} is already on line", "调度配置[{0}]已上线"),
DELETE_SCHEDULE_CRON_BY_ID_ERROR(50024, "delete schedule by id error", "删除调度配置错误"),
BATCH_DELETE_PROCESS_DEFINE_ERROR(50025, "batch delete process definition error", "批量删除工作流定义错误"),
BATCH_DELETE_PROCESS_DEFINE_BY_CODES_ERROR(50026, "batch delete process definition by codes {0} error", "批量删除工作流定义[{0}]错误"),
TENANT_NOT_SUITABLE(50027, "there is not any tenant suitable, please choose a tenant available.", "没有合适的租户,请选择可用的租户"),
EXPORT_PROCESS_DEFINE_BY_ID_ERROR(50028, "export process definition by id error", "导出工作流定义错误"),
BATCH_EXPORT_PROCESS_DEFINE_BY_IDS_ERROR(50028, "batch export process definition by ids error", "批量导出工作流定义错误"),
IMPORT_PROCESS_DEFINE_ERROR(50029, "import process definition error", "导入工作流定义错误"),
TASK_DEFINE_NOT_EXIST(50030, "task definition [{0}] does not exist", "任务定义[{0}]不存在"),
CREATE_PROCESS_TASK_RELATION_ERROR(50032, "create process task relation error", "创建工作流任务关系错误"),
PROCESS_TASK_RELATION_NOT_EXIST(50033, "process task relation [{0}] does not exist", "工作流任务关系[{0}]不存在"), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | PROCESS_TASK_RELATION_EXIST(50034, "process task relation is already exist, processCode:[{0}]", "工作流任务关系已存在, processCode:[{0}]"),
PROCESS_DAG_IS_EMPTY(50035, "process dag is empty", "工作流dag是空"),
CHECK_PROCESS_TASK_RELATION_ERROR(50036, "check process task relation error", "工作流任务关系参数错误"),
CREATE_TASK_DEFINITION_ERROR(50037, "create task definition error", "创建任务错误"),
UPDATE_TASK_DEFINITION_ERROR(50038, "update task definition error", "更新任务定义错误"),
QUERY_TASK_DEFINITION_VERSIONS_ERROR(50039, "query task definition versions error", "查询任务历史版本信息出错"),
SWITCH_TASK_DEFINITION_VERSION_ERROR(50040, "Switch task definition version error", "切换任务版本出错"),
DELETE_TASK_DEFINITION_VERSION_ERROR(50041, "delete task definition version error", "删除任务历史版本出错"),
DELETE_TASK_DEFINE_BY_CODE_ERROR(50042, "delete task definition by code error", "删除任务定义错误"),
QUERY_DETAIL_OF_TASK_DEFINITION_ERROR(50043, "query detail of task definition error", "查询任务详细信息错误"),
QUERY_TASK_DEFINITION_LIST_PAGING_ERROR(50044, "query task definition list paging error", "分页查询任务定义列表错误"),
TASK_DEFINITION_NAME_EXISTED(50045, "task definition name [{0}] already exists", "任务定义名称[{0}]已经存在"),
RELEASE_TASK_DEFINITION_ERROR(50046, "release task definition error", "上线任务错误"),
MOVE_PROCESS_TASK_RELATION_ERROR(50047, "move process task relation error", "移动任务到其他工作流错误"),
DELETE_TASK_PROCESS_RELATION_ERROR(50048, "delete process task relation error", "删除工作流任务关系错误"),
QUERY_TASK_PROCESS_RELATION_ERROR(50049, "query process task relation error", "查询工作流任务关系错误"),
TASK_DEFINE_STATE_ONLINE(50050, "task definition [{0}] is already on line", "任务定义[{0}]已上线"),
TASK_HAS_DOWNSTREAM(50051, "Task exists downstream [{0}] dependence", "任务存在下游[{0}]依赖"),
TASK_HAS_UPSTREAM(50052, "Task [{0}] exists upstream dependence", "任务[{0}]存在上游依赖"),
MAIN_TABLE_USING_VERSION(50053, "the version that the master table is using", "主表正在使用该版本"),
PROJECT_PROCESS_NOT_MATCH(50054, "the project and the process is not match", "项目和工作流不匹配"),
DELETE_EDGE_ERROR(50055, "delete edge error", "删除工作流任务连接线错误"),
NOT_SUPPORT_UPDATE_TASK_DEFINITION(50056, "task state does not support modification", "当前任务不支持修改"),
NOT_SUPPORT_COPY_TASK_TYPE(50057, "task type [{0}] does not support copy", "不支持复制的任务类型[{0}]"),
HDFS_NOT_STARTUP(60001, "hdfs not startup", "hdfs未启用"),
/**
* for monitor
*/
QUERY_DATABASE_STATE_ERROR(70001, "query database state error", "查询数据库状态错误"),
CREATE_ACCESS_TOKEN_ERROR(70010, "create access token error", "创建访问token错误"), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | GENERATE_TOKEN_ERROR(70011, "generate token error", "生成token错误"),
QUERY_ACCESSTOKEN_LIST_PAGING_ERROR(70012, "query access token list paging error", "分页查询访问token列表错误"),
UPDATE_ACCESS_TOKEN_ERROR(70013, "update access token error", "更新访问token错误"),
DELETE_ACCESS_TOKEN_ERROR(70014, "delete access token error", "删除访问token错误"),
ACCESS_TOKEN_NOT_EXIST(70015, "access token not exist", "访问token不存在"),
QUERY_ACCESSTOKEN_BY_USER_ERROR(70016, "query access token by user error", "查询访问指定用户的token错误"),
COMMAND_STATE_COUNT_ERROR(80001, "task instance state count error", "查询各状态任务实例数错误"),
NEGTIVE_SIZE_NUMBER_ERROR(80002, "query size number error", "查询size错误"),
START_TIME_BIGGER_THAN_END_TIME_ERROR(80003, "start time bigger than end time error", "开始时间在结束时间之后错误"),
QUEUE_COUNT_ERROR(90001, "queue count error", "查询队列数据错误"),
KERBEROS_STARTUP_STATE(100001, "get kerberos startup state error", "获取kerberos启动状态错误"),
//plugin
PLUGIN_NOT_A_UI_COMPONENT(110001, "query plugin error, this plugin has no UI component", "查询插件错误,此插件无UI组件"),
QUERY_PLUGINS_RESULT_IS_NULL(110002, "query plugins result is null", "查询插件为空"),
QUERY_PLUGINS_ERROR(110003, "query plugins error", "查询插件错误"),
QUERY_PLUGIN_DETAIL_RESULT_IS_NULL(110004, "query plugin detail result is null", "查询插件详情结果为空"),
UPDATE_ALERT_PLUGIN_INSTANCE_ERROR(110005, "update alert plugin instance error", "更新告警组和告警组插件实例错误"),
DELETE_ALERT_PLUGIN_INSTANCE_ERROR(110006, "delete alert plugin instance error", "删除告警组和告警组插件实例错误"),
GET_ALERT_PLUGIN_INSTANCE_ERROR(110007, "get alert plugin instance error", "获取告警组和告警组插件实例错误"),
CREATE_ALERT_PLUGIN_INSTANCE_ERROR(110008, "create alert plugin instance error", "创建告警组和告警组插件实例错误"),
QUERY_ALL_ALERT_PLUGIN_INSTANCE_ERROR(110009, "query all alert plugin instance error", "查询所有告警实例失败"),
PLUGIN_INSTANCE_ALREADY_EXIT(110010, "plugin instance already exit", "该告警插件实例已存在"),
LIST_PAGING_ALERT_PLUGIN_INSTANCE_ERROR(110011, "query plugin instance page error", "分页查询告警实例失败"),
DELETE_ALERT_PLUGIN_INSTANCE_ERROR_HAS_ALERT_GROUP_ASSOCIATED(110012, "failed to delete the alert instance, there is an alarm group associated with this alert instance",
"删除告警实例失败,存在与此告警实例关联的警报组"),
PROCESS_DEFINITION_VERSION_IS_USED(110013,"this process definition version is used","此工作流定义版本被使用"),
CREATE_ENVIRONMENT_ERROR(120001, "create environment error", "创建环境失败"),
ENVIRONMENT_NAME_EXISTS(120002,"this enviroment name [{0}] already exists","环境名称[{0}]已经存在"),
ENVIRONMENT_NAME_IS_NULL(120003,"this enviroment name shouldn't be empty.","环境名称不能为空"),
ENVIRONMENT_CONFIG_IS_NULL(120004,"this enviroment config shouldn't be empty.","环境配置信息不能为空"), |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | UPDATE_ENVIRONMENT_ERROR(120005, "update environment [{0}] info error", "更新环境[{0}]信息失败"),
DELETE_ENVIRONMENT_ERROR(120006, "delete environment error", "删除环境信息失败"),
DELETE_ENVIRONMENT_RELATED_TASK_EXISTS(120007, "this environment has been used in tasks,so you can't delete it.", "该环境已经被任务使用,所以不能删除该环境信息"),
QUERY_ENVIRONMENT_BY_NAME_ERROR(1200008, "not found environment [{0}] ", "查询环境名称[{0}]信息不存在"),
QUERY_ENVIRONMENT_BY_CODE_ERROR(1200009, "not found environment [{0}] ", "查询环境编码[{0}]不存在"),
QUERY_ENVIRONMENT_ERROR(1200010, "login user query environment error", "分页查询环境列表错误"),
VERIFY_ENVIRONMENT_ERROR(1200011, "verify environment error", "验证环境信息错误"),
TASK_GROUP_NAME_EXSIT(130001,"this task group name is repeated in a project","该任务组名称在一个项目中已经使用"),
TASK_GROUP_SIZE_ERROR(130002,"task group size error","任务组大小应该为大于1的整数"),
TASK_GROUP_STATUS_ERROR(130003,"task group status error","任务组已经被关闭"),
TASK_GROUP_FULL(130004,"task group is full","任务组已经满了"),
TASK_GROUP_USED_SIZE_ERROR(130005,"the used size number of task group is dirty","任务组使用的容量发生了变化"),
TASK_GROUP_QUEUE_RELEASE_ERROR(130006,"relase task group queue failed","任务组资源释放时出现了错误"),
TASK_GROUP_QUEUE_AWAKE_ERROR(130007,"awake waiting task failed","任务组使唤醒等待任务时发生了错误"),
CREATE_TASK_GROUP_ERROR(130008,"create task group error","创建任务组错误"),
UPDATE_TASK_GROUP_ERROR(130009,"update task group list error","更新任务组错误"),
QUERY_TASK_GROUP_LIST_ERROR(130010,"query task group list error","查询任务组列表错误"),
CLOSE_TASK_GROUP_ERROR(130011,"close task group error","关闭任务组错误"),
START_TASK_GROUP_ERROR(130012,"start task group error","启动任务组错误"),
QUERY_TASK_GROUP_QUEUE_LIST_ERROR(130013,"query task group queue list error","查询任务组队列列表错误"),
TASK_GROUP_CACHE_START_FAILED(130014,"cache start failed","任务组相关的缓存启动失败"),
ENVIRONMENT_WORKER_GROUPS_IS_INVALID(130015, "environment worker groups is invalid format", "环境关联的工作组参数解析错误"),
UPDATE_ENVIRONMENT_WORKER_GROUP_RELATION_ERROR(130016,"You can't modify the worker group, because the worker group [{0}] and this environment [{1}] already be used in the task [{2}]",
"您不能修改工作组选项,因为该工作组 [{0}] 和 该环境 [{1}] 已经被用在任务 [{2}] 中"),
TASK_GROUP_QUEUE_ALREADY_START(130017, "task group queue already start", "节点已经获取任务组资源"),
NOT_ALLOW_TO_DISABLE_OWN_ACCOUNT(130020, "Not allow to disable your own account", "不能停用自己的账号"),
;
private final int code;
private final String enMsg;
private final String zhMsg; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/enums/Status.java | Status(int code, String enMsg, String zhMsg) {
this.code = code;
this.enMsg = enMsg;
this.zhMsg = zhMsg;
}
public int getCode() {
return this.code;
}
public String getMsg() {
if (Locale.SIMPLIFIED_CHINESE.getLanguage().equals(LocaleContextHolder.getLocale().getLanguage())) {
return this.zhMsg;
} else {
return this.enMsg;
}
}
/**
* Retrieve Status enum entity by status code.
* @param code
* @return
*/
public static Optional<Status> findStatusBy(int code) {
for (Status status : Status.values
if (code == status.getCode
return Optional.of(status);
}
}
return Optional.empty();
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertGroupServiceImpl.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, |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertGroupServiceImpl.java | * 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 org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.service.AlertGroupService;
import org.apache.dolphinscheduler.api.utils.PageInfo;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.Constants;
import org.apache.dolphinscheduler.dao.entity.AlertGroup;
import org.apache.dolphinscheduler.dao.entity.User;
import org.apache.dolphinscheduler.dao.mapper.AlertGroupMapper;
import org.apache.commons.lang.StringUtils;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
/**
* alert group service impl
*/
@Service |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertGroupServiceImpl.java | public class AlertGroupServiceImpl extends BaseServiceImpl implements AlertGroupService {
private Logger logger = LoggerFactory.getLogger(AlertGroupServiceImpl.class);
@Autowired
private AlertGroupMapper alertGroupMapper;
/**
* query alert group list
*
* @return alert group list
*/
@Override
public Map<String, Object> queryAlertgroup() {
HashMap<String, Object> result = new HashMap<>();
List<AlertGroup> alertGroups = alertGroupMapper.queryAllGroupList();
result.put(Constants.DATA_LIST, alertGroups);
putMsg(result, Status.SUCCESS);
return result;
}
/**
* query alert group by id
*
* @param loginUser login user
* @param id alert group id
* @return one alert group
*/
@Override
public Map<String, Object> queryAlertGroupById(User loginUser, Integer id) {
Map<String, Object> result = new HashMap<>();
result.put(Constants.STATUS, false); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertGroupServiceImpl.java | if (isNotAdmin(loginUser, result)) {
return result;
}
AlertGroup alertGroup = alertGroupMapper.selectById(id);
if (alertGroup == null) {
putMsg(result, Status.ALERT_GROUP_NOT_EXIST);
return result;
}
result.put("data", alertGroup);
putMsg(result, Status.SUCCESS);
return result;
}
/**
* paging query alarm group list
*
* @param loginUser login user
* @param searchVal search value
* @param pageNo page number
* @param pageSize page size
* @return alert group list page
*/
@Override
public Result listPaging(User loginUser, String searchVal, Integer pageNo, Integer pageSize) {
Result result = new Result();
if (!isAdmin(loginUser)) {
putMsg(result,Status.USER_NO_OPERATION_PERM);
return result;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertGroupServiceImpl.java | Page<AlertGroup> page = new Page<>(pageNo, pageSize);
IPage<AlertGroup> alertGroupIPage = alertGroupMapper.queryAlertGroupPage(
page, searchVal);
PageInfo<AlertGroup> pageInfo = new PageInfo<>(pageNo, pageSize);
pageInfo.setTotal((int) alertGroupIPage.getTotal());
pageInfo.setTotalList(alertGroupIPage.getRecords());
result.setData(pageInfo);
putMsg(result, Status.SUCCESS);
return result;
}
/**
* create alert group
*
* @param loginUser login user
* @param groupName group name
* @param desc description
* @param alertInstanceIds alertInstanceIds
* @return create result code
*/
@Override
public Map<String, Object> createAlertgroup(User loginUser, String groupName, String desc, String alertInstanceIds) {
Map<String, Object> result = new HashMap<>();
if (isNotAdmin(loginUser, result)) {
return result;
}
AlertGroup alertGroup = new AlertGroup();
Date now = new Date();
alertGroup.setGroupName(groupName);
alertGroup.setAlertInstanceIds(alertInstanceIds); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertGroupServiceImpl.java | alertGroup.setDescription(desc);
alertGroup.setCreateTime(now);
alertGroup.setUpdateTime(now);
alertGroup.setCreateUserId(loginUser.getId());
try {
int insert = alertGroupMapper.insert(alertGroup);
putMsg(result, insert > 0 ? Status.SUCCESS : Status.CREATE_ALERT_GROUP_ERROR);
} catch (DuplicateKeyException ex) {
logger.error("Create alert group error.", ex);
putMsg(result, Status.ALERT_GROUP_EXIST);
}
return result;
}
/**
* updateProcessInstance alert group
*
* @param loginUser login user
* @param id alert group id
* @param groupName group name
* @param desc description
* @param alertInstanceIds alertInstanceIds
* @return update result code
*/
@Override
public Map<String, Object> updateAlertgroup(User loginUser, int id, String groupName, String desc, String alertInstanceIds) {
Map<String, Object> result = new HashMap<>();
if (isNotAdmin(loginUser, result)) {
return result;
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertGroupServiceImpl.java | AlertGroup alertGroup = alertGroupMapper.selectById(id);
if (alertGroup == null) {
putMsg(result, Status.ALERT_GROUP_NOT_EXIST);
return result;
}
Date now = new Date();
if (!StringUtils.isEmpty(groupName)) {
alertGroup.setGroupName(groupName);
}
alertGroup.setDescription(desc);
alertGroup.setUpdateTime(now);
alertGroup.setCreateUserId(loginUser.getId());
alertGroup.setAlertInstanceIds(alertInstanceIds);
try {
alertGroupMapper.updateById(alertGroup);
putMsg(result, Status.SUCCESS);
} catch (DuplicateKeyException ex) {
logger.error("Update alert group error.", ex);
putMsg(result, Status.ALERT_GROUP_EXIST);
}
return result;
}
/**
* delete alert group by id
*
* @param loginUser login user
* @param id alert group id
* @return delete result code
*/
@Override |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/AlertGroupServiceImpl.java | @Transactional(rollbackFor = RuntimeException.class)
public Map<String, Object> delAlertgroupById(User loginUser, int id) {
Map<String, Object> result = new HashMap<>();
result.put(Constants.STATUS, false);
if (isNotAdmin(loginUser, result)) {
return result;
}
AlertGroup alertGroup = alertGroupMapper.selectById(id);
if (alertGroup == null) {
putMsg(result, Status.ALERT_GROUP_NOT_EXIST);
return result;
}
alertGroupMapper.deleteById(id);
putMsg(result, Status.SUCCESS);
return result;
}
/**
* verify group name exists
*
* @param groupName group name
* @return check result code
*/
@Override
public boolean existGroupName(String groupName) {
return alertGroupMapper.existGroupName(groupName) == Boolean.TRUE;
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.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 |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | * 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.controller;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.put;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.apache.dolphinscheduler.api.enums.Status;
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.enums.AlertType;
import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.dao.entity.AlertGroup;
import org.apache.dolphinscheduler.dao.mapper.AlertGroupMapper;
import java.util.Date;
import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/**
* alert group controller test
*/
public class AlertGroupControllerTest extends AbstractControllerTest {
private static final Logger logger = LoggerFactory.getLogger(AlertGroupController.class);
private static final String defaultTestAlertGroupName = "cxc test group name";
@Autowired
AlertGroupMapper alertGroupMapper;
private int createEntity() {
AlertGroup alertGroup = new AlertGroup();
alertGroup.setGroupName(defaultTestAlertGroupName);
alertGroup.setCreateTime(new Date());
alertGroup.setUpdateTime(new Date());
alertGroupMapper.insert(alertGroup);
return alertGroup.getId();
}
@After
public void clear() {
alertGroupMapper.delete(new QueryWrapper<AlertGroup>().lambda().eq(AlertGroup::getGroupName, defaultTestAlertGroupName));
}
@Test
public void test010CreateAlertGroup() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", defaultTestAlertGroupName);
paramsMap.add("groupType", AlertType.EMAIL.toString()); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | paramsMap.add("description", "cxc junit 测试告警描述");
paramsMap.add("alertInstanceIds", "");
MvcResult mvcResult = mockMvc.perform(post("/alert-groups")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isCreated())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test020List() throws Exception {
createEntity();
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
MvcResult mvcResult = mockMvc.perform(get("/alert-groups/list")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test030ListPaging() throws Exception {
createEntity();
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>(); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | paramsMap.add("pageNo", "1");
paramsMap.add("searchVal", AlertType.EMAIL.toString());
paramsMap.add("pageSize", "1");
MvcResult mvcResult = mockMvc.perform(get("/alert-groups")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test040QueryAlertGroupById() throws Exception {
int entityId = createEntity();
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("id", Integer.toString(entityId));
MvcResult mvcResult = mockMvc.perform(post("/alert-groups/query")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test050UpdateAlertGroup() throws Exception { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | int entityId = createEntity();
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", defaultTestAlertGroupName);
paramsMap.add("groupType", AlertType.EMAIL.toString());
paramsMap.add("description", "update alter group");
paramsMap.add("alertInstanceIds", "");
MvcResult mvcResult = mockMvc.perform(put("/alert-groups/" + entityId)
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test060VerifyGroupName() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", defaultTestAlertGroupName);
MvcResult mvcResult = mockMvc.perform(get("/alert-groups/verify-name")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,288 | [Feature][dolphinscheduler-api] The default alarm group should not be deleted, and add the alarm instance field in the alarm group list | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
1.The default alarm group should not be deleted,Because the alarm notification of master and worker fault tolerance is sent by the default alarm group
2.add the alarm instance field in the alarm group list

### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] 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/7288 | https://github.com/apache/dolphinscheduler/pull/7932 | a81093d6cbc3f200207ecd192716a1cd426b4edc | 8cac0d8f94491e82a69f599b6688d593951351d3 | 2021-12-09T08:13:43Z | java | 2022-01-12T06:12:30Z | dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/AlertGroupControllerTest.java | @Test
public void test070VerifyGroupNameNotExit() throws Exception {
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
paramsMap.add("groupName", "cxc test group name xx");
MvcResult mvcResult = mockMvc.perform(get("/alert-groups/verify-name")
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
@Test
public void test080DelAlertGroupById() throws Exception {
int entityId = createEntity();
MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
MvcResult mvcResult = mockMvc.perform(delete("/alert-groups/" + entityId)
.header("sessionId", sessionId)
.params(paramsMap))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
logger.info(mvcResult.getResponse().getContentAsString());
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkAlertChannelFactory.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.plugin.alert.dingtalk;
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_FALSE;
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_NO;
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_TRUE;
import static org.apache.dolphinscheduler.spi.utils.Constants.STRING_YES;
import org.apache.dolphinscheduler.alert.api.AlertChannel;
import org.apache.dolphinscheduler.alert.api.AlertChannelFactory;
import org.apache.dolphinscheduler.spi.params.PasswordParam; |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkAlertChannelFactory.java | import org.apache.dolphinscheduler.spi.params.base.ParamsOptions;
import org.apache.dolphinscheduler.spi.params.base.PluginParams;
import org.apache.dolphinscheduler.spi.params.base.Validate;
import org.apache.dolphinscheduler.spi.params.input.InputParam;
import org.apache.dolphinscheduler.spi.params.radio.RadioParam;
import java.util.Arrays;
import java.util.List;
import com.google.auto.service.AutoService;
@AutoService(AlertChannelFactory.class)
public final class DingTalkAlertChannelFactory implements AlertChannelFactory {
@Override
public String name() {
return "DingTalk";
}
@Override
public List<PluginParams> params() {
InputParam webHookParam = InputParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_WEB_HOOK, DingTalkParamsConstants.DING_TALK_WEB_HOOK)
.addValidate(Validate.newBuilder()
.setRequired(true)
.build())
.build();
InputParam keywordParam = InputParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_KEYWORD, DingTalkParamsConstants.DING_TALK_KEYWORD)
.addValidate(Validate.newBuilder()
.setRequired(true)
.build())
.build();
RadioParam isEnableProxy =
RadioParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PROXY_ENABLE, DingTalkParamsConstants.DING_TALK_PROXY_ENABLE)
.addParamsOptions(new ParamsOptions(STRING_YES, STRING_TRUE, false))
.addParamsOptions(new ParamsOptions(STRING_NO, STRING_FALSE, false)) |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkAlertChannelFactory.java | .setValue(STRING_TRUE)
.addValidate(Validate.newBuilder()
.setRequired(false)
.build())
.build();
InputParam proxyParam =
InputParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PROXY, DingTalkParamsConstants.DING_TALK_PROXY)
.addValidate(Validate.newBuilder()
.setRequired(false).build())
.build();
InputParam portParam = InputParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PORT, DingTalkParamsConstants.DING_TALK_PORT)
.addValidate(Validate.newBuilder()
.setRequired(false).build())
.build();
InputParam userParam =
InputParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_USER, DingTalkParamsConstants.DING_TALK_USER)
.addValidate(Validate.newBuilder()
.setRequired(false).build())
.build();
PasswordParam passwordParam = PasswordParam.newBuilder(DingTalkParamsConstants.NAME_DING_TALK_PASSWORD, DingTalkParamsConstants.DING_TALK_PASSWORD)
.setPlaceholder("if enable use authentication, you need input password")
.build();
return Arrays.asList(webHookParam, keywordParam, isEnableProxy, proxyParam, portParam, userParam, passwordParam);
}
@Override
public AlertChannel create() {
return new DingTalkAlertChannel();
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkParamsConstants.java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.plugin.alert.dingtalk;
public final class DingTalkParamsConstants { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkParamsConstants.java | static final String DING_TALK_PROXY_ENABLE = "$t('isEnableProxy')";
static final String NAME_DING_TALK_PROXY_ENABLE = "IsEnableProxy";
static final String DING_TALK_WEB_HOOK = "$t('webhook')";
static final String NAME_DING_TALK_WEB_HOOK = "WebHook";
static final String DING_TALK_KEYWORD = "$t('keyword')";
static final String NAME_DING_TALK_KEYWORD = "Keyword";
static final String DING_TALK_PROXY = "$t('proxy')";
static final String NAME_DING_TALK_PROXY = "Proxy";
static final String DING_TALK_PORT = "$t('port')";
static final String NAME_DING_TALK_PORT = "Port";
static final String DING_TALK_USER = "$t('user')";
static final String NAME_DING_TALK_USER = "User";
static final String DING_TALK_PASSWORD = "$t('password')";
static final String NAME_DING_TALK_PASSWORD = "Password";
private DingTalkParamsConstants() {
throw new UnsupportedOperationException("This is a utility class and cannot be instantiated");
}
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.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
* |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java | * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dolphinscheduler.plugin.alert.dingtalk;
import org.apache.dolphinscheduler.alert.api.AlertResult;
import org.apache.dolphinscheduler.spi.utils.JSONUtils;
import org.apache.commons.codec.binary.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class DingTalkSender { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java | private static final Logger logger = LoggerFactory.getLogger(DingTalkSender.class);
private final String url;
private final String keyword;
private final Boolean enableProxy;
private String proxy;
private Integer port;
private String user;
private String password;
DingTalkSender(Map<String, String> config) {
url = config.get(DingTalkParamsConstants.NAME_DING_TALK_WEB_HOOK);
keyword = config.get(DingTalkParamsConstants.NAME_DING_TALK_KEYWORD);
enableProxy = Boolean.valueOf(config.get(DingTalkParamsConstants.NAME_DING_TALK_PROXY_ENABLE));
if (Boolean.TRUE.equals(enableProxy)) {
port = Integer.parseInt(config.get(DingTalkParamsConstants.NAME_DING_TALK_PORT));
proxy = config.get(DingTalkParamsConstants.NAME_DING_TALK_PROXY);
user = config.get(DingTalkParamsConstants.DING_TALK_USER);
password = config.get(DingTalkParamsConstants.NAME_DING_TALK_PASSWORD);
}
}
private static HttpPost constructHttpPost(String url, String msg) {
HttpPost post = new HttpPost(url);
StringEntity entity = new StringEntity(msg, StandardCharsets.UTF_8);
post.setEntity(entity); |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java | post.addHeader("Content-Type", "application/json; charset=utf-8");
return post;
}
private static CloseableHttpClient getProxyClient(String proxy, int port, String user, String password) {
HttpHost httpProxy = new HttpHost(proxy, port);
CredentialsProvider provider = new BasicCredentialsProvider();
provider.setCredentials(new AuthScope(httpProxy), new UsernamePasswordCredentials(user, password));
return HttpClients.custom().setDefaultCredentialsProvider(provider).build();
}
private static CloseableHttpClient getDefaultClient() {
return HttpClients.createDefault();
}
private static RequestConfig getProxyConfig(String proxy, int port) {
HttpHost httpProxy = new HttpHost(proxy, port);
return RequestConfig.custom().setProxy(httpProxy).build();
}
private static String textToJsonString(String text) {
Map<String, Object> items = new HashMap<>();
items.put("msgtype", "text");
Map<String, String> textContent = new HashMap<>();
byte[] byt = StringUtils.getBytesUtf8(text);
String txt = StringUtils.newStringUtf8(byt);
textContent.put("content", txt);
items.put("text", textContent);
return JSONUtils.toJsonString(items);
}
private static AlertResult checkSendDingTalkSendMsgResult(String result) {
AlertResult alertResult = new AlertResult();
alertResult.setStatus("false");
if (null == result) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java | alertResult.setMessage("send ding talk msg error");
logger.info("send ding talk msg error,ding talk server resp is null");
return alertResult;
}
DingTalkSendMsgResponse sendMsgResponse = JSONUtils.parseObject(result, DingTalkSendMsgResponse.class);
if (null == sendMsgResponse) {
alertResult.setMessage("send ding talk msg fail");
logger.info("send ding talk msg error,resp error");
return alertResult;
}
if (sendMsgResponse.errcode == 0) {
alertResult.setStatus("true");
alertResult.setMessage("send ding talk msg success");
return alertResult;
}
alertResult.setMessage(String.format("alert send ding talk msg error : %s", sendMsgResponse.getErrmsg()));
logger.info("alert send ding talk msg error : {}", sendMsgResponse.getErrmsg());
return alertResult;
}
public AlertResult sendDingTalkMsg(String title, String content) {
AlertResult alertResult;
try {
String resp = sendMsg(title, content);
return checkSendDingTalkSendMsgResult(resp);
} catch (Exception e) {
logger.info("send ding talk alert msg exception : {}", e.getMessage());
alertResult = new AlertResult();
alertResult.setStatus("false");
alertResult.setMessage("send ding talk alert fail.");
} |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java | return alertResult;
}
private String sendMsg(String title, String content) throws IOException {
String msgToJson = textToJsonString(title + content + "#" + keyword);
HttpPost httpPost = constructHttpPost(url, msgToJson);
CloseableHttpClient httpClient;
if (Boolean.TRUE.equals(enableProxy)) {
httpClient = getProxyClient(proxy, port, user, password);
RequestConfig rcf = getProxyConfig(proxy, port);
httpPost.setConfig(rcf);
} else {
httpClient = getDefaultClient();
}
try {
CloseableHttpResponse response = httpClient.execute(httpPost);
String resp;
try {
HttpEntity entity = response.getEntity();
resp = EntityUtils.toString(entity, "UTF-8");
EntityUtils.consume(entity);
} finally {
response.close();
}
logger.info("Ding Talk send title :{},content : {}, resp: {}", title, content, resp);
return resp;
} finally {
httpClient.close();
}
}
static final class DingTalkSendMsgResponse { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java | private Integer errcode;
private String errmsg;
public DingTalkSendMsgResponse() {
}
public Integer getErrcode() {
return this.errcode;
}
public void setErrcode(Integer errcode) {
this.errcode = errcode;
}
public String getErrmsg() {
return this.errmsg;
}
public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
}
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if (!(o instanceof DingTalkSendMsgResponse)) { |
closed | apache/dolphinscheduler | https://github.com/apache/dolphinscheduler | 7,804 | [Feature][Task] DingTalk alert plugin adds signature. | ### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
DingTalk alert plugin adds signature.
### Use case
DingTalk alert plugin adds signature.
### Related issues
_No response_
### Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
| https://github.com/apache/dolphinscheduler/issues/7804 | https://github.com/apache/dolphinscheduler/pull/7805 | 64efc65edf06e8dc2ffdae14eabd4aab3d518a02 | cb8c875fa86e19c70537cbe425dcbe6c9e70aefb | 2022-01-05T04:55:44Z | java | 2022-01-12T07:24:25Z | dolphinscheduler-alert/dolphinscheduler-alert-plugins/dolphinscheduler-alert-dingtalk/src/main/java/org/apache/dolphinscheduler/plugin/alert/dingtalk/DingTalkSender.java | return false;
}
final DingTalkSendMsgResponse other = (DingTalkSendMsgResponse) o;
final Object this$errcode = this.getErrcode();
final Object other$errcode = other.getErrcode();
if (this$errcode == null ? other$errcode != null : !this$errcode.equals(other$errcode)) {
return false;
}
final Object this$errmsg = this.getErrmsg();
final Object other$errmsg = other.getErrmsg();
if (this$errmsg == null ? other$errmsg != null : !this$errmsg.equals(other$errmsg)) {
return false;
}
return true;
}
public int hashCode() {
final int PRIME = 59;
int result = 1;
final Object $errcode = this.getErrcode();
result = result * PRIME + ($errcode == null ? 43 : $errcode.hashCode());
final Object $errmsg = this.getErrmsg();
result = result * PRIME + ($errmsg == null ? 43 : $errmsg.hashCode());
return result;
}
public String toString() {
return "DingTalkSender.DingTalkSendMsgResponse(errcode=" + this.getErrcode() + ", errmsg=" + this.getErrmsg() + ")";
}
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.