/** * Injects the cardinalities of a current {@link ExecutionState} into its associated {@link RheemPlan} * (or its {@link OptimizationContext}, respectively) and then reperforms the cardinality estimation. * * @return whether any cardinalities have been injected */ public boolean pushCardinalityUpdates(ExecutionState executionState, PlanImplementation planImplementation) { boolean isInjected = this.injectMeasuredCardinalities(executionState); if (isInjected) this.pushCardinalities(planImplementation); return isInjected; }
/** * Go over the given {@link RheemPlan} and estimate the cardinalities of data being passed between its * {@link Operator}s and the execution profile and time of {@link ExecutionOperator}s. */ private void estimateKeyFigures() { this.logger.info("Estimating cardinalities and execution load..."); this.optimizationRound.start("Cardinality&Load Estimation"); if (this.cardinalityEstimatorManager == null) { this.optimizationRound.start("Cardinality&Load Estimation", "Create OptimizationContext"); this.optimizationContext = DefaultOptimizationContext.createFrom(this); this.optimizationRound.stop("Cardinality&Load Estimation", "Create OptimizationContext"); this.optimizationRound.start("Cardinality&Load Estimation", "Create CardinalityEstimationManager"); this.cardinalityEstimatorManager = new CardinalityEstimatorManager( this.rheemPlan, this.optimizationContext, this.configuration); this.optimizationRound.stop("Cardinality&Load Estimation", "Create CardinalityEstimationManager"); } this.optimizationRound.start("Cardinality&Load Estimation", "Push Estimation"); this.cardinalityEstimatorManager.pushCardinalities(); this.optimizationRound.stop("Cardinality&Load Estimation", "Push Estimation"); this.optimizationRound.stop("Cardinality&Load Estimation"); }