ruanwenjun commented on code in PR #12722:
URL:
https://github.com/apache/dolphinscheduler/pull/12722#discussion_r1062071335
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java:
##########
@@ -117,6 +120,9 @@ public class TaskDefinitionServiceImpl extends
BaseServiceImpl implements TaskDe
@Autowired
private ProcessTaskRelationMapper processTaskRelationMapper;
+ @Autowired
+ private ProcessTaskRelationLogMapper processTaskRelationLogMapper;
Review Comment:
Please use `ProcessTaskRelationLogDao`
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java:
##########
@@ -846,10 +852,15 @@ public Map<String, Object> updateTaskWithUpstream(User
loginUser, long projectCo
} else {
queryUpStreamTaskCodeMap = new HashMap<>();
}
- if (CollectionUtils.isNotEmpty(upstreamTaskCodes)) {
+ if (queryUpStreamTaskCodeMap.size() != 0) {
Review Comment:
```suggestion
if (MapUtils.isNotEmpty(queryUpStreamTaskCodeMap)) {
```
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java:
##########
@@ -846,10 +852,15 @@ public Map<String, Object> updateTaskWithUpstream(User
loginUser, long projectCo
} else {
queryUpStreamTaskCodeMap = new HashMap<>();
}
- if (CollectionUtils.isNotEmpty(upstreamTaskCodes)) {
+ if (queryUpStreamTaskCodeMap.size() != 0) {
ProcessTaskRelation taskRelation = upstreamTaskRelations.get(0);
List<ProcessTaskRelation> processTaskRelations =
processTaskRelationMapper.queryByProcessCode(projectCode,
taskRelation.getProcessDefinitionCode());
+
+ // set upstream code list
+ updateUpstreamTask(new
HashSet<>(queryUpStreamTaskCodeMap.keySet()),
Review Comment:
```suggestion
updateUpstreamTask(queryUpStreamTaskCodeMap.keySet(),
```
You don't need to new set here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]