Search in sources :

Example 1 with NodePartitioningManager

use of com.facebook.presto.sql.planner.NodePartitioningManager in project presto by prestodb.

the class ServerMainModule method setup.

@Override
protected void setup(Binder binder) {
    ServerConfig serverConfig = buildConfigObject(ServerConfig.class);
    if (serverConfig.isResourceManager()) {
        install(new ResourceManagerModule());
    } else if (serverConfig.isCoordinator()) {
        install(new CoordinatorModule());
    } else {
        install(new WorkerModule());
    }
    install(new InternalCommunicationModule());
    configBinder(binder).bindConfig(FeaturesConfig.class);
    binder.bind(PlanChecker.class).in(Scopes.SINGLETON);
    binder.bind(SqlParser.class).in(Scopes.SINGLETON);
    binder.bind(SqlParserOptions.class).toInstance(sqlParserOptions);
    sqlParserOptions.useEnhancedErrorHandler(serverConfig.isEnhancedErrorReporting());
    jaxrsBinder(binder).bind(ThrowableMapper.class);
    configBinder(binder).bindConfig(QueryManagerConfig.class);
    configBinder(binder).bindConfig(SqlEnvironmentConfig.class);
    jsonCodecBinder(binder).bindJsonCodec(ViewDefinition.class);
    newOptionalBinder(binder, ExplainAnalyzeContext.class);
    // GC Monitor
    binder.bind(GcMonitor.class).to(JmxGcMonitor.class).in(Scopes.SINGLETON);
    // session properties
    binder.bind(SessionPropertyManager.class).in(Scopes.SINGLETON);
    binder.bind(SystemSessionProperties.class).in(Scopes.SINGLETON);
    binder.bind(SessionPropertyDefaults.class).in(Scopes.SINGLETON);
    // schema properties
    binder.bind(SchemaPropertyManager.class).in(Scopes.SINGLETON);
    // table properties
    binder.bind(TablePropertyManager.class).in(Scopes.SINGLETON);
    // column properties
    binder.bind(ColumnPropertyManager.class).in(Scopes.SINGLETON);
    // analyze properties
    binder.bind(AnalyzePropertyManager.class).in(Scopes.SINGLETON);
    // node manager
    discoveryBinder(binder).bindSelector("presto");
    binder.bind(DiscoveryNodeManager.class).in(Scopes.SINGLETON);
    binder.bind(InternalNodeManager.class).to(DiscoveryNodeManager.class).in(Scopes.SINGLETON);
    newExporter(binder).export(DiscoveryNodeManager.class).withGeneratedName();
    httpClientBinder(binder).bindHttpClient("node-manager", ForNodeManager.class).withTracing().withConfigDefaults(config -> {
        config.setRequestTimeout(new Duration(10, SECONDS));
    });
    driftClientBinder(binder).bindDriftClient(ThriftServerInfoClient.class, ForNodeManager.class).withAddressSelector(((addressSelectorBinder, annotation, prefix) -> addressSelectorBinder.bind(AddressSelector.class).annotatedWith(annotation).to(FixedAddressSelector.class)));
    // node scheduler
    // TODO: remove from NodePartitioningManager and move to CoordinatorModule
    configBinder(binder).bindConfig(NodeSchedulerConfig.class);
    configBinder(binder).bindConfig(SimpleTtlNodeSelectorConfig.class);
    binder.bind(NodeScheduler.class).in(Scopes.SINGLETON);
    binder.bind(NodeSelectionStats.class).in(Scopes.SINGLETON);
    newExporter(binder).export(NodeSelectionStats.class).withGeneratedName();
    binder.bind(NodeSchedulerExporter.class).in(Scopes.SINGLETON);
    binder.bind(NodeTaskMap.class).in(Scopes.SINGLETON);
    newExporter(binder).export(NodeScheduler.class).withGeneratedName();
    // network topology
    // TODO: move to CoordinatorModule when NodeScheduler is moved
    install(installModuleIf(NodeSchedulerConfig.class, config -> LEGACY.equalsIgnoreCase(config.getNetworkTopology()), moduleBinder -> moduleBinder.bind(NetworkTopology.class).to(LegacyNetworkTopology.class).in(Scopes.SINGLETON)));
    install(installModuleIf(NodeSchedulerConfig.class, config -> FLAT.equalsIgnoreCase(config.getNetworkTopology()), moduleBinder -> moduleBinder.bind(NetworkTopology.class).to(FlatNetworkTopology.class).in(Scopes.SINGLETON)));
    // task execution
    jaxrsBinder(binder).bind(TaskResource.class);
    newExporter(binder).export(TaskResource.class).withGeneratedName();
    jaxrsBinder(binder).bind(TaskExecutorResource.class);
    newExporter(binder).export(TaskExecutorResource.class).withGeneratedName();
    binder.bind(TaskManagementExecutor.class).in(Scopes.SINGLETON);
    install(new DefaultThriftCodecsModule());
    thriftCodecBinder(binder).bindCustomThriftCodec(SqlInvokedFunctionCodec.class);
    thriftCodecBinder(binder).bindCustomThriftCodec(SqlFunctionIdCodec.class);
    jsonCodecBinder(binder).bindListJsonCodec(TaskMemoryReservationSummary.class);
    binder.bind(SqlTaskManager.class).in(Scopes.SINGLETON);
    binder.bind(TaskManager.class).to(Key.get(SqlTaskManager.class));
    binder.bind(SpoolingOutputBufferFactory.class).in(Scopes.SINGLETON);
    binder.bind(RandomResourceManagerAddressSelector.class).in(Scopes.SINGLETON);
    driftClientBinder(binder).bindDriftClient(ResourceManagerClient.class, ForResourceManager.class).withAddressSelector((addressSelectorBinder, annotation, prefix) -> addressSelectorBinder.bind(AddressSelector.class).annotatedWith(annotation).to(RandomResourceManagerAddressSelector.class)).withExceptionClassifier(throwable -> {
        if (throwable instanceof ResourceManagerInconsistentException) {
            return new ExceptionClassification(Optional.of(true), DOWN);
        }
        return new ExceptionClassification(Optional.of(true), NORMAL);
    });
    newOptionalBinder(binder, ClusterMemoryManagerService.class);
    install(installModuleIf(ServerConfig.class, ServerConfig::isResourceManagerEnabled, new Module() {

        @Override
        public void configure(Binder moduleBinder) {
            configBinder(moduleBinder).bindConfig(ResourceManagerConfig.class);
            moduleBinder.bind(ClusterStatusSender.class).to(ResourceManagerClusterStatusSender.class).in(Scopes.SINGLETON);
            if (serverConfig.isCoordinator()) {
                moduleBinder.bind(ClusterMemoryManagerService.class).in(Scopes.SINGLETON);
                moduleBinder.bind(ResourceGroupService.class).to(ResourceManagerResourceGroupService.class).in(Scopes.SINGLETON);
            }
        }

        @Provides
        @Singleton
        @ForResourceManager
        public ScheduledExecutorService createResourceManagerScheduledExecutor(ResourceManagerConfig config) {
            return createConcurrentScheduledExecutor("resource-manager-heartbeats", config.getHeartbeatConcurrency(), config.getHeartbeatThreads());
        }

        @Provides
        @Singleton
        @ForResourceManager
        public ListeningExecutorService createResourceManagerExecutor(ResourceManagerConfig config) {
            ExecutorService executor = new ThreadPoolExecutor(0, config.getResourceManagerExecutorThreads(), 60, SECONDS, new LinkedBlockingQueue<>(), daemonThreadsNamed("resource-manager-executor-%s"));
            return listeningDecorator(executor);
        }
    }, moduleBinder -> {
        moduleBinder.bind(ClusterStatusSender.class).toInstance(execution -> {
        });
        moduleBinder.bind(ResourceGroupService.class).to(NoopResourceGroupService.class).in(Scopes.SINGLETON);
    }));
    FeaturesConfig featuresConfig = buildConfigObject(FeaturesConfig.class);
    FeaturesConfig.TaskSpillingStrategy taskSpillingStrategy = featuresConfig.getTaskSpillingStrategy();
    switch(taskSpillingStrategy) {
        case PER_TASK_MEMORY_THRESHOLD:
            binder.bind(TaskThresholdMemoryRevokingScheduler.class).in(Scopes.SINGLETON);
            break;
        default:
            binder.bind(MemoryRevokingScheduler.class).in(Scopes.SINGLETON);
    }
    // Add monitoring for JVM pauses
    binder.bind(PauseMeter.class).in(Scopes.SINGLETON);
    newExporter(binder).export(PauseMeter.class).withGeneratedName();
    binder.bind(GcStatusMonitor.class).in(Scopes.SINGLETON);
    configBinder(binder).bindConfig(MemoryManagerConfig.class);
    configBinder(binder).bindConfig(NodeMemoryConfig.class);
    configBinder(binder).bindConfig(ReservedSystemMemoryConfig.class);
    binder.bind(LocalMemoryManager.class).in(Scopes.SINGLETON);
    binder.bind(LocalMemoryManagerExporter.class).in(Scopes.SINGLETON);
    binder.bind(EmbedVersion.class).in(Scopes.SINGLETON);
    newExporter(binder).export(TaskManager.class).withGeneratedName();
    binder.bind(TaskExecutor.class).in(Scopes.SINGLETON);
    newExporter(binder).export(TaskExecutor.class).withGeneratedName();
    binder.bind(MultilevelSplitQueue.class).in(Scopes.SINGLETON);
    newExporter(binder).export(MultilevelSplitQueue.class).withGeneratedName();
    binder.bind(LocalExecutionPlanner.class).in(Scopes.SINGLETON);
    configBinder(binder).bindConfig(FileFragmentResultCacheConfig.class);
    binder.bind(FragmentCacheStats.class).in(Scopes.SINGLETON);
    newExporter(binder).export(FragmentCacheStats.class).withGeneratedName();
    configBinder(binder).bindConfig(CompilerConfig.class);
    binder.bind(ExpressionCompiler.class).in(Scopes.SINGLETON);
    newExporter(binder).export(ExpressionCompiler.class).withGeneratedName();
    binder.bind(PageFunctionCompiler.class).in(Scopes.SINGLETON);
    newExporter(binder).export(PageFunctionCompiler.class).withGeneratedName();
    configBinder(binder).bindConfig(TaskManagerConfig.class);
    binder.bind(IndexJoinLookupStats.class).in(Scopes.SINGLETON);
    newExporter(binder).export(IndexJoinLookupStats.class).withGeneratedName();
    binder.bind(AsyncHttpExecutionMBean.class).in(Scopes.SINGLETON);
    newExporter(binder).export(AsyncHttpExecutionMBean.class).withGeneratedName();
    binder.bind(JoinFilterFunctionCompiler.class).in(Scopes.SINGLETON);
    newExporter(binder).export(JoinFilterFunctionCompiler.class).withGeneratedName();
    binder.bind(JoinCompiler.class).in(Scopes.SINGLETON);
    newExporter(binder).export(JoinCompiler.class).withGeneratedName();
    binder.bind(OrderingCompiler.class).in(Scopes.SINGLETON);
    newExporter(binder).export(OrderingCompiler.class).withGeneratedName();
    binder.bind(PagesIndex.Factory.class).to(PagesIndex.DefaultFactory.class);
    binder.bind(LookupJoinOperators.class).in(Scopes.SINGLETON);
    jsonCodecBinder(binder).bindJsonCodec(TaskStatus.class);
    jsonCodecBinder(binder).bindJsonCodec(StageInfo.class);
    jsonCodecBinder(binder).bindJsonCodec(TaskInfo.class);
    jsonCodecBinder(binder).bindJsonCodec(OperatorStats.class);
    jsonCodecBinder(binder).bindJsonCodec(ExecutionFailureInfo.class);
    jsonCodecBinder(binder).bindJsonCodec(TableCommitContext.class);
    jsonCodecBinder(binder).bindJsonCodec(SqlInvokedFunction.class);
    smileCodecBinder(binder).bindSmileCodec(TaskStatus.class);
    smileCodecBinder(binder).bindSmileCodec(TaskInfo.class);
    thriftCodecBinder(binder).bindThriftCodec(TaskStatus.class);
    jaxrsBinder(binder).bind(PagesResponseWriter.class);
    // exchange client
    binder.bind(ExchangeClientSupplier.class).to(ExchangeClientFactory.class).in(Scopes.SINGLETON);
    httpClientBinder(binder).bindHttpClient("exchange", ForExchange.class).withTracing().withFilter(GenerateTraceTokenRequestFilter.class).withConfigDefaults(config -> {
        config.setRequestTimeout(new Duration(10, SECONDS));
        config.setMaxConnectionsPerServer(250);
        config.setMaxContentLength(new DataSize(32, MEGABYTE));
    });
    binder.install(new DriftNettyClientModule());
    driftClientBinder(binder).bindDriftClient(ThriftTaskClient.class, ForExchange.class).withAddressSelector(((addressSelectorBinder, annotation, prefix) -> addressSelectorBinder.bind(AddressSelector.class).annotatedWith(annotation).to(FixedAddressSelector.class)));
    configBinder(binder).bindConfig(ExchangeClientConfig.class);
    binder.bind(ExchangeExecutionMBean.class).in(Scopes.SINGLETON);
    newExporter(binder).export(ExchangeExecutionMBean.class).withGeneratedName();
    // execution
    binder.bind(LocationFactory.class).to(HttpLocationFactory.class).in(Scopes.SINGLETON);
    // memory manager
    jaxrsBinder(binder).bind(MemoryResource.class);
    jsonCodecBinder(binder).bindJsonCodec(MemoryInfo.class);
    jsonCodecBinder(binder).bindJsonCodec(MemoryPoolAssignmentsRequest.class);
    smileCodecBinder(binder).bindSmileCodec(MemoryInfo.class);
    smileCodecBinder(binder).bindSmileCodec(MemoryPoolAssignmentsRequest.class);
    // transaction manager
    configBinder(binder).bindConfig(TransactionManagerConfig.class);
    // data stream provider
    binder.bind(PageSourceManager.class).in(Scopes.SINGLETON);
    binder.bind(PageSourceProvider.class).to(PageSourceManager.class).in(Scopes.SINGLETON);
    // connector distributed metadata manager
    binder.bind(ConnectorMetadataUpdaterManager.class).in(Scopes.SINGLETON);
    // page sink provider
    binder.bind(PageSinkManager.class).in(Scopes.SINGLETON);
    binder.bind(PageSinkProvider.class).to(PageSinkManager.class).in(Scopes.SINGLETON);
    // metadata
    binder.bind(StaticCatalogStore.class).in(Scopes.SINGLETON);
    configBinder(binder).bindConfig(StaticCatalogStoreConfig.class);
    binder.bind(StaticFunctionNamespaceStore.class).in(Scopes.SINGLETON);
    configBinder(binder).bindConfig(StaticFunctionNamespaceStoreConfig.class);
    binder.bind(FunctionAndTypeManager.class).in(Scopes.SINGLETON);
    binder.bind(MetadataManager.class).in(Scopes.SINGLETON);
    binder.bind(Metadata.class).to(MetadataManager.class).in(Scopes.SINGLETON);
    // row expression utils
    binder.bind(DomainTranslator.class).to(RowExpressionDomainTranslator.class).in(Scopes.SINGLETON);
    binder.bind(PredicateCompiler.class).to(RowExpressionPredicateCompiler.class).in(Scopes.SINGLETON);
    binder.bind(DeterminismEvaluator.class).to(RowExpressionDeterminismEvaluator.class).in(Scopes.SINGLETON);
    // type
    binder.bind(TypeManager.class).to(FunctionAndTypeManager.class).in(Scopes.SINGLETON);
    jsonBinder(binder).addDeserializerBinding(Type.class).to(TypeDeserializer.class);
    newSetBinder(binder, Type.class);
    // plan
    jsonBinder(binder).addKeySerializerBinding(VariableReferenceExpression.class).to(VariableReferenceExpressionSerializer.class);
    jsonBinder(binder).addKeyDeserializerBinding(VariableReferenceExpression.class).to(VariableReferenceExpressionDeserializer.class);
    // split manager
    binder.bind(SplitManager.class).in(Scopes.SINGLETON);
    // partitioning provider manager
    binder.bind(PartitioningProviderManager.class).in(Scopes.SINGLETON);
    // node partitioning manager
    binder.bind(NodePartitioningManager.class).in(Scopes.SINGLETON);
    // connector plan optimizer manager
    binder.bind(ConnectorPlanOptimizerManager.class).in(Scopes.SINGLETON);
    // index manager
    binder.bind(IndexManager.class).in(Scopes.SINGLETON);
    // handle resolver
    binder.install(new HandleJsonModule());
    binder.bind(ObjectMapper.class).toProvider(JsonObjectMapperProvider.class);
    // connector
    binder.bind(ScalarStatsCalculator.class).in(Scopes.SINGLETON);
    binder.bind(StatsNormalizer.class).in(Scopes.SINGLETON);
    binder.bind(FilterStatsCalculator.class).in(Scopes.SINGLETON);
    binder.bind(ConnectorManager.class).in(Scopes.SINGLETON);
    // system connector
    binder.install(new SystemConnectorModule());
    // splits
    jsonCodecBinder(binder).bindJsonCodec(TaskUpdateRequest.class);
    jsonCodecBinder(binder).bindJsonCodec(ConnectorSplit.class);
    jsonCodecBinder(binder).bindJsonCodec(PlanFragment.class);
    smileCodecBinder(binder).bindSmileCodec(TaskUpdateRequest.class);
    smileCodecBinder(binder).bindSmileCodec(ConnectorSplit.class);
    smileCodecBinder(binder).bindSmileCodec(PlanFragment.class);
    jsonBinder(binder).addSerializerBinding(Slice.class).to(SliceSerializer.class);
    jsonBinder(binder).addDeserializerBinding(Slice.class).to(SliceDeserializer.class);
    jsonBinder(binder).addSerializerBinding(Expression.class).to(ExpressionSerializer.class);
    jsonBinder(binder).addDeserializerBinding(Expression.class).to(ExpressionDeserializer.class);
    jsonBinder(binder).addDeserializerBinding(FunctionCall.class).to(FunctionCallDeserializer.class);
    // metadata updates
    jsonCodecBinder(binder).bindJsonCodec(MetadataUpdates.class);
    smileCodecBinder(binder).bindSmileCodec(MetadataUpdates.class);
    // split monitor
    binder.bind(SplitMonitor.class).in(Scopes.SINGLETON);
    // Determine the NodeVersion
    NodeVersion nodeVersion = new NodeVersion(serverConfig.getPrestoVersion());
    binder.bind(NodeVersion.class).toInstance(nodeVersion);
    // presto announcement
    checkArgument(!(serverConfig.isResourceManager() && serverConfig.isCoordinator()), "Server cannot be configured as both resource manager and coordinator");
    discoveryBinder(binder).bindHttpAnnouncement("presto").addProperty("node_version", nodeVersion.toString()).addProperty("coordinator", String.valueOf(serverConfig.isCoordinator())).addProperty("resource_manager", String.valueOf(serverConfig.isResourceManager())).addProperty("connectorIds", nullToEmpty(serverConfig.getDataSources()));
    // server info resource
    jaxrsBinder(binder).bind(ServerInfoResource.class);
    jsonCodecBinder(binder).bindJsonCodec(ServerInfo.class);
    // node status resource
    jaxrsBinder(binder).bind(StatusResource.class);
    jsonCodecBinder(binder).bindJsonCodec(NodeStatus.class);
    // plugin manager
    binder.bind(PluginManager.class).in(Scopes.SINGLETON);
    configBinder(binder).bindConfig(PluginManagerConfig.class);
    binder.bind(CatalogManager.class).in(Scopes.SINGLETON);
    // block encodings
    binder.bind(BlockEncodingManager.class).in(Scopes.SINGLETON);
    binder.bind(BlockEncodingSerde.class).to(BlockEncodingManager.class).in(Scopes.SINGLETON);
    newSetBinder(binder, BlockEncoding.class);
    jsonBinder(binder).addSerializerBinding(Block.class).to(BlockJsonSerde.Serializer.class);
    jsonBinder(binder).addDeserializerBinding(Block.class).to(BlockJsonSerde.Deserializer.class);
    // thread visualizer
    jaxrsBinder(binder).bind(ThreadResource.class);
    // PageSorter
    binder.bind(PageSorter.class).to(PagesIndexPageSorter.class).in(Scopes.SINGLETON);
    // PageIndexer
    binder.bind(PageIndexerFactory.class).to(GroupByHashPageIndexerFactory.class).in(Scopes.SINGLETON);
    // Finalizer
    binder.bind(FinalizerService.class).in(Scopes.SINGLETON);
    // Spiller
    binder.bind(SpillerFactory.class).to(GenericSpillerFactory.class).in(Scopes.SINGLETON);
    binder.bind(StandaloneSpillerFactory.class).to(TempStorageStandaloneSpillerFactory.class).in(Scopes.SINGLETON);
    binder.bind(PartitioningSpillerFactory.class).to(GenericPartitioningSpillerFactory.class).in(Scopes.SINGLETON);
    binder.bind(SpillerStats.class).in(Scopes.SINGLETON);
    newExporter(binder).export(SpillerFactory.class).withGeneratedName();
    binder.bind(LocalSpillManager.class).in(Scopes.SINGLETON);
    configBinder(binder).bindConfig(NodeSpillConfig.class);
    install(installModuleIf(FeaturesConfig.class, config -> config.getSingleStreamSpillerChoice() == SingleStreamSpillerChoice.LOCAL_FILE, moduleBinder -> moduleBinder.bind(SingleStreamSpillerFactory.class).to(FileSingleStreamSpillerFactory.class).in(Scopes.SINGLETON)));
    install(installModuleIf(FeaturesConfig.class, config -> config.getSingleStreamSpillerChoice() == SingleStreamSpillerChoice.TEMP_STORAGE, moduleBinder -> moduleBinder.bind(SingleStreamSpillerFactory.class).to(TempStorageSingleStreamSpillerFactory.class).in(Scopes.SINGLETON)));
    // Thrift RPC
    binder.install(new DriftNettyServerModule());
    driftServerBinder(binder).bindService(ThriftTaskService.class);
    driftServerBinder(binder).bindService(ThriftServerInfoService.class);
    // Async page transport
    newMapBinder(binder, String.class, Servlet.class, TheServlet.class).addBinding("/v1/task/async/*").to(AsyncPageTransportServlet.class).in(Scopes.SINGLETON);
    // cleanup
    binder.bind(ExecutorCleanup.class).in(Scopes.SINGLETON);
    // Distributed tracing
    configBinder(binder).bindConfig(TracingConfig.class);
    install(installModuleIf(TracingConfig.class, config -> !config.getEnableDistributedTracing() || NOOP.equalsIgnoreCase(config.getTracerType()), moduleBinder -> moduleBinder.bind(TracerProvider.class).to(NoopTracerProvider.class).in(Scopes.SINGLETON)));
    install(installModuleIf(TracingConfig.class, config -> config.getEnableDistributedTracing() && SIMPLE.equalsIgnoreCase(config.getTracerType()), moduleBinder -> moduleBinder.bind(TracerProvider.class).to(SimpleTracerProvider.class).in(Scopes.SINGLETON)));
    // Optional Status Detector
    newOptionalBinder(binder, NodeStatusService.class);
}
Also used : RowExpressionDomainTranslator(com.facebook.presto.sql.relational.RowExpressionDomainTranslator) JaxrsBinder.jaxrsBinder(com.facebook.airlift.jaxrs.JaxrsBinder.jaxrsBinder) AddressSelector(com.facebook.drift.client.address.AddressSelector) TaskStatus(com.facebook.presto.execution.TaskStatus) NodeSelectionStats(com.facebook.presto.execution.scheduler.nodeSelection.NodeSelectionStats) ConnectorPlanOptimizerManager(com.facebook.presto.sql.planner.ConnectorPlanOptimizerManager) ColumnPropertyManager(com.facebook.presto.metadata.ColumnPropertyManager) InternalNodeManager(com.facebook.presto.metadata.InternalNodeManager) DriftNettyClientModule(com.facebook.drift.transport.netty.client.DriftNettyClientModule) LocalMemoryManager(com.facebook.presto.memory.LocalMemoryManager) FragmentResultCacheManager(com.facebook.presto.operator.FragmentResultCacheManager) PageFunctionCompiler(com.facebook.presto.sql.gen.PageFunctionCompiler) DiscoveryNodeManager(com.facebook.presto.metadata.DiscoveryNodeManager) PageSinkManager(com.facebook.presto.split.PageSinkManager) Servlet(javax.servlet.Servlet) FlatNetworkTopology(com.facebook.presto.execution.scheduler.FlatNetworkTopology) StandaloneSpillerFactory(com.facebook.presto.spiller.StandaloneSpillerFactory) DomainTranslator(com.facebook.presto.spi.relation.DomainTranslator) ResourceManagerClient(com.facebook.presto.resourcemanager.ResourceManagerClient) ExpressionDeserializer(com.facebook.presto.sql.Serialization.ExpressionDeserializer) FLAT(com.facebook.presto.execution.scheduler.NodeSchedulerConfig.NetworkTopologyType.FLAT) RowExpressionPredicateCompiler(com.facebook.presto.sql.gen.RowExpressionPredicateCompiler) FragmentCacheStats(com.facebook.presto.operator.FragmentCacheStats) LocalSpillManager(com.facebook.presto.spiller.LocalSpillManager) SystemSessionProperties(com.facebook.presto.SystemSessionProperties) NOOP(com.facebook.presto.tracing.TracingConfig.TracerType.NOOP) ViewDefinition(com.facebook.presto.metadata.ViewDefinition) TempStorageSingleStreamSpillerFactory(com.facebook.presto.spiller.TempStorageSingleStreamSpillerFactory) MEGABYTE(io.airlift.units.DataSize.Unit.MEGABYTE) VariableReferenceExpressionDeserializer(com.facebook.presto.sql.Serialization.VariableReferenceExpressionDeserializer) MemoryResource(com.facebook.presto.memory.MemoryResource) ReservedSystemMemoryConfig(com.facebook.presto.memory.ReservedSystemMemoryConfig) LookupJoinOperators(com.facebook.presto.operator.LookupJoinOperators) StaticCatalogStore(com.facebook.presto.metadata.StaticCatalogStore) RandomResourceManagerAddressSelector(com.facebook.presto.resourcemanager.RandomResourceManagerAddressSelector) Binder(com.google.inject.Binder) GenericSpillerFactory(com.facebook.presto.spiller.GenericSpillerFactory) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) DefaultThriftCodecsModule(com.facebook.drift.codec.utils.DefaultThriftCodecsModule) ExceptionClassification(com.facebook.drift.client.ExceptionClassification) AnalyzePropertyManager(com.facebook.presto.metadata.AnalyzePropertyManager) IndexJoinLookupStats(com.facebook.presto.operator.index.IndexJoinLookupStats) TableCommitContext(com.facebook.presto.operator.TableCommitContext) SystemConnectorModule(com.facebook.presto.connector.system.SystemConnectorModule) SqlEnvironmentConfig(com.facebook.presto.sql.SqlEnvironmentConfig) MultilevelSplitQueue(com.facebook.presto.execution.executor.MultilevelSplitQueue) StaticCatalogStoreConfig(com.facebook.presto.metadata.StaticCatalogStoreConfig) StaticFunctionNamespaceStore(com.facebook.presto.metadata.StaticFunctionNamespaceStore) SpillerFactory(com.facebook.presto.spiller.SpillerFactory) TheServlet(com.facebook.airlift.http.server.TheServlet) TaskInfo(com.facebook.presto.execution.TaskInfo) Metadata(com.facebook.presto.metadata.Metadata) ThriftCodecBinder.thriftCodecBinder(com.facebook.drift.codec.guice.ThriftCodecBinder.thriftCodecBinder) LocalExecutionPlanner(com.facebook.presto.sql.planner.LocalExecutionPlanner) TablePropertyManager(com.facebook.presto.metadata.TablePropertyManager) SqlParserOptions(com.facebook.presto.sql.parser.SqlParserOptions) Inject(com.google.inject.Inject) BlockEncoding(com.facebook.presto.common.block.BlockEncoding) TaskManagerConfig(com.facebook.presto.execution.TaskManagerConfig) Duration(io.airlift.units.Duration) MemoryRevokingScheduler(com.facebook.presto.execution.MemoryRevokingScheduler) MemoryPoolAssignmentsRequest(com.facebook.presto.memory.MemoryPoolAssignmentsRequest) Preconditions.checkArgument(com.google.common.base.Preconditions.checkArgument) ThriftServerInfoService(com.facebook.presto.server.thrift.ThriftServerInfoService) AbstractConfigurationAwareModule(com.facebook.airlift.configuration.AbstractConfigurationAwareModule) ConnectorManager(com.facebook.presto.connector.ConnectorManager) HttpClientBinder.httpClientBinder(com.facebook.airlift.http.client.HttpClientBinder.httpClientBinder) ExportBinder.newExporter(org.weakref.jmx.guice.ExportBinder.newExporter) DOWN(com.facebook.drift.client.ExceptionClassification.HostStatus.DOWN) OptionalBinder.newOptionalBinder(com.google.inject.multibindings.OptionalBinder.newOptionalBinder) FunctionCall(com.facebook.presto.sql.tree.FunctionCall) FileFragmentResultCacheManager(com.facebook.presto.operator.FileFragmentResultCacheManager) StatsNormalizer(com.facebook.presto.cost.StatsNormalizer) ForResourceManager(com.facebook.presto.resourcemanager.ForResourceManager) SIMPLE(com.facebook.presto.tracing.TracingConfig.TracerType.SIMPLE) MetadataUpdates(com.facebook.presto.metadata.MetadataUpdates) ForExchange(com.facebook.presto.operator.ForExchange) ConditionalModule.installModuleIf(com.facebook.airlift.configuration.ConditionalModule.installModuleIf) JsonBinder.jsonBinder(com.facebook.airlift.json.JsonBinder.jsonBinder) NodeSpillConfig(com.facebook.presto.spiller.NodeSpillConfig) SplitManager(com.facebook.presto.split.SplitManager) TransactionManagerConfig(com.facebook.presto.transaction.TransactionManagerConfig) PredicateCompiler(com.facebook.presto.spi.relation.PredicateCompiler) ExpressionCompiler(com.facebook.presto.sql.gen.ExpressionCompiler) NodeStatusService(com.facebook.presto.statusservice.NodeStatusService) MoreExecutors.listeningDecorator(com.google.common.util.concurrent.MoreExecutors.listeningDecorator) DeterminismEvaluator(com.facebook.presto.spi.relation.DeterminismEvaluator) VariableReferenceExpressionSerializer(com.facebook.presto.sql.Serialization.VariableReferenceExpressionSerializer) Strings.nullToEmpty(com.google.common.base.Strings.nullToEmpty) SimpleTtlNodeSelectorConfig(com.facebook.presto.execution.scheduler.nodeSelection.SimpleTtlNodeSelectorConfig) PageSinkProvider(com.facebook.presto.split.PageSinkProvider) RowExpressionDeterminismEvaluator(com.facebook.presto.sql.relational.RowExpressionDeterminismEvaluator) MemoryInfo(com.facebook.presto.memory.MemoryInfo) BlockEncodingSerde(com.facebook.presto.common.block.BlockEncodingSerde) LegacyNetworkTopology(com.facebook.presto.execution.scheduler.LegacyNetworkTopology) ImmutableList(com.google.common.collect.ImmutableList) PageSourceManager(com.facebook.presto.split.PageSourceManager) PlanChecker(com.facebook.presto.sql.planner.sanity.PlanChecker) TaskManager(com.facebook.presto.execution.TaskManager) ResourceManagerInconsistentException(com.facebook.presto.resourcemanager.ResourceManagerInconsistentException) IndexManager(com.facebook.presto.index.IndexManager) SingleStreamSpillerFactory(com.facebook.presto.spiller.SingleStreamSpillerFactory) SessionPropertyManager(com.facebook.presto.metadata.SessionPropertyManager) Type(com.facebook.presto.common.type.Type) ExecutorService(java.util.concurrent.ExecutorService) SimpleTracerProvider(com.facebook.presto.tracing.SimpleTracerProvider) MapBinder.newMapBinder(com.google.inject.multibindings.MapBinder.newMapBinder) SplitMonitor(com.facebook.presto.event.SplitMonitor) ResourceManagerClusterStatusSender(com.facebook.presto.resourcemanager.ResourceManagerClusterStatusSender) ExchangeClientSupplier(com.facebook.presto.operator.ExchangeClientSupplier) JoinFilterFunctionCompiler(com.facebook.presto.sql.gen.JoinFilterFunctionCompiler) SingleStreamSpillerChoice(com.facebook.presto.sql.analyzer.FeaturesConfig.SingleStreamSpillerChoice) Executors.newFixedThreadPool(java.util.concurrent.Executors.newFixedThreadPool) CatalogManager(com.facebook.presto.metadata.CatalogManager) SmileCodecBinder.smileCodecBinder(com.facebook.airlift.json.smile.SmileCodecBinder.smileCodecBinder) Provides(com.google.inject.Provides) Expression(com.facebook.presto.sql.tree.Expression) ThriftTaskService(com.facebook.presto.server.thrift.ThriftTaskService) ConfigBinder.configBinder(com.facebook.airlift.configuration.ConfigBinder.configBinder) DiscoveryBinder.discoveryBinder(com.facebook.airlift.discovery.client.DiscoveryBinder.discoveryBinder) ClusterMemoryManagerService(com.facebook.presto.resourcemanager.ClusterMemoryManagerService) ThriftServerInfoClient(com.facebook.presto.server.thrift.ThriftServerInfoClient) GcStatusMonitor(com.facebook.presto.util.GcStatusMonitor) PageSourceProvider(com.facebook.presto.split.PageSourceProvider) ConcurrentScheduledExecutor.createConcurrentScheduledExecutor(com.facebook.airlift.concurrent.ConcurrentScheduledExecutor.createConcurrentScheduledExecutor) SqlInvokedFunction(com.facebook.presto.spi.function.SqlInvokedFunction) ForNodeManager(com.facebook.presto.metadata.ForNodeManager) OperatorStats(com.facebook.presto.operator.OperatorStats) StageInfo(com.facebook.presto.execution.StageInfo) NoOpFragmentResultCacheManager(com.facebook.presto.operator.NoOpFragmentResultCacheManager) FinalizerService(com.facebook.presto.util.FinalizerService) Executors.newScheduledThreadPool(java.util.concurrent.Executors.newScheduledThreadPool) JsonObjectMapperProvider(com.facebook.airlift.json.JsonObjectMapperProvider) Multibinder.newSetBinder(com.google.inject.multibindings.Multibinder.newSetBinder) QueryManagerConfig(com.facebook.presto.execution.QueryManagerConfig) ScalarStatsCalculator(com.facebook.presto.cost.ScalarStatsCalculator) EmbedVersion(com.facebook.presto.version.EmbedVersion) DriftClientBinder.driftClientBinder(com.facebook.drift.client.guice.DriftClientBinder.driftClientBinder) GenericPartitioningSpillerFactory(com.facebook.presto.spiller.GenericPartitioningSpillerFactory) TracerProvider(com.facebook.presto.spi.tracing.TracerProvider) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) ClusterStatusSender(com.facebook.presto.resourcemanager.ClusterStatusSender) TaskMemoryReservationSummary(com.facebook.presto.operator.TaskMemoryReservationSummary) JmxGcMonitor(com.facebook.airlift.stats.JmxGcMonitor) ListeningExecutorService(com.google.common.util.concurrent.ListeningExecutorService) Slice(io.airlift.slice.Slice) ResourceGroupService(com.facebook.presto.resourcemanager.ResourceGroupService) NoopResourceGroupService(com.facebook.presto.resourcemanager.NoopResourceGroupService) SqlTaskManager(com.facebook.presto.execution.SqlTaskManager) BlockEncodingManager(com.facebook.presto.common.block.BlockEncodingManager) StaticFunctionNamespaceStoreConfig(com.facebook.presto.metadata.StaticFunctionNamespaceStoreConfig) ExchangeClientFactory(com.facebook.presto.operator.ExchangeClientFactory) PageSorter(com.facebook.presto.spi.PageSorter) SpoolingOutputBufferFactory(com.facebook.presto.execution.buffer.SpoolingOutputBufferFactory) NetworkTopology(com.facebook.presto.execution.scheduler.NetworkTopology) LocationFactory(com.facebook.presto.execution.LocationFactory) ResourceManagerConfig(com.facebook.presto.resourcemanager.ResourceManagerConfig) ConnectorSplit(com.facebook.presto.spi.ConnectorSplit) TracingConfig(com.facebook.presto.tracing.TracingConfig) PartitioningProviderManager(com.facebook.presto.sql.planner.PartitioningProviderManager) FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) PartitioningSpillerFactory(com.facebook.presto.spiller.PartitioningSpillerFactory) Module(com.google.inject.Module) NodeTaskMap(com.facebook.presto.execution.NodeTaskMap) MetadataManager(com.facebook.presto.metadata.MetadataManager) Key(com.google.inject.Key) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) NodeVersion(com.facebook.presto.client.NodeVersion) NORMAL(com.facebook.drift.client.ExceptionClassification.HostStatus.NORMAL) NodeScheduler(com.facebook.presto.execution.scheduler.NodeScheduler) FileSingleStreamSpillerFactory(com.facebook.presto.spiller.FileSingleStreamSpillerFactory) PagesIndex(com.facebook.presto.operator.PagesIndex) TempStorageStandaloneSpillerFactory(com.facebook.presto.spiller.TempStorageStandaloneSpillerFactory) PreDestroy(javax.annotation.PreDestroy) PlanFragment(com.facebook.presto.sql.planner.PlanFragment) GcMonitor(com.facebook.airlift.stats.GcMonitor) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) PageIndexerFactory(com.facebook.presto.spi.PageIndexerFactory) ConnectorMetadataUpdaterManager(com.facebook.presto.metadata.ConnectorMetadataUpdaterManager) FilterStatsCalculator(com.facebook.presto.cost.FilterStatsCalculator) TaskManagementExecutor(com.facebook.presto.execution.TaskManagementExecutor) TaskThresholdMemoryRevokingScheduler(com.facebook.presto.execution.TaskThresholdMemoryRevokingScheduler) NodeMemoryConfig(com.facebook.presto.memory.NodeMemoryConfig) NodeSchedulerExporter(com.facebook.presto.execution.scheduler.NodeSchedulerExporter) FixedAddressSelector(com.facebook.presto.server.thrift.FixedAddressSelector) LEGACY(com.facebook.presto.execution.scheduler.NodeSchedulerConfig.NetworkTopologyType.LEGACY) SchemaPropertyManager(com.facebook.presto.metadata.SchemaPropertyManager) LinkedBlockingQueue(java.util.concurrent.LinkedBlockingQueue) DriftServerBinder.driftServerBinder(com.facebook.drift.server.guice.DriftServerBinder.driftServerBinder) SqlParser(com.facebook.presto.sql.parser.SqlParser) ExchangeClientConfig(com.facebook.presto.operator.ExchangeClientConfig) Threads.daemonThreadsNamed(com.facebook.airlift.concurrent.Threads.daemonThreadsNamed) DataSize(io.airlift.units.DataSize) List(java.util.List) TaskExecutor(com.facebook.presto.execution.executor.TaskExecutor) Optional(java.util.Optional) NodeSchedulerConfig(com.facebook.presto.execution.scheduler.NodeSchedulerConfig) SpillerStats(com.facebook.presto.spiller.SpillerStats) ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor) ExecutionFailureInfo(com.facebook.presto.execution.ExecutionFailureInfo) Singleton(javax.inject.Singleton) JsonCodecBinder.jsonCodecBinder(com.facebook.airlift.json.JsonCodecBinder.jsonCodecBinder) PauseMeter(com.facebook.airlift.stats.PauseMeter) BlockJsonSerde(com.facebook.presto.block.BlockJsonSerde) HttpLocationFactory(com.facebook.presto.server.remotetask.HttpLocationFactory) BoundedExecutor(com.facebook.airlift.concurrent.BoundedExecutor) OrderingCompiler(com.facebook.presto.sql.gen.OrderingCompiler) TypeManager(com.facebook.presto.common.type.TypeManager) LocalMemoryManagerExporter(com.facebook.presto.memory.LocalMemoryManagerExporter) FileFragmentResultCacheConfig(com.facebook.presto.operator.FileFragmentResultCacheConfig) Objects.requireNonNull(java.util.Objects.requireNonNull) ExplainAnalyzeContext(com.facebook.presto.execution.ExplainAnalyzeContext) ResourceManagerResourceGroupService(com.facebook.presto.resourcemanager.ResourceManagerResourceGroupService) MemoryManagerConfig(com.facebook.presto.memory.MemoryManagerConfig) FunctionCallDeserializer(com.facebook.presto.sql.Serialization.FunctionCallDeserializer) PagesIndexPageSorter(com.facebook.presto.PagesIndexPageSorter) NoopTracerProvider(com.facebook.presto.tracing.NoopTracerProvider) NodePartitioningManager(com.facebook.presto.sql.planner.NodePartitioningManager) ThriftTaskClient(com.facebook.presto.server.thrift.ThriftTaskClient) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Scopes(com.google.inject.Scopes) CompilerConfig(com.facebook.presto.sql.planner.CompilerConfig) DriftNettyServerModule(com.facebook.drift.transport.netty.server.DriftNettyServerModule) TypeDeserializer(com.facebook.presto.type.TypeDeserializer) Executors.newCachedThreadPool(java.util.concurrent.Executors.newCachedThreadPool) ExpressionSerializer(com.facebook.presto.sql.Serialization.ExpressionSerializer) GroupByHashPageIndexerFactory(com.facebook.presto.GroupByHashPageIndexerFactory) Block(com.facebook.presto.common.block.Block) ServerInfo(com.facebook.presto.client.ServerInfo) JoinCompiler(com.facebook.presto.sql.gen.JoinCompiler) SECONDS(java.util.concurrent.TimeUnit.SECONDS) ExceptionClassification(com.facebook.drift.client.ExceptionClassification) ResourceManagerResourceGroupService(com.facebook.presto.resourcemanager.ResourceManagerResourceGroupService) RowExpressionPredicateCompiler(com.facebook.presto.sql.gen.RowExpressionPredicateCompiler) NodeVersion(com.facebook.presto.client.NodeVersion) FunctionAndTypeManager(com.facebook.presto.metadata.FunctionAndTypeManager) DefaultThriftCodecsModule(com.facebook.drift.codec.utils.DefaultThriftCodecsModule) JoinCompiler(com.facebook.presto.sql.gen.JoinCompiler) GenericPartitioningSpillerFactory(com.facebook.presto.spiller.GenericPartitioningSpillerFactory) StaticFunctionNamespaceStore(com.facebook.presto.metadata.StaticFunctionNamespaceStore) ResourceManagerClusterStatusSender(com.facebook.presto.resourcemanager.ResourceManagerClusterStatusSender) ResourceManagerConfig(com.facebook.presto.resourcemanager.ResourceManagerConfig) BlockJsonSerde(com.facebook.presto.block.BlockJsonSerde) MultilevelSplitQueue(com.facebook.presto.execution.executor.MultilevelSplitQueue) LegacyNetworkTopology(com.facebook.presto.execution.scheduler.LegacyNetworkTopology) DriftNettyClientModule(com.facebook.drift.transport.netty.client.DriftNettyClientModule) DefaultThriftCodecsModule(com.facebook.drift.codec.utils.DefaultThriftCodecsModule) SystemConnectorModule(com.facebook.presto.connector.system.SystemConnectorModule) AbstractConfigurationAwareModule(com.facebook.airlift.configuration.AbstractConfigurationAwareModule) Module(com.google.inject.Module) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) DriftNettyServerModule(com.facebook.drift.transport.netty.server.DriftNettyServerModule) DriftNettyServerModule(com.facebook.drift.transport.netty.server.DriftNettyServerModule) ScalarStatsCalculator(com.facebook.presto.cost.ScalarStatsCalculator) ForNodeManager(com.facebook.presto.metadata.ForNodeManager) NodeSchedulerConfig(com.facebook.presto.execution.scheduler.NodeSchedulerConfig) TempStorageStandaloneSpillerFactory(com.facebook.presto.spiller.TempStorageStandaloneSpillerFactory) PagesIndex(com.facebook.presto.operator.PagesIndex) JaxrsBinder.jaxrsBinder(com.facebook.airlift.jaxrs.JaxrsBinder.jaxrsBinder) Binder(com.google.inject.Binder) ThriftCodecBinder.thriftCodecBinder(com.facebook.drift.codec.guice.ThriftCodecBinder.thriftCodecBinder) HttpClientBinder.httpClientBinder(com.facebook.airlift.http.client.HttpClientBinder.httpClientBinder) OptionalBinder.newOptionalBinder(com.google.inject.multibindings.OptionalBinder.newOptionalBinder) JsonBinder.jsonBinder(com.facebook.airlift.json.JsonBinder.jsonBinder) MapBinder.newMapBinder(com.google.inject.multibindings.MapBinder.newMapBinder) SmileCodecBinder.smileCodecBinder(com.facebook.airlift.json.smile.SmileCodecBinder.smileCodecBinder) ConfigBinder.configBinder(com.facebook.airlift.configuration.ConfigBinder.configBinder) DiscoveryBinder.discoveryBinder(com.facebook.airlift.discovery.client.DiscoveryBinder.discoveryBinder) Multibinder.newSetBinder(com.google.inject.multibindings.Multibinder.newSetBinder) DriftClientBinder.driftClientBinder(com.facebook.drift.client.guice.DriftClientBinder.driftClientBinder) DriftServerBinder.driftServerBinder(com.facebook.drift.server.guice.DriftServerBinder.driftServerBinder) JsonCodecBinder.jsonCodecBinder(com.facebook.airlift.json.JsonCodecBinder.jsonCodecBinder) RandomResourceManagerAddressSelector(com.facebook.presto.resourcemanager.RandomResourceManagerAddressSelector) LocalMemoryManager(com.facebook.presto.memory.LocalMemoryManager) Servlet(javax.servlet.Servlet) TheServlet(com.facebook.airlift.http.server.TheServlet) SystemConnectorModule(com.facebook.presto.connector.system.SystemConnectorModule) FunctionCall(com.facebook.presto.sql.tree.FunctionCall) EmbedVersion(com.facebook.presto.version.EmbedVersion) LookupJoinOperators(com.facebook.presto.operator.LookupJoinOperators) PageSinkManager(com.facebook.presto.split.PageSinkManager) RowExpressionDeterminismEvaluator(com.facebook.presto.sql.relational.RowExpressionDeterminismEvaluator) ConnectorPlanOptimizerManager(com.facebook.presto.sql.planner.ConnectorPlanOptimizerManager) StatsNormalizer(com.facebook.presto.cost.StatsNormalizer) SimpleTracerProvider(com.facebook.presto.tracing.SimpleTracerProvider) FlatNetworkTopology(com.facebook.presto.execution.scheduler.FlatNetworkTopology) JoinFilterFunctionCompiler(com.facebook.presto.sql.gen.JoinFilterFunctionCompiler) NodeSchedulerExporter(com.facebook.presto.execution.scheduler.NodeSchedulerExporter) RowExpressionDomainTranslator(com.facebook.presto.sql.relational.RowExpressionDomainTranslator) TempStorageSingleStreamSpillerFactory(com.facebook.presto.spiller.TempStorageSingleStreamSpillerFactory) ConnectorManager(com.facebook.presto.connector.ConnectorManager) CatalogManager(com.facebook.presto.metadata.CatalogManager) Type(com.facebook.presto.common.type.Type) Expression(com.facebook.presto.sql.tree.Expression) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) FinalizerService(com.facebook.presto.util.FinalizerService) TaskManagementExecutor(com.facebook.presto.execution.TaskManagementExecutor) MemoryRevokingScheduler(com.facebook.presto.execution.MemoryRevokingScheduler) TaskThresholdMemoryRevokingScheduler(com.facebook.presto.execution.TaskThresholdMemoryRevokingScheduler) ConnectorMetadataUpdaterManager(com.facebook.presto.metadata.ConnectorMetadataUpdaterManager) TablePropertyManager(com.facebook.presto.metadata.TablePropertyManager) TheServlet(com.facebook.airlift.http.server.TheServlet) PageSourceManager(com.facebook.presto.split.PageSourceManager) PagesIndexPageSorter(com.facebook.presto.PagesIndexPageSorter) ExchangeClientFactory(com.facebook.presto.operator.ExchangeClientFactory) FileSingleStreamSpillerFactory(com.facebook.presto.spiller.FileSingleStreamSpillerFactory) DriftNettyClientModule(com.facebook.drift.transport.netty.client.DriftNettyClientModule) DataSize(io.airlift.units.DataSize) SessionPropertyManager(com.facebook.presto.metadata.SessionPropertyManager) OrderingCompiler(com.facebook.presto.sql.gen.OrderingCompiler) NodeScheduler(com.facebook.presto.execution.scheduler.NodeScheduler) TaskThresholdMemoryRevokingScheduler(com.facebook.presto.execution.TaskThresholdMemoryRevokingScheduler) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) SqlParserOptions(com.facebook.presto.sql.parser.SqlParserOptions) ClusterMemoryManagerService(com.facebook.presto.resourcemanager.ClusterMemoryManagerService) ForExchange(com.facebook.presto.operator.ForExchange) ThriftTaskClient(com.facebook.presto.server.thrift.ThriftTaskClient) IndexJoinLookupStats(com.facebook.presto.operator.index.IndexJoinLookupStats) StaticCatalogStore(com.facebook.presto.metadata.StaticCatalogStore) NodeTaskMap(com.facebook.presto.execution.NodeTaskMap) SplitMonitor(com.facebook.presto.event.SplitMonitor) HttpLocationFactory(com.facebook.presto.server.remotetask.HttpLocationFactory) SqlParser(com.facebook.presto.sql.parser.SqlParser) NoopTracerProvider(com.facebook.presto.tracing.NoopTracerProvider) Duration(io.airlift.units.Duration) PauseMeter(com.facebook.airlift.stats.PauseMeter) SpillerStats(com.facebook.presto.spiller.SpillerStats) IndexManager(com.facebook.presto.index.IndexManager) LocalSpillManager(com.facebook.presto.spiller.LocalSpillManager) SqlTaskManager(com.facebook.presto.execution.SqlTaskManager) TaskExecutor(com.facebook.presto.execution.executor.TaskExecutor) GcStatusMonitor(com.facebook.presto.util.GcStatusMonitor) BlockEncodingManager(com.facebook.presto.common.block.BlockEncodingManager) NodeSelectionStats(com.facebook.presto.execution.scheduler.nodeSelection.NodeSelectionStats) PlanChecker(com.facebook.presto.sql.planner.sanity.PlanChecker) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) Slice(io.airlift.slice.Slice) Block(com.facebook.presto.common.block.Block) ExpressionCompiler(com.facebook.presto.sql.gen.ExpressionCompiler) SpoolingOutputBufferFactory(com.facebook.presto.execution.buffer.SpoolingOutputBufferFactory) GroupByHashPageIndexerFactory(com.facebook.presto.GroupByHashPageIndexerFactory) ColumnPropertyManager(com.facebook.presto.metadata.ColumnPropertyManager) PageFunctionCompiler(com.facebook.presto.sql.gen.PageFunctionCompiler) TracingConfig(com.facebook.presto.tracing.TracingConfig) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) PartitioningProviderManager(com.facebook.presto.sql.planner.PartitioningProviderManager) StandaloneSpillerFactory(com.facebook.presto.spiller.StandaloneSpillerFactory) TempStorageSingleStreamSpillerFactory(com.facebook.presto.spiller.TempStorageSingleStreamSpillerFactory) GenericSpillerFactory(com.facebook.presto.spiller.GenericSpillerFactory) SpillerFactory(com.facebook.presto.spiller.SpillerFactory) SingleStreamSpillerFactory(com.facebook.presto.spiller.SingleStreamSpillerFactory) GenericPartitioningSpillerFactory(com.facebook.presto.spiller.GenericPartitioningSpillerFactory) ExchangeClientFactory(com.facebook.presto.operator.ExchangeClientFactory) SpoolingOutputBufferFactory(com.facebook.presto.execution.buffer.SpoolingOutputBufferFactory) LocationFactory(com.facebook.presto.execution.LocationFactory) PartitioningSpillerFactory(com.facebook.presto.spiller.PartitioningSpillerFactory) FileSingleStreamSpillerFactory(com.facebook.presto.spiller.FileSingleStreamSpillerFactory) TempStorageStandaloneSpillerFactory(com.facebook.presto.spiller.TempStorageStandaloneSpillerFactory) PageIndexerFactory(com.facebook.presto.spi.PageIndexerFactory) HttpLocationFactory(com.facebook.presto.server.remotetask.HttpLocationFactory) GroupByHashPageIndexerFactory(com.facebook.presto.GroupByHashPageIndexerFactory) LocalMemoryManagerExporter(com.facebook.presto.memory.LocalMemoryManagerExporter) NodePartitioningManager(com.facebook.presto.sql.planner.NodePartitioningManager) ResourceGroupService(com.facebook.presto.resourcemanager.ResourceGroupService) NoopResourceGroupService(com.facebook.presto.resourcemanager.NoopResourceGroupService) ResourceManagerResourceGroupService(com.facebook.presto.resourcemanager.ResourceManagerResourceGroupService) ThriftServerInfoClient(com.facebook.presto.server.thrift.ThriftServerInfoClient) HandleJsonModule(com.facebook.presto.metadata.HandleJsonModule) SchemaPropertyManager(com.facebook.presto.metadata.SchemaPropertyManager) FragmentCacheStats(com.facebook.presto.operator.FragmentCacheStats) GenericSpillerFactory(com.facebook.presto.spiller.GenericSpillerFactory) AnalyzePropertyManager(com.facebook.presto.metadata.AnalyzePropertyManager) LocalExecutionPlanner(com.facebook.presto.sql.planner.LocalExecutionPlanner) FilterStatsCalculator(com.facebook.presto.cost.FilterStatsCalculator) StandaloneSpillerFactory(com.facebook.presto.spiller.StandaloneSpillerFactory) TempStorageSingleStreamSpillerFactory(com.facebook.presto.spiller.TempStorageSingleStreamSpillerFactory) GenericSpillerFactory(com.facebook.presto.spiller.GenericSpillerFactory) SpillerFactory(com.facebook.presto.spiller.SpillerFactory) SingleStreamSpillerFactory(com.facebook.presto.spiller.SingleStreamSpillerFactory) GenericPartitioningSpillerFactory(com.facebook.presto.spiller.GenericPartitioningSpillerFactory) PartitioningSpillerFactory(com.facebook.presto.spiller.PartitioningSpillerFactory) FileSingleStreamSpillerFactory(com.facebook.presto.spiller.FileSingleStreamSpillerFactory) TempStorageStandaloneSpillerFactory(com.facebook.presto.spiller.TempStorageStandaloneSpillerFactory) SplitManager(com.facebook.presto.split.SplitManager) TaskManager(com.facebook.presto.execution.TaskManager) SqlTaskManager(com.facebook.presto.execution.SqlTaskManager) MetadataManager(com.facebook.presto.metadata.MetadataManager) JmxGcMonitor(com.facebook.airlift.stats.JmxGcMonitor) ResourceManagerInconsistentException(com.facebook.presto.resourcemanager.ResourceManagerInconsistentException) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) ExecutorService(java.util.concurrent.ExecutorService) ListeningExecutorService(com.google.common.util.concurrent.ListeningExecutorService) ThreadPoolExecutor(java.util.concurrent.ThreadPoolExecutor) DiscoveryNodeManager(com.facebook.presto.metadata.DiscoveryNodeManager) SystemSessionProperties(com.facebook.presto.SystemSessionProperties)

Example 2 with NodePartitioningManager

use of com.facebook.presto.sql.planner.NodePartitioningManager in project presto by prestodb.

the class TaskTestUtils method createTestingPlanner.

public static LocalExecutionPlanner createTestingPlanner() {
    MetadataManager metadata = MetadataManager.createTestMetadataManager();
    PageSourceManager pageSourceManager = new PageSourceManager();
    pageSourceManager.addConnectorPageSourceProvider(CONNECTOR_ID, new TestingPageSourceProvider());
    // we don't start the finalizer so nothing will be collected, which is ok for a test
    FinalizerService finalizerService = new FinalizerService();
    NodeScheduler nodeScheduler = new NodeScheduler(new LegacyNetworkTopology(), new InMemoryNodeManager(), new NodeSelectionStats(), new NodeSchedulerConfig().setIncludeCoordinator(true), new NodeTaskMap(finalizerService), new ThrowingNodeTtlFetcherManager(), new NoOpQueryManager(), new SimpleTtlNodeSelectorConfig());
    PartitioningProviderManager partitioningProviderManager = new PartitioningProviderManager();
    NodePartitioningManager nodePartitioningManager = new NodePartitioningManager(nodeScheduler, partitioningProviderManager, new NodeSelectionStats());
    PageFunctionCompiler pageFunctionCompiler = new PageFunctionCompiler(metadata, 0);
    return new LocalExecutionPlanner(metadata, Optional.empty(), pageSourceManager, new IndexManager(), partitioningProviderManager, nodePartitioningManager, new PageSinkManager(), new ConnectorMetadataUpdaterManager(), new ExpressionCompiler(metadata, pageFunctionCompiler), pageFunctionCompiler, new JoinFilterFunctionCompiler(metadata), new IndexJoinLookupStats(), new TaskManagerConfig(), new MemoryManagerConfig(), new GenericSpillerFactory((types, spillContext, memoryContext) -> {
        throw new UnsupportedOperationException();
    }), (types, spillContext, memoryContext) -> {
        throw new UnsupportedOperationException();
    }, (types, partitionFunction, spillContext, memoryContext) -> {
        throw new UnsupportedOperationException();
    }, new BlockEncodingManager(), new PagesIndex.TestingFactory(false), new JoinCompiler(MetadataManager.createTestMetadataManager(), new FeaturesConfig()), new LookupJoinOperators(), new OrderingCompiler(), jsonCodec(TableCommitContext.class), new RowExpressionDeterminismEvaluator(metadata), new NoOpFragmentResultCacheManager(), new ObjectMapper(), (session) -> {
        throw new UnsupportedOperationException();
    });
}
Also used : WarningCollector(com.facebook.presto.spi.WarningCollector) LocalExecutionPlanner(com.facebook.presto.sql.planner.LocalExecutionPlanner) MetadataManager(com.facebook.presto.metadata.MetadataManager) VariableReferenceExpression(com.facebook.presto.spi.relation.VariableReferenceExpression) NodeSelectionStats(com.facebook.presto.execution.scheduler.nodeSelection.NodeSelectionStats) NodeScheduler(com.facebook.presto.execution.scheduler.NodeScheduler) EventListenerManager(com.facebook.presto.eventlistener.EventListenerManager) ConnectorTransactionHandle(com.facebook.presto.spi.connector.ConnectorTransactionHandle) TableWriteInfo(com.facebook.presto.execution.scheduler.TableWriteInfo) PagesIndex(com.facebook.presto.operator.PagesIndex) StageExecutionDescriptor(com.facebook.presto.operator.StageExecutionDescriptor) PlanFragment(com.facebook.presto.sql.planner.PlanFragment) ThrowingNodeTtlFetcherManager(com.facebook.presto.ttl.nodettlfetchermanagers.ThrowingNodeTtlFetcherManager) NoOpFragmentResultCacheManager(com.facebook.presto.operator.NoOpFragmentResultCacheManager) FinalizerService(com.facebook.presto.util.FinalizerService) JsonObjectMapperProvider(com.facebook.airlift.json.JsonObjectMapperProvider) PartitioningScheme(com.facebook.presto.sql.planner.PartitioningScheme) URI(java.net.URI) PageFunctionCompiler(com.facebook.presto.sql.gen.PageFunctionCompiler) ConnectorMetadataUpdaterManager(com.facebook.presto.metadata.ConnectorMetadataUpdaterManager) ImmutableSet(com.google.common.collect.ImmutableSet) PageSinkManager(com.facebook.presto.split.PageSinkManager) ImmutableMap(com.google.common.collect.ImmutableMap) ResourceGroupId(com.facebook.presto.spi.resourceGroups.ResourceGroupId) JsonCodec.jsonCodec(com.facebook.airlift.json.JsonCodec.jsonCodec) SOURCE_DISTRIBUTION(com.facebook.presto.sql.planner.SystemPartitioningHandle.SOURCE_DISTRIBUTION) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) List(java.util.List) Optional(java.util.Optional) ConnectorId(com.facebook.presto.spi.ConnectorId) AllowAllAccessControl(com.facebook.presto.security.AllowAllAccessControl) ExpressionCompiler(com.facebook.presto.sql.gen.ExpressionCompiler) NodeSchedulerConfig(com.facebook.presto.execution.scheduler.NodeSchedulerConfig) PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) OutputBuffers(com.facebook.presto.execution.buffer.OutputBuffers) SINGLE_DISTRIBUTION(com.facebook.presto.sql.planner.SystemPartitioningHandle.SINGLE_DISTRIBUTION) SimpleTtlNodeSelectorConfig(com.facebook.presto.execution.scheduler.nodeSelection.SimpleTtlNodeSelectorConfig) RowExpressionDeterminismEvaluator(com.facebook.presto.sql.relational.RowExpressionDeterminismEvaluator) LookupJoinOperators(com.facebook.presto.operator.LookupJoinOperators) NoOpQueryManager(com.facebook.presto.dispatcher.NoOpQueryManager) TestingSplit(com.facebook.presto.testing.TestingSplit) LegacyNetworkTopology(com.facebook.presto.execution.scheduler.LegacyNetworkTopology) TEST_SESSION(com.facebook.presto.SessionTestUtils.TEST_SESSION) ImmutableList(com.google.common.collect.ImmutableList) PageSourceManager(com.facebook.presto.split.PageSourceManager) OrderingCompiler(com.facebook.presto.sql.gen.OrderingCompiler) BlockEncodingManager(com.facebook.presto.common.block.BlockEncodingManager) GenericSpillerFactory(com.facebook.presto.spiller.GenericSpillerFactory) IndexManager(com.facebook.presto.index.IndexManager) TableHandle(com.facebook.presto.spi.TableHandle) MemoryManagerConfig(com.facebook.presto.memory.MemoryManagerConfig) PlanFragmentId(com.facebook.presto.sql.planner.plan.PlanFragmentId) IndexJoinLookupStats(com.facebook.presto.operator.index.IndexJoinLookupStats) TransactionManager(com.facebook.presto.transaction.TransactionManager) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager) Partitioning(com.facebook.presto.sql.planner.Partitioning) BIGINT(com.facebook.presto.common.type.BigintType.BIGINT) NodePartitioningManager(com.facebook.presto.sql.planner.NodePartitioningManager) TableCommitContext(com.facebook.presto.operator.TableCommitContext) SplitMonitor(com.facebook.presto.event.SplitMonitor) Executor(java.util.concurrent.Executor) Session(com.facebook.presto.Session) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) JoinFilterFunctionCompiler(com.facebook.presto.sql.gen.JoinFilterFunctionCompiler) TestingTransactionHandle(com.facebook.presto.testing.TestingTransactionHandle) TupleDomain(com.facebook.presto.common.predicate.TupleDomain) TestingColumnHandle(com.facebook.presto.testing.TestingMetadata.TestingColumnHandle) TableScanNode(com.facebook.presto.spi.plan.TableScanNode) StatsAndCosts(com.facebook.presto.cost.StatsAndCosts) Split(com.facebook.presto.metadata.Split) TestingTableHandle(com.facebook.presto.testing.TestingMetadata.TestingTableHandle) JoinCompiler(com.facebook.presto.sql.gen.JoinCompiler) PartitioningProviderManager(com.facebook.presto.sql.planner.PartitioningProviderManager) PageFunctionCompiler(com.facebook.presto.sql.gen.PageFunctionCompiler) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) PartitioningProviderManager(com.facebook.presto.sql.planner.PartitioningProviderManager) NodeSchedulerConfig(com.facebook.presto.execution.scheduler.NodeSchedulerConfig) TableCommitContext(com.facebook.presto.operator.TableCommitContext) PagesIndex(com.facebook.presto.operator.PagesIndex) PageSourceManager(com.facebook.presto.split.PageSourceManager) NodePartitioningManager(com.facebook.presto.sql.planner.NodePartitioningManager) NoOpFragmentResultCacheManager(com.facebook.presto.operator.NoOpFragmentResultCacheManager) OrderingCompiler(com.facebook.presto.sql.gen.OrderingCompiler) NodeScheduler(com.facebook.presto.execution.scheduler.NodeScheduler) GenericSpillerFactory(com.facebook.presto.spiller.GenericSpillerFactory) SimpleTtlNodeSelectorConfig(com.facebook.presto.execution.scheduler.nodeSelection.SimpleTtlNodeSelectorConfig) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) PageSinkManager(com.facebook.presto.split.PageSinkManager) LookupJoinOperators(com.facebook.presto.operator.LookupJoinOperators) JoinCompiler(com.facebook.presto.sql.gen.JoinCompiler) RowExpressionDeterminismEvaluator(com.facebook.presto.sql.relational.RowExpressionDeterminismEvaluator) LocalExecutionPlanner(com.facebook.presto.sql.planner.LocalExecutionPlanner) IndexJoinLookupStats(com.facebook.presto.operator.index.IndexJoinLookupStats) JoinFilterFunctionCompiler(com.facebook.presto.sql.gen.JoinFilterFunctionCompiler) MemoryManagerConfig(com.facebook.presto.memory.MemoryManagerConfig) ThrowingNodeTtlFetcherManager(com.facebook.presto.ttl.nodettlfetchermanagers.ThrowingNodeTtlFetcherManager) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager) IndexManager(com.facebook.presto.index.IndexManager) NoOpQueryManager(com.facebook.presto.dispatcher.NoOpQueryManager) MetadataManager(com.facebook.presto.metadata.MetadataManager) BlockEncodingManager(com.facebook.presto.common.block.BlockEncodingManager) NodeSelectionStats(com.facebook.presto.execution.scheduler.nodeSelection.NodeSelectionStats) FinalizerService(com.facebook.presto.util.FinalizerService) LegacyNetworkTopology(com.facebook.presto.execution.scheduler.LegacyNetworkTopology) ConnectorMetadataUpdaterManager(com.facebook.presto.metadata.ConnectorMetadataUpdaterManager) ExpressionCompiler(com.facebook.presto.sql.gen.ExpressionCompiler)

Example 3 with NodePartitioningManager

use of com.facebook.presto.sql.planner.NodePartitioningManager in project presto by prestodb.

the class TestCostCalculator method setUp.

@BeforeClass
public void setUp() {
    TaskCountEstimator taskCountEstimator = new TaskCountEstimator(() -> NUMBER_OF_NODES);
    costCalculatorUsingExchanges = new CostCalculatorUsingExchanges(taskCountEstimator);
    costCalculatorWithEstimatedExchanges = new CostCalculatorWithEstimatedExchanges(costCalculatorUsingExchanges, taskCountEstimator);
    session = testSessionBuilder().setCatalog("tpch").build();
    CatalogManager catalogManager = new CatalogManager();
    catalogManager.registerCatalog(createBogusTestingCatalog("tpch"));
    transactionManager = createTestTransactionManager(catalogManager);
    metadata = createTestMetadataManager(transactionManager, new FeaturesConfig());
    finalizerService = new FinalizerService();
    finalizerService.start();
    nodeScheduler = new NodeScheduler(new LegacyNetworkTopology(), new InMemoryNodeManager(), new NodeSelectionStats(), new NodeSchedulerConfig().setIncludeCoordinator(true), new NodeTaskMap(finalizerService), new ThrowingNodeTtlFetcherManager(), new NoOpQueryManager(), new SimpleTtlNodeSelectorConfig());
    PartitioningProviderManager partitioningProviderManager = new PartitioningProviderManager();
    nodePartitioningManager = new NodePartitioningManager(nodeScheduler, partitioningProviderManager, new NodeSelectionStats());
    planFragmenter = new PlanFragmenter(metadata, nodePartitioningManager, new QueryManagerConfig(), new SqlParser(), new FeaturesConfig());
}
Also used : NodeTaskMap(com.facebook.presto.execution.NodeTaskMap) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) PartitioningProviderManager(com.facebook.presto.sql.planner.PartitioningProviderManager) SqlParser(com.facebook.presto.sql.parser.SqlParser) NodeSchedulerConfig(com.facebook.presto.execution.scheduler.NodeSchedulerConfig) PlanFragmenter(com.facebook.presto.sql.planner.PlanFragmenter) ThrowingNodeTtlFetcherManager(com.facebook.presto.ttl.nodettlfetchermanagers.ThrowingNodeTtlFetcherManager) CatalogManager(com.facebook.presto.metadata.CatalogManager) NodePartitioningManager(com.facebook.presto.sql.planner.NodePartitioningManager) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager) NoOpQueryManager(com.facebook.presto.dispatcher.NoOpQueryManager) NodeSelectionStats(com.facebook.presto.execution.scheduler.nodeSelection.NodeSelectionStats) FinalizerService(com.facebook.presto.util.FinalizerService) LegacyNetworkTopology(com.facebook.presto.execution.scheduler.LegacyNetworkTopology) NodeScheduler(com.facebook.presto.execution.scheduler.NodeScheduler) QueryManagerConfig(com.facebook.presto.execution.QueryManagerConfig) SimpleTtlNodeSelectorConfig(com.facebook.presto.execution.scheduler.nodeSelection.SimpleTtlNodeSelectorConfig) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

LegacyNetworkTopology (com.facebook.presto.execution.scheduler.LegacyNetworkTopology)3 NodeScheduler (com.facebook.presto.execution.scheduler.NodeScheduler)3 NodeSchedulerConfig (com.facebook.presto.execution.scheduler.NodeSchedulerConfig)3 NodeSelectionStats (com.facebook.presto.execution.scheduler.nodeSelection.NodeSelectionStats)3 SimpleTtlNodeSelectorConfig (com.facebook.presto.execution.scheduler.nodeSelection.SimpleTtlNodeSelectorConfig)3 FeaturesConfig (com.facebook.presto.sql.analyzer.FeaturesConfig)3 NodePartitioningManager (com.facebook.presto.sql.planner.NodePartitioningManager)3 PartitioningProviderManager (com.facebook.presto.sql.planner.PartitioningProviderManager)3 FinalizerService (com.facebook.presto.util.FinalizerService)3 JsonObjectMapperProvider (com.facebook.airlift.json.JsonObjectMapperProvider)2 BlockEncodingManager (com.facebook.presto.common.block.BlockEncodingManager)2 SplitMonitor (com.facebook.presto.event.SplitMonitor)2 IndexManager (com.facebook.presto.index.IndexManager)2 MemoryManagerConfig (com.facebook.presto.memory.MemoryManagerConfig)2 ConnectorMetadataUpdaterManager (com.facebook.presto.metadata.ConnectorMetadataUpdaterManager)2 MetadataManager (com.facebook.presto.metadata.MetadataManager)2 LookupJoinOperators (com.facebook.presto.operator.LookupJoinOperators)2 NoOpFragmentResultCacheManager (com.facebook.presto.operator.NoOpFragmentResultCacheManager)2 PagesIndex (com.facebook.presto.operator.PagesIndex)2 TableCommitContext (com.facebook.presto.operator.TableCommitContext)2