Search in sources :

Example 6 with QueryManagerConfig

use of com.facebook.presto.execution.QueryManagerConfig in project presto by prestodb.

the class AbstractTestQueryFramework method getQueryExplainer.

private QueryExplainer getQueryExplainer() {
    Metadata metadata = queryRunner.getMetadata();
    FeaturesConfig featuresConfig = new FeaturesConfig().setOptimizeHashGeneration(true);
    boolean forceSingleNode = queryRunner.getNodeCount() == 1;
    TaskCountEstimator taskCountEstimator = new TaskCountEstimator(queryRunner::getNodeCount);
    CostCalculator costCalculator = new CostCalculatorUsingExchanges(taskCountEstimator);
    List<PlanOptimizer> optimizers = new PlanOptimizers(metadata, sqlParser, forceSingleNode, new MBeanExporter(new TestingMBeanServer()), queryRunner.getSplitManager(), queryRunner.getPlanOptimizerManager(), queryRunner.getPageSourceManager(), queryRunner.getStatsCalculator(), costCalculator, new CostCalculatorWithEstimatedExchanges(costCalculator, taskCountEstimator), new CostComparator(featuresConfig), taskCountEstimator, new PartitioningProviderManager()).getPlanningTimeOptimizers();
    return new QueryExplainer(optimizers, new PlanFragmenter(metadata, queryRunner.getNodePartitioningManager(), new QueryManagerConfig(), sqlParser, new FeaturesConfig()), metadata, queryRunner.getAccessControl(), sqlParser, queryRunner.getStatsCalculator(), costCalculator, ImmutableMap.of(), new PlanChecker(new FeaturesConfig(), false));
}
Also used : TaskCountEstimator(com.facebook.presto.cost.TaskCountEstimator) CostComparator(com.facebook.presto.cost.CostComparator) PlanOptimizer(com.facebook.presto.sql.planner.optimizations.PlanOptimizer) TestingMBeanServer(org.weakref.jmx.testing.TestingMBeanServer) QueryExplainer(com.facebook.presto.sql.analyzer.QueryExplainer) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) MBeanExporter(org.weakref.jmx.MBeanExporter) PartitioningProviderManager(com.facebook.presto.sql.planner.PartitioningProviderManager) Metadata(com.facebook.presto.metadata.Metadata) PlanFragmenter(com.facebook.presto.sql.planner.PlanFragmenter) CostCalculator(com.facebook.presto.cost.CostCalculator) PlanChecker(com.facebook.presto.sql.planner.sanity.PlanChecker) PlanOptimizers(com.facebook.presto.sql.planner.PlanOptimizers) QueryManagerConfig(com.facebook.presto.execution.QueryManagerConfig) CostCalculatorUsingExchanges(com.facebook.presto.cost.CostCalculatorUsingExchanges) CostCalculatorWithEstimatedExchanges(com.facebook.presto.cost.CostCalculatorWithEstimatedExchanges)

Aggregations

QueryManagerConfig (com.facebook.presto.execution.QueryManagerConfig)6 TaskManagerConfig (com.facebook.presto.execution.TaskManagerConfig)3 FeaturesConfig (com.facebook.presto.sql.analyzer.FeaturesConfig)3 Session (com.facebook.presto.Session)2 SystemSessionProperties (com.facebook.presto.SystemSessionProperties)2 NodeTaskMap (com.facebook.presto.execution.NodeTaskMap)2 TaskInfo (com.facebook.presto.execution.TaskInfo)2 TaskStatus (com.facebook.presto.execution.TaskStatus)2 NodeSchedulerConfig (com.facebook.presto.execution.scheduler.NodeSchedulerConfig)2 WarningCollectorConfig (com.facebook.presto.execution.warnings.WarningCollectorConfig)2 MemoryManagerConfig (com.facebook.presto.memory.MemoryManagerConfig)2 NodeMemoryConfig (com.facebook.presto.memory.NodeMemoryConfig)2 SessionPropertyManager (com.facebook.presto.metadata.SessionPropertyManager)2 TaskUpdateRequest (com.facebook.presto.server.TaskUpdateRequest)2 NodeSpillConfig (com.facebook.presto.spiller.NodeSpillConfig)2 PartitioningProviderManager (com.facebook.presto.sql.planner.PartitioningProviderManager)2 PlanFragmenter (com.facebook.presto.sql.planner.PlanFragmenter)2 TracingConfig (com.facebook.presto.tracing.TracingConfig)2 Test (org.testng.annotations.Test)2 Bootstrap (com.facebook.airlift.bootstrap.Bootstrap)1