Orange-Summer commented on code in PR #14702:
URL:
https://github.com/apache/dolphinscheduler/pull/14702#discussion_r1293518582
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/dependent/DependentAsyncTaskExecuteFunction.java:
##########
@@ -183,15 +192,30 @@ private List<DependentExecute>
initializeDependentTaskList() {
private DependResult calculateDependResult() {
List<DependResult> dependResultList = new ArrayList<>();
+ Map<String, Long> dependVarPoolEndTimeMap = new HashMap<>();
for (DependentExecute dependentExecute : dependentTaskList) {
DependResult dependResult =
dependentExecute.getModelDependResult(dependentDate,
processInstance.getTestFlag());
+ if (dependResult == DependResult.SUCCESS) {
+ Map<String, Property> varPoolPropertyMap =
dependentExecute.getDependTaskVarPoolPropertyMap();
+ Map<String, Long> varPoolEndTimeMap =
dependentExecute.getDependTaskVarPoolEndTimeMap();
+ calculateDependVarPool(varPoolPropertyMap, varPoolEndTimeMap,
dependVarPoolEndTimeMap);
Review Comment:
I set this method as static because it needs to be called in both the
`DependentExecute` class(line 320) and the `DependentAsyncTaskExecuteFunction`
class(line 214), and the calculation of varPool in these two classes has the
same logic, just to reuse code.
The judgment here is indeed unnecessary, I will modify it later, thank you.
--
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]