-
Notifications
You must be signed in to change notification settings - Fork 376
Closed
Labels
Description
Search before asking
- I have searched in the issues and found no similar issues.
What would you like to be improved?
In org.apache.amoro.server.optimizing.plan.OptimizingPlanner#planTasks method, using actualPartitionPlans replace evaluators, The resulting optimizingType is more accurate.
amoro/amoro-ams/src/main/java/org/apache/amoro/server/optimizing/plan/OptimizingPlanner.java
Lines 164 to 187 in cc29688
| for (PartitionEvaluator evaluator : evaluators) { | |
| actualPartitionPlans.add((AbstractPartitionPlan) evaluator); | |
| actualInputSize += evaluator.getCost(); | |
| if (actualInputSize > maxInputSize) { | |
| break; | |
| } | |
| } | |
| double avgThreadCost = actualInputSize / availableCore; | |
| List<RewriteStageTask> tasks = Lists.newArrayList(); | |
| for (AbstractPartitionPlan partitionPlan : actualPartitionPlans) { | |
| tasks.addAll(partitionPlan.splitTasks((int) (actualInputSize / avgThreadCost))); | |
| } | |
| if (!tasks.isEmpty()) { | |
| if (evaluators.stream() | |
| .anyMatch(evaluator -> evaluator.getOptimizingType() == OptimizingType.FULL)) { | |
| optimizingType = OptimizingType.FULL; | |
| } else if (evaluators.stream() | |
| .anyMatch(evaluator -> evaluator.getOptimizingType() == OptimizingType.MAJOR)) { | |
| optimizingType = OptimizingType.MAJOR; | |
| } else { | |
| optimizingType = OptimizingType.MINOR; | |
| } | |
| } |
How should we improve?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Subtasks
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable