Class DefaultEstimatableCost
java.lang.Object
org.apache.wayang.core.optimizer.costs.DefaultEstimatableCost
- All Implemented Interfaces:
EstimatableCost
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEstimate(PlanImplementation plan, boolean isIncludeOverhead) Retrieves the cost estimate for this instance including any overhead.getParallelEstimate(PlanImplementation plan, boolean isIncludeOverhead) Retrieves the cost estimate for this instance taking into account parallel stage execution.getParallelOperatorJunctionAllCostEstimate(PlanImplementation plan, Operator operator) doublegetSquashedEstimate(PlanImplementation plan, boolean isIncludeOverhead) Retrieves the cost estimate for this instance.doublegetSquashedParallelEstimate(PlanImplementation plan, boolean isIncludeOverhead) Retrieves the cost estimate for this instance taking into account parallel stage execution.pickBestExecutionPlan(Collection<PlanImplementation> executionPlans, ExecutionPlan existingPlan, Set<Channel> openChannels, Set<ExecutionStage> executedStages)
-
Field Details
-
FACTORY
-
-
Constructor Details
-
DefaultEstimatableCost
public DefaultEstimatableCost()
-
-
Method Details
-
pickBestExecutionPlan
public PlanImplementation pickBestExecutionPlan(Collection<PlanImplementation> executionPlans, ExecutionPlan existingPlan, Set<Channel> openChannels, Set<ExecutionStage> executedStages) - Specified by:
pickBestExecutionPlanin interfaceEstimatableCost
-
getEstimate
Retrieves the cost estimate for this instance including any overhead.- Specified by:
getEstimatein interfaceEstimatableCost- Returns:
- the cost estimate
-
getSquashedEstimate
Retrieves the cost estimate for this instance.- Specified by:
getSquashedEstimatein interfaceEstimatableCost- Parameters:
isIncludeOverhead- whether to include global overhead in theTimeEstimate(to avoid repeating overhead in nested instances)- Returns:
- the squashed cost estimate
-
getParallelEstimate
public ProbabilisticDoubleInterval getParallelEstimate(PlanImplementation plan, boolean isIncludeOverhead) Retrieves the cost estimate for this instance taking into account parallel stage execution.- Specified by:
getParallelEstimatein interfaceEstimatableCost- Parameters:
isIncludeOverhead- whether to include global overhead in theTimeEstimate(to avoid repeating overhead in nested instances)- Returns:
- the cost estimate taking into account parallel stage execution
-
getSquashedParallelEstimate
Retrieves the cost estimate for this instance taking into account parallel stage execution.- Specified by:
getSquashedParallelEstimatein interfaceEstimatableCost- Parameters:
isIncludeOverhead- whether to include global overhead in theTimeEstimate(to avoid repeating overhead in nested instances)- Returns:
- the squashed cost estimate taking into account parallel stage execution
-
getParallelOperatorJunctionAllCostEstimate
public Tuple<List<ProbabilisticDoubleInterval>,List<Double>> getParallelOperatorJunctionAllCostEstimate(PlanImplementation plan, Operator operator) Retrieves the cost estimate of inputOperatorand inputJunctionand recurse if there is input Operators- Specified by:
getParallelOperatorJunctionAllCostEstimatein interfaceEstimatableCost- Parameters:
operator-Operatorthat will be used to retreive the cost/squashed costs- Returns:
- list of probabilisticDoubleInterval where First element is the operator cost and second element is the junction cost; and
list of double retreived where First element is the operator squashed cost and second element is the junction squashed cost
PS: This function will start with the sink operator
-
getFactory
- Specified by:
getFactoryin interfaceEstimatableCost
-