public class DefaultCostEstimator extends CostEstimator
This estimator works with actual estimates (as far as they are available) and falls back to setting relative costs, if no estimates are available. That way, the estimator makes sure that plans with different strategies are costed differently, also in the absence of estimates. The different relative costs in the absence of estimates represent this estimator's heuristic guidance towards certain strategies.
For robustness reasons, we always assume that the whole data is shipped during a repartition
step. We deviate from the typical estimate of (n - 1) / n (with n being the
number of nodes), because for a parallelism of 1, that would yield a shipping of zero bytes.
While this is usually correct, the runtime scheduling may still choose to move tasks to different
nodes, so that we do not know that no data is shipped.
| 构造器和说明 |
|---|
DefaultCostEstimator() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addArtificialDamCost(EstimateProvider estimates,
long bufferSize,
Costs costs) |
void |
addBlockNestedLoopsCosts(EstimateProvider outerSide,
EstimateProvider innerSide,
long blockSize,
Costs costs,
int costWeight) |
void |
addBroadcastCost(EstimateProvider estimates,
int replicationFactor,
Costs costs) |
void |
addCachedHybridHashCosts(EstimateProvider buildSideInput,
EstimateProvider probeSideInput,
Costs costs,
int costWeight)
Calculates the costs for the cached variant of the hybrid hash join.
|
void |
addFileInputCost(long fileSizeInBytes,
Costs costs) |
void |
addHashPartitioningCost(EstimateProvider estimates,
Costs costs) |
void |
addHybridHashCosts(EstimateProvider buildSideInput,
EstimateProvider probeSideInput,
Costs costs,
int costWeight) |
void |
addLocalMergeCost(EstimateProvider input1,
EstimateProvider input2,
Costs costs,
int costWeight) |
void |
addLocalSortCost(EstimateProvider estimates,
Costs costs) |
void |
addRandomPartitioningCost(EstimateProvider estimates,
Costs costs) |
void |
addRangePartitionCost(EstimateProvider estimates,
Costs costs) |
void |
addStreamedNestedLoopsCosts(EstimateProvider outerSide,
EstimateProvider innerSide,
long bufferSize,
Costs costs,
int costWeight) |
costOperatorpublic void addRandomPartitioningCost(EstimateProvider estimates, Costs costs)
addRandomPartitioningCost 在类中 CostEstimatorpublic void addHashPartitioningCost(EstimateProvider estimates, Costs costs)
addHashPartitioningCost 在类中 CostEstimatorpublic void addRangePartitionCost(EstimateProvider estimates, Costs costs)
addRangePartitionCost 在类中 CostEstimatorpublic void addBroadcastCost(EstimateProvider estimates, int replicationFactor, Costs costs)
addBroadcastCost 在类中 CostEstimatorpublic void addFileInputCost(long fileSizeInBytes,
Costs costs)
addFileInputCost 在类中 CostEstimatorpublic void addLocalSortCost(EstimateProvider estimates, Costs costs)
addLocalSortCost 在类中 CostEstimatorpublic void addLocalMergeCost(EstimateProvider input1, EstimateProvider input2, Costs costs, int costWeight)
addLocalMergeCost 在类中 CostEstimatorpublic void addHybridHashCosts(EstimateProvider buildSideInput, EstimateProvider probeSideInput, Costs costs, int costWeight)
addHybridHashCosts 在类中 CostEstimatorpublic void addCachedHybridHashCosts(EstimateProvider buildSideInput, EstimateProvider probeSideInput, Costs costs, int costWeight)
addCachedHybridHashCosts 在类中 CostEstimatorpublic void addStreamedNestedLoopsCosts(EstimateProvider outerSide, EstimateProvider innerSide, long bufferSize, Costs costs, int costWeight)
addStreamedNestedLoopsCosts 在类中 CostEstimatorpublic void addBlockNestedLoopsCosts(EstimateProvider outerSide, EstimateProvider innerSide, long blockSize, Costs costs, int costWeight)
addBlockNestedLoopsCosts 在类中 CostEstimatorpublic void addArtificialDamCost(EstimateProvider estimates, long bufferSize, Costs costs)
addArtificialDamCost 在类中 CostEstimatorCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.