Skip to content

Commit

Permalink
[Chore] Remove unused utils in common module (#16902)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanwenjun authored Dec 19, 2024
1 parent 235695c commit 789f7ab
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 1,712 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.apache.dolphinscheduler.api.utils.Result;
import org.apache.dolphinscheduler.common.constants.Constants;
import org.apache.dolphinscheduler.common.enums.TaskExecuteType;
import org.apache.dolphinscheduler.common.utils.CollectionUtils;
import org.apache.dolphinscheduler.common.utils.DateUtils;
import org.apache.dolphinscheduler.dao.entity.Project;
import org.apache.dolphinscheduler.dao.entity.TaskInstance;
Expand All @@ -55,10 +54,8 @@
import org.apache.commons.lang3.StringUtils;

import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;

import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -145,7 +142,7 @@ public Result queryTaskListPaging(User loginUser,
Date start = checkAndParseDateParameters(startDate);
Date end = checkAndParseDateParameters(endDate);
Page<TaskInstance> page = new Page<>(pageNo, pageSize);
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(pageNo, pageSize);
PageInfo<TaskInstance> pageInfo = new PageInfo<>(pageNo, pageSize);
IPage<TaskInstance> taskInstanceIPage;
if (taskExecuteType == TaskExecuteType.STREAM) {
// stream task without workflow instance
Expand Down Expand Up @@ -178,9 +175,6 @@ public Result queryTaskListPaging(User loginUser,
start,
end);
}
Set<String> exclusionSet = new HashSet<>();
exclusionSet.add(Constants.CLASS);
exclusionSet.add("taskJson");
List<TaskInstance> taskInstanceList = taskInstanceIPage.getRecords();
List<Integer> executorIds =
taskInstanceList.stream().map(TaskInstance::getExecutorId).distinct().collect(Collectors.toList());
Expand All @@ -194,7 +188,7 @@ public Result queryTaskListPaging(User loginUser,
}
}
pageInfo.setTotal((int) taskInstanceIPage.getTotal());
pageInfo.setTotalList(CollectionUtils.getListByExclusion(taskInstanceIPage.getRecords(), exclusionSet));
pageInfo.setTotalList(taskInstanceList);
result.setData(pageInfo);
putMsg(result, Status.SUCCESS);
return result;
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 789f7ab

Please sign in to comment.