Search in sources :

Example 1 with InMemoryNodeManager

use of com.facebook.presto.metadata.InMemoryNodeManager 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 NodeSchedulerConfig().setIncludeCoordinator(true), new NodeTaskMap(finalizerService));
    NodePartitioningManager nodePartitioningManager = new NodePartitioningManager(nodeScheduler);
    return new LocalExecutionPlanner(metadata, new SqlParser(), Optional.empty(), pageSourceManager, new IndexManager(), nodePartitioningManager, new PageSinkManager(), new MockExchangeClientSupplier(), new ExpressionCompiler(metadata), new JoinFilterFunctionCompiler(metadata), new IndexJoinLookupStats(), new CompilerConfig(), new TaskManagerConfig(), new BinarySpillerFactory(new BlockEncodingManager(metadata.getTypeManager()), new FeaturesConfig()), new TestingBlockEncodingSerde(new TestingTypeManager()), new PagesIndex.TestingFactory(), new JoinCompiler(), new LookupJoinOperators(new JoinProbeCompiler()));
}
Also used : FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) NodeSchedulerConfig(com.facebook.presto.execution.scheduler.NodeSchedulerConfig) PagesIndex(com.facebook.presto.operator.PagesIndex) PageSourceManager(com.facebook.presto.split.PageSourceManager) NodePartitioningManager(com.facebook.presto.sql.planner.NodePartitioningManager) JoinProbeCompiler(com.facebook.presto.sql.gen.JoinProbeCompiler) NodeScheduler(com.facebook.presto.execution.scheduler.NodeScheduler) TestingTypeManager(com.facebook.presto.spi.type.TestingTypeManager) PageSinkManager(com.facebook.presto.split.PageSinkManager) LookupJoinOperators(com.facebook.presto.operator.LookupJoinOperators) JoinCompiler(com.facebook.presto.sql.gen.JoinCompiler) LocalExecutionPlanner(com.facebook.presto.sql.planner.LocalExecutionPlanner) MockExchangeClientSupplier(com.facebook.presto.execution.TestSqlTaskManager.MockExchangeClientSupplier) IndexJoinLookupStats(com.facebook.presto.operator.index.IndexJoinLookupStats) TestingBlockEncodingSerde(com.facebook.presto.spi.block.TestingBlockEncodingSerde) JoinFilterFunctionCompiler(com.facebook.presto.sql.gen.JoinFilterFunctionCompiler) SqlParser(com.facebook.presto.sql.parser.SqlParser) CompilerConfig(com.facebook.presto.sql.planner.CompilerConfig) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager) IndexManager(com.facebook.presto.index.IndexManager) MetadataManager(com.facebook.presto.metadata.MetadataManager) BlockEncodingManager(com.facebook.presto.block.BlockEncodingManager) FinalizerService(com.facebook.presto.util.FinalizerService) LegacyNetworkTopology(com.facebook.presto.execution.scheduler.LegacyNetworkTopology) BinarySpillerFactory(com.facebook.presto.spiller.BinarySpillerFactory) ExpressionCompiler(com.facebook.presto.sql.gen.ExpressionCompiler)

Example 2 with InMemoryNodeManager

use of com.facebook.presto.metadata.InMemoryNodeManager in project presto by prestodb.

the class TestNodeScheduler method testTopologyAwareScheduling.

@Test(timeOut = 60 * 1000)
public void testTopologyAwareScheduling() throws Exception {
    TestingTransactionHandle transactionHandle = TestingTransactionHandle.create();
    NodeTaskMap nodeTaskMap = new NodeTaskMap(finalizerService);
    InMemoryNodeManager nodeManager = new InMemoryNodeManager();
    ImmutableList.Builder<Node> nodeBuilder = ImmutableList.builder();
    nodeBuilder.add(new PrestoNode("node1", URI.create("http://host1.rack1:11"), NodeVersion.UNKNOWN, false));
    nodeBuilder.add(new PrestoNode("node2", URI.create("http://host2.rack1:12"), NodeVersion.UNKNOWN, false));
    nodeBuilder.add(new PrestoNode("node3", URI.create("http://host3.rack2:13"), NodeVersion.UNKNOWN, false));
    ImmutableList<Node> nodes = nodeBuilder.build();
    nodeManager.addNode(CONNECTOR_ID, nodes);
    // contents of taskMap indicate the node-task map for the current stage
    Map<Node, RemoteTask> taskMap = new HashMap<>();
    NodeSchedulerConfig nodeSchedulerConfig = new NodeSchedulerConfig().setMaxSplitsPerNode(25).setIncludeCoordinator(false).setNetworkTopology("test").setMaxPendingSplitsPerTask(20);
    TestNetworkTopology topology = new TestNetworkTopology();
    NetworkLocationCache locationCache = new NetworkLocationCache(topology) {

        @Override
        public NetworkLocation get(HostAddress host) {
            // Bypass the cache for workers, since we only look them up once and they would all be unresolved otherwise
            if (host.getHostText().startsWith("host")) {
                return topology.locate(host);
            } else {
                return super.get(host);
            }
        }
    };
    NodeScheduler nodeScheduler = new NodeScheduler(locationCache, topology, nodeManager, nodeSchedulerConfig, nodeTaskMap);
    NodeSelector nodeSelector = nodeScheduler.createNodeSelector(CONNECTOR_ID);
    // Fill up the nodes with non-local data
    ImmutableSet.Builder<Split> nonRackLocalBuilder = ImmutableSet.builder();
    for (int i = 0; i < (25 + 11) * 3; i++) {
        nonRackLocalBuilder.add(new Split(CONNECTOR_ID, transactionHandle, new TestSplitRemote(HostAddress.fromParts("data.other_rack", 1))));
    }
    Set<Split> nonRackLocalSplits = nonRackLocalBuilder.build();
    Multimap<Node, Split> assignments = nodeSelector.computeAssignments(nonRackLocalSplits, ImmutableList.copyOf(taskMap.values())).getAssignments();
    MockRemoteTaskFactory remoteTaskFactory = new MockRemoteTaskFactory(remoteTaskExecutor);
    int task = 0;
    for (Node node : assignments.keySet()) {
        TaskId taskId = new TaskId("test", 1, task);
        task++;
        MockRemoteTaskFactory.MockRemoteTask remoteTask = remoteTaskFactory.createTableScanTask(taskId, node, ImmutableList.copyOf(assignments.get(node)), nodeTaskMap.createPartitionedSplitCountTracker(node, taskId));
        remoteTask.startSplits(25);
        nodeTaskMap.addTask(node, remoteTask);
        taskMap.put(node, remoteTask);
    }
    // Continue assigning to fill up part of the queue
    nonRackLocalSplits = Sets.difference(nonRackLocalSplits, new HashSet<>(assignments.values()));
    assignments = nodeSelector.computeAssignments(nonRackLocalSplits, ImmutableList.copyOf(taskMap.values())).getAssignments();
    for (Node node : assignments.keySet()) {
        RemoteTask remoteTask = taskMap.get(node);
        remoteTask.addSplits(ImmutableMultimap.<PlanNodeId, Split>builder().putAll(new PlanNodeId("sourceId"), assignments.get(node)).build());
    }
    nonRackLocalSplits = Sets.difference(nonRackLocalSplits, new HashSet<>(assignments.values()));
    // Check that 3 of the splits were rejected, since they're non-local
    assertEquals(nonRackLocalSplits.size(), 3);
    // Assign rack-local splits
    ImmutableSet.Builder<Split> rackLocalSplits = ImmutableSet.builder();
    HostAddress dataHost1 = HostAddress.fromParts("data.rack1", 1);
    HostAddress dataHost2 = HostAddress.fromParts("data.rack2", 1);
    for (int i = 0; i < 6 * 2; i++) {
        rackLocalSplits.add(new Split(CONNECTOR_ID, transactionHandle, new TestSplitRemote(dataHost1)));
    }
    for (int i = 0; i < 6; i++) {
        rackLocalSplits.add(new Split(CONNECTOR_ID, transactionHandle, new TestSplitRemote(dataHost2)));
    }
    assignments = nodeSelector.computeAssignments(rackLocalSplits.build(), ImmutableList.copyOf(taskMap.values())).getAssignments();
    for (Node node : assignments.keySet()) {
        RemoteTask remoteTask = taskMap.get(node);
        remoteTask.addSplits(ImmutableMultimap.<PlanNodeId, Split>builder().putAll(new PlanNodeId("sourceId"), assignments.get(node)).build());
    }
    Set<Split> unassigned = Sets.difference(rackLocalSplits.build(), new HashSet<>(assignments.values()));
    // Compute the assignments a second time to account for the fact that some splits may not have been assigned due to asynchronous
    // loading of the NetworkLocationCache
    boolean cacheRefreshed = false;
    while (!cacheRefreshed) {
        cacheRefreshed = true;
        if (locationCache.get(dataHost1).equals(ROOT_LOCATION)) {
            cacheRefreshed = false;
        }
        if (locationCache.get(dataHost2).equals(ROOT_LOCATION)) {
            cacheRefreshed = false;
        }
        MILLISECONDS.sleep(10);
    }
    assignments = nodeSelector.computeAssignments(unassigned, ImmutableList.copyOf(taskMap.values())).getAssignments();
    for (Node node : assignments.keySet()) {
        RemoteTask remoteTask = taskMap.get(node);
        remoteTask.addSplits(ImmutableMultimap.<PlanNodeId, Split>builder().putAll(new PlanNodeId("sourceId"), assignments.get(node)).build());
    }
    unassigned = Sets.difference(unassigned, new HashSet<>(assignments.values()));
    assertEquals(unassigned.size(), 3);
    int rack1 = 0;
    int rack2 = 0;
    for (Split split : unassigned) {
        String rack = topology.locate(split.getAddresses().get(0)).getSegments().get(0);
        switch(rack) {
            case "rack1":
                rack1++;
                break;
            case "rack2":
                rack2++;
                break;
            default:
                fail();
        }
    }
    assertEquals(rack1, 2);
    assertEquals(rack2, 1);
    // Assign local splits
    ImmutableSet.Builder<Split> localSplits = ImmutableSet.builder();
    localSplits.add(new Split(CONNECTOR_ID, transactionHandle, new TestSplitRemote(HostAddress.fromParts("host1.rack1", 1))));
    localSplits.add(new Split(CONNECTOR_ID, transactionHandle, new TestSplitRemote(HostAddress.fromParts("host2.rack1", 1))));
    localSplits.add(new Split(CONNECTOR_ID, transactionHandle, new TestSplitRemote(HostAddress.fromParts("host3.rack2", 1))));
    assignments = nodeSelector.computeAssignments(localSplits.build(), ImmutableList.copyOf(taskMap.values())).getAssignments();
    assertEquals(assignments.size(), 3);
    assertEquals(assignments.keySet().size(), 3);
}
Also used : HashMap(java.util.HashMap) ImmutableList(com.google.common.collect.ImmutableList) Node(com.facebook.presto.spi.Node) PrestoNode(com.facebook.presto.metadata.PrestoNode) NodeSchedulerConfig(com.facebook.presto.execution.scheduler.NodeSchedulerConfig) HostAddress(com.facebook.presto.spi.HostAddress) PrestoNode(com.facebook.presto.metadata.PrestoNode) PlanNodeId(com.facebook.presto.sql.planner.plan.PlanNodeId) ImmutableSet(com.google.common.collect.ImmutableSet) NodeScheduler(com.facebook.presto.execution.scheduler.NodeScheduler) TestingTransactionHandle(com.facebook.presto.testing.TestingTransactionHandle) HashSet(java.util.HashSet) NetworkLocationCache(com.facebook.presto.execution.scheduler.NetworkLocationCache) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager) NodeSelector(com.facebook.presto.execution.scheduler.NodeSelector) ConnectorSplit(com.facebook.presto.spi.ConnectorSplit) Split(com.facebook.presto.metadata.Split) Test(org.testng.annotations.Test)

Example 3 with InMemoryNodeManager

use of com.facebook.presto.metadata.InMemoryNodeManager in project presto by prestodb.

the class TestNodeScheduler method setUp.

@BeforeMethod
public void setUp() throws Exception {
    finalizerService = new FinalizerService();
    nodeTaskMap = new NodeTaskMap(finalizerService);
    nodeManager = new InMemoryNodeManager();
    ImmutableList.Builder<Node> nodeBuilder = ImmutableList.builder();
    nodeBuilder.add(new PrestoNode("other1", URI.create("http://127.0.0.1:11"), NodeVersion.UNKNOWN, false));
    nodeBuilder.add(new PrestoNode("other2", URI.create("http://127.0.0.1:12"), NodeVersion.UNKNOWN, false));
    nodeBuilder.add(new PrestoNode("other3", URI.create("http://127.0.0.1:13"), NodeVersion.UNKNOWN, false));
    ImmutableList<Node> nodes = nodeBuilder.build();
    nodeManager.addNode(CONNECTOR_ID, nodes);
    NodeSchedulerConfig nodeSchedulerConfig = new NodeSchedulerConfig().setMaxSplitsPerNode(20).setIncludeCoordinator(false).setMaxPendingSplitsPerTask(10);
    NodeScheduler nodeScheduler = new NodeScheduler(new LegacyNetworkTopology(), nodeManager, nodeSchedulerConfig, nodeTaskMap);
    // contents of taskMap indicate the node-task map for the current stage
    taskMap = new HashMap<>();
    nodeSelector = nodeScheduler.createNodeSelector(CONNECTOR_ID);
    remoteTaskExecutor = Executors.newCachedThreadPool(daemonThreadsNamed("remoteTaskExecutor-%s"));
    finalizerService.start();
}
Also used : FinalizerService(com.facebook.presto.util.FinalizerService) ImmutableList(com.google.common.collect.ImmutableList) Node(com.facebook.presto.spi.Node) PrestoNode(com.facebook.presto.metadata.PrestoNode) LegacyNetworkTopology(com.facebook.presto.execution.scheduler.LegacyNetworkTopology) NodeSchedulerConfig(com.facebook.presto.execution.scheduler.NodeSchedulerConfig) NodeScheduler(com.facebook.presto.execution.scheduler.NodeScheduler) PrestoNode(com.facebook.presto.metadata.PrestoNode) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 4 with InMemoryNodeManager

use of com.facebook.presto.metadata.InMemoryNodeManager in project presto by prestodb.

the class TestSourcePartitionedScheduler method testBalancedSplitAssignment.

@Test
public void testBalancedSplitAssignment() throws Exception {
    // use private node manager so we can add a node later
    InMemoryNodeManager nodeManager = new InMemoryNodeManager();
    nodeManager.addNode(CONNECTOR_ID, new PrestoNode("other1", URI.create("http://127.0.0.1:11"), NodeVersion.UNKNOWN, false), new PrestoNode("other2", URI.create("http://127.0.0.1:12"), NodeVersion.UNKNOWN, false), new PrestoNode("other3", URI.create("http://127.0.0.1:13"), NodeVersion.UNKNOWN, false));
    NodeTaskMap nodeTaskMap = new NodeTaskMap(finalizerService);
    // Schedule 15 splits - there are 3 nodes, each node should get 5 splits
    StageExecutionPlan firstPlan = createPlan(createFixedSplitSource(15, TestingSplit::createRemoteSplit));
    SqlStageExecution firstStage = createSqlStageExecution(firstPlan, nodeTaskMap);
    SourcePartitionedScheduler firstScheduler = getSourcePartitionedScheduler(firstPlan, firstStage, nodeManager, nodeTaskMap, 200);
    ScheduleResult scheduleResult = firstScheduler.schedule();
    assertTrue(scheduleResult.isFinished());
    assertTrue(scheduleResult.getBlocked().isDone());
    assertEquals(scheduleResult.getNewTasks().size(), 3);
    assertEquals(firstStage.getAllTasks().size(), 3);
    for (RemoteTask remoteTask : firstStage.getAllTasks()) {
        assertEquals(remoteTask.getPartitionedSplitCount(), 5);
    }
    // Add new node
    Node additionalNode = new PrestoNode("other4", URI.create("http://127.0.0.1:14"), NodeVersion.UNKNOWN, false);
    nodeManager.addNode(CONNECTOR_ID, additionalNode);
    // Schedule 5 splits in another query. Since the new node does not have any splits, all 5 splits are assigned to the new node
    StageExecutionPlan secondPlan = createPlan(createFixedSplitSource(5, TestingSplit::createRemoteSplit));
    SqlStageExecution secondStage = createSqlStageExecution(secondPlan, nodeTaskMap);
    SourcePartitionedScheduler secondScheduler = getSourcePartitionedScheduler(secondPlan, secondStage, nodeManager, nodeTaskMap, 200);
    scheduleResult = secondScheduler.schedule();
    assertTrue(scheduleResult.isFinished());
    assertTrue(scheduleResult.getBlocked().isDone());
    assertEquals(scheduleResult.getNewTasks().size(), 1);
    assertEquals(secondStage.getAllTasks().size(), 1);
    RemoteTask task = secondStage.getAllTasks().get(0);
    assertEquals(task.getPartitionedSplitCount(), 5);
    firstStage.abort();
    secondStage.abort();
}
Also used : NodeTaskMap(com.facebook.presto.execution.NodeTaskMap) StageExecutionPlan(com.facebook.presto.sql.planner.StageExecutionPlan) RemoteSourceNode(com.facebook.presto.sql.planner.plan.RemoteSourceNode) Node(com.facebook.presto.spi.Node) PrestoNode(com.facebook.presto.metadata.PrestoNode) TableScanNode(com.facebook.presto.sql.planner.plan.TableScanNode) JoinNode(com.facebook.presto.sql.planner.plan.JoinNode) MockRemoteTask(com.facebook.presto.execution.MockRemoteTaskFactory.MockRemoteTask) RemoteTask(com.facebook.presto.execution.RemoteTask) PrestoNode(com.facebook.presto.metadata.PrestoNode) SqlStageExecution(com.facebook.presto.execution.SqlStageExecution) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager) Test(org.testng.annotations.Test)

Example 5 with InMemoryNodeManager

use of com.facebook.presto.metadata.InMemoryNodeManager in project presto by prestodb.

the class TestAnalyzer method createTestingCatalog.

private Catalog createTestingCatalog(String catalogName, ConnectorId connectorId) {
    ConnectorId systemId = createSystemTablesConnectorId(connectorId);
    Connector connector = createTestingConnector();
    InternalNodeManager nodeManager = new InMemoryNodeManager();
    return new Catalog(catalogName, connectorId, connector, createInformationSchemaConnectorId(connectorId), new InformationSchemaConnector(catalogName, nodeManager, metadata, accessControl), systemId, new SystemConnector(systemId, nodeManager, connector.getSystemTables(), transactionId -> transactionManager.getConnectorTransaction(transactionId, connectorId)));
}
Also used : SystemConnector(com.facebook.presto.connector.system.SystemConnector) QualifiedObjectName(com.facebook.presto.metadata.QualifiedObjectName) TablePropertyManager(com.facebook.presto.metadata.TablePropertyManager) TypeManager(com.facebook.presto.spi.type.TypeManager) MetadataManager(com.facebook.presto.metadata.MetadataManager) MISSING_SCHEMA(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_SCHEMA) TypeRegistry(com.facebook.presto.type.TypeRegistry) APPLY_FUNCTION(com.facebook.presto.operator.scalar.ApplyFunction.APPLY_FUNCTION) MISMATCHED_COLUMN_ALIASES(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISMATCHED_COLUMN_ALIASES) Test(org.testng.annotations.Test) ConnectorTransactionHandle(com.facebook.presto.spi.connector.ConnectorTransactionHandle) VIEW_IS_RECURSIVE(com.facebook.presto.sql.analyzer.SemanticErrorCode.VIEW_IS_RECURSIVE) BIGINT(com.facebook.presto.spi.type.BigintType.BIGINT) CATALOG_NOT_SPECIFIED(com.facebook.presto.sql.analyzer.SemanticErrorCode.CATALOG_NOT_SPECIFIED) NON_NUMERIC_SAMPLE_PERCENTAGE(com.facebook.presto.sql.analyzer.SemanticErrorCode.NON_NUMERIC_SAMPLE_PERCENTAGE) InternalNodeManager(com.facebook.presto.metadata.InternalNodeManager) SchemaTableName(com.facebook.presto.spi.SchemaTableName) MISMATCHED_SET_COLUMN_TYPES(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISMATCHED_SET_COLUMN_TYPES) INVALID_WINDOW_FRAME(com.facebook.presto.sql.analyzer.SemanticErrorCode.INVALID_WINDOW_FRAME) TransactionBuilder.transaction(com.facebook.presto.transaction.TransactionBuilder.transaction) SCHEMA_NOT_SPECIFIED(com.facebook.presto.sql.analyzer.SemanticErrorCode.SCHEMA_NOT_SPECIFIED) ORDER_BY_MUST_BE_IN_SELECT(com.facebook.presto.sql.analyzer.SemanticErrorCode.ORDER_BY_MUST_BE_IN_SELECT) WILDCARD_WITHOUT_FROM(com.facebook.presto.sql.analyzer.SemanticErrorCode.WILDCARD_WITHOUT_FROM) ConnectorSplitManager(com.facebook.presto.spi.connector.ConnectorSplitManager) COLUMN_TYPE_UNKNOWN(com.facebook.presto.sql.analyzer.SemanticErrorCode.COLUMN_TYPE_UNKNOWN) MUST_BE_AGGREGATION_FUNCTION(com.facebook.presto.sql.analyzer.SemanticErrorCode.MUST_BE_AGGREGATION_FUNCTION) Collections.emptyList(java.util.Collections.emptyList) INVALID_SCHEMA_NAME(com.facebook.presto.sql.analyzer.SemanticErrorCode.INVALID_SCHEMA_NAME) BeforeMethod(org.testng.annotations.BeforeMethod) VARCHAR(com.facebook.presto.spi.type.VarcharType.VARCHAR) MISSING_ATTRIBUTE(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_ATTRIBUTE) NESTED_WINDOW(com.facebook.presto.sql.analyzer.SemanticErrorCode.NESTED_WINDOW) NOT_SUPPORTED(com.facebook.presto.sql.analyzer.SemanticErrorCode.NOT_SUPPORTED) VIEW_ANALYSIS_ERROR(com.facebook.presto.sql.analyzer.SemanticErrorCode.VIEW_ANALYSIS_ERROR) TestingMetadata(com.facebook.presto.testing.TestingMetadata) SchemaPropertyManager(com.facebook.presto.metadata.SchemaPropertyManager) String.format(java.lang.String.format) SqlParser(com.facebook.presto.sql.parser.SqlParser) AMBIGUOUS_ATTRIBUTE(com.facebook.presto.sql.analyzer.SemanticErrorCode.AMBIGUOUS_ATTRIBUTE) ColumnMetadata(com.facebook.presto.spi.ColumnMetadata) MISSING_COLUMN(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_COLUMN) Catalog(com.facebook.presto.metadata.Catalog) ConnectorId.createSystemTablesConnectorId(com.facebook.presto.connector.ConnectorId.createSystemTablesConnectorId) Optional(java.util.Optional) STANDALONE_LAMBDA(com.facebook.presto.sql.analyzer.SemanticErrorCode.STANDALONE_LAMBDA) ConnectorId(com.facebook.presto.connector.ConnectorId) SystemConnector(com.facebook.presto.connector.system.SystemConnector) AllowAllAccessControl(com.facebook.presto.security.AllowAllAccessControl) JsonCodec(io.airlift.json.JsonCodec) CANNOT_HAVE_AGGREGATIONS_OR_WINDOWS(com.facebook.presto.sql.analyzer.SemanticErrorCode.CANNOT_HAVE_AGGREGATIONS_OR_WINDOWS) ConnectorMetadata(com.facebook.presto.spi.connector.ConnectorMetadata) DOUBLE(com.facebook.presto.spi.type.DoubleType.DOUBLE) WINDOW_REQUIRES_OVER(com.facebook.presto.sql.analyzer.SemanticErrorCode.WINDOW_REQUIRES_OVER) DUPLICATE_RELATION(com.facebook.presto.sql.analyzer.SemanticErrorCode.DUPLICATE_RELATION) ViewDefinition(com.facebook.presto.metadata.ViewDefinition) ArrayType(com.facebook.presto.type.ArrayType) AccessControlManager(com.facebook.presto.security.AccessControlManager) TYPE_MISMATCH(com.facebook.presto.sql.analyzer.SemanticErrorCode.TYPE_MISMATCH) MULTIPLE_FIELDS_FROM_SUBQUERY(com.facebook.presto.sql.analyzer.SemanticErrorCode.MULTIPLE_FIELDS_FROM_SUBQUERY) COLUMN_NAME_NOT_SPECIFIED(com.facebook.presto.sql.analyzer.SemanticErrorCode.COLUMN_NAME_NOT_SPECIFIED) NESTED_AGGREGATION(com.facebook.presto.sql.analyzer.SemanticErrorCode.NESTED_AGGREGATION) INVALID_ORDINAL(com.facebook.presto.sql.analyzer.SemanticErrorCode.INVALID_ORDINAL) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) MISSING_CATALOG(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_CATALOG) ImmutableList(com.google.common.collect.ImmutableList) SessionPropertyManager(com.facebook.presto.metadata.SessionPropertyManager) TransactionManager(com.facebook.presto.transaction.TransactionManager) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager) INVALID_LITERAL(com.facebook.presto.sql.analyzer.SemanticErrorCode.INVALID_LITERAL) ConnectorTableMetadata(com.facebook.presto.spi.ConnectorTableMetadata) Connector(com.facebook.presto.spi.connector.Connector) Language(org.intellij.lang.annotations.Language) MISSING_TABLE(com.facebook.presto.sql.analyzer.SemanticErrorCode.MISSING_TABLE) Session(com.facebook.presto.Session) NodeLocation(com.facebook.presto.sql.tree.NodeLocation) MUST_BE_AGGREGATE_OR_GROUP_BY(com.facebook.presto.sql.analyzer.SemanticErrorCode.MUST_BE_AGGREGATE_OR_GROUP_BY) Assert.fail(org.testng.Assert.fail) TestingSession.testSessionBuilder(com.facebook.presto.testing.TestingSession.testSessionBuilder) SAMPLE_PERCENTAGE_OUT_OF_RANGE(com.facebook.presto.sql.analyzer.SemanticErrorCode.SAMPLE_PERCENTAGE_OUT_OF_RANGE) CatalogManager(com.facebook.presto.metadata.CatalogManager) VIEW_IS_STALE(com.facebook.presto.sql.analyzer.SemanticErrorCode.VIEW_IS_STALE) Consumer(java.util.function.Consumer) ConnectorId.createInformationSchemaConnectorId(com.facebook.presto.connector.ConnectorId.createInformationSchemaConnectorId) IsolationLevel(com.facebook.presto.spi.transaction.IsolationLevel) ViewColumn(com.facebook.presto.metadata.ViewDefinition.ViewColumn) DUPLICATE_COLUMN_NAME(com.facebook.presto.sql.analyzer.SemanticErrorCode.DUPLICATE_COLUMN_NAME) TransactionManager.createTestTransactionManager(com.facebook.presto.transaction.TransactionManager.createTestTransactionManager) BlockEncodingManager(com.facebook.presto.block.BlockEncodingManager) Metadata(com.facebook.presto.metadata.Metadata) AccessControl(com.facebook.presto.security.AccessControl) Statement(com.facebook.presto.sql.tree.Statement) SystemConnector(com.facebook.presto.connector.system.SystemConnector) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) Connector(com.facebook.presto.spi.connector.Connector) InformationSchemaConnector(com.facebook.presto.connector.informationSchema.InformationSchemaConnector) InternalNodeManager(com.facebook.presto.metadata.InternalNodeManager) Catalog(com.facebook.presto.metadata.Catalog) ConnectorId.createSystemTablesConnectorId(com.facebook.presto.connector.ConnectorId.createSystemTablesConnectorId) ConnectorId(com.facebook.presto.connector.ConnectorId) ConnectorId.createInformationSchemaConnectorId(com.facebook.presto.connector.ConnectorId.createInformationSchemaConnectorId) InMemoryNodeManager(com.facebook.presto.metadata.InMemoryNodeManager)

Aggregations

InMemoryNodeManager (com.facebook.presto.metadata.InMemoryNodeManager)8 MetadataManager (com.facebook.presto.metadata.MetadataManager)4 Test (org.testng.annotations.Test)4 ConnectorId (com.facebook.presto.connector.ConnectorId)3 ConnectorId.createInformationSchemaConnectorId (com.facebook.presto.connector.ConnectorId.createInformationSchemaConnectorId)3 ConnectorId.createSystemTablesConnectorId (com.facebook.presto.connector.ConnectorId.createSystemTablesConnectorId)3 InformationSchemaConnector (com.facebook.presto.connector.informationSchema.InformationSchemaConnector)3 SystemConnector (com.facebook.presto.connector.system.SystemConnector)3 NodeScheduler (com.facebook.presto.execution.scheduler.NodeScheduler)3 NodeSchedulerConfig (com.facebook.presto.execution.scheduler.NodeSchedulerConfig)3 Catalog (com.facebook.presto.metadata.Catalog)3 PrestoNode (com.facebook.presto.metadata.PrestoNode)3 Node (com.facebook.presto.spi.Node)3 ImmutableList (com.google.common.collect.ImmutableList)3 BlockEncodingManager (com.facebook.presto.block.BlockEncodingManager)2 NodeTaskMap (com.facebook.presto.execution.NodeTaskMap)2 SqlStageExecution (com.facebook.presto.execution.SqlStageExecution)2 LegacyNetworkTopology (com.facebook.presto.execution.scheduler.LegacyNetworkTopology)2 InternalNodeManager (com.facebook.presto.metadata.InternalNodeManager)2 Connector (com.facebook.presto.spi.connector.Connector)2