server.getCatalogManager().registerCatalog(bogusTestingCatalog);
@BeforeMethod public void setUp() { catalogManager = new CatalogManager(); typeManager = new TypeRegistry(); transactionManager = createTestTransactionManager(catalogManager); tablePropertyManager = new TablePropertyManager(); columnPropertyManager = new ColumnPropertyManager(); testCatalog = createBogusTestingCatalog(CATALOG_NAME); catalogManager.registerCatalog(testCatalog); tablePropertyManager.addProperties(testCatalog.getConnectorId(), ImmutableList.of(stringProperty("baz", "test property", null, false))); columnPropertyManager.addProperties(testCatalog.getConnectorId(), ImmutableList.of()); testSession = testSessionBuilder() .setTransactionId(transactionManager.beginTransaction(false)) .build(); metadata = new MockMetadata(typeManager, tablePropertyManager, columnPropertyManager, testCatalog.getConnectorId()); }
@BeforeMethod public void setUp() { catalogManager = new CatalogManager(); typeManager = new TypeRegistry(); transactionManager = createTestTransactionManager(catalogManager); tablePropertyManager = new TablePropertyManager(); columnPropertyManager = new ColumnPropertyManager(); testCatalog = createBogusTestingCatalog(CATALOG_NAME); catalogManager.registerCatalog(testCatalog); tablePropertyManager.addProperties(testCatalog.getConnectorId(), ImmutableList.of(stringProperty("baz", "test property", null, false))); columnPropertyManager.addProperties(testCatalog.getConnectorId(), ImmutableList.of()); testSession = testSessionBuilder() .setTransactionId(transactionManager.beginTransaction(false)) .build(); metadata = new MockMetadata(typeManager, tablePropertyManager, columnPropertyManager, testCatalog.getConnectorId()); }
String catalogName = "test_catalog"; ConnectorId connectorId = new ConnectorId(catalogName); catalogManager.registerCatalog(new Catalog( catalogName, connectorId,
String catalogName = "test_catalog"; ConnectorId connectorId = new ConnectorId(catalogName); catalogManager.registerCatalog(new Catalog( catalogName, connectorId,
private static ConnectorId registerBogusConnector(CatalogManager catalogManager, TransactionManager transactionManager, AccessControl accessControl, String catalogName) { ConnectorId connectorId = new ConnectorId(catalogName); Connector connector = new TpchConnectorFactory().create(catalogName, ImmutableMap.of(), new TestingConnectorContext()); InMemoryNodeManager nodeManager = new InMemoryNodeManager(); MetadataManager metadata = MetadataManager.createTestMetadataManager(catalogManager); ConnectorId systemId = createSystemTablesConnectorId(connectorId); catalogManager.registerCatalog(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)))); return connectorId; }
private static ConnectorId registerBogusConnector(CatalogManager catalogManager, TransactionManager transactionManager, AccessControl accessControl, String catalogName) { ConnectorId connectorId = new ConnectorId(catalogName); Connector connector = new TpchConnectorFactory().create(catalogName, ImmutableMap.of(), new TestingConnectorContext()); InMemoryNodeManager nodeManager = new InMemoryNodeManager(); MetadataManager metadata = MetadataManager.createTestMetadataManager(catalogManager); ConnectorId systemId = createSystemTablesConnectorId(connectorId); catalogManager.registerCatalog(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)))); return connectorId; }
@BeforeClass public void setUp() throws Exception { CatalogManager catalogManager = new CatalogManager(); transactionManager = createTestTransactionManager(catalogManager); accessControl = new AllowAllAccessControl(); metadata = new MetadataManager( new FeaturesConfig(), new TypeRegistry(), new BlockEncodingManager(new TypeRegistry()), new SessionPropertyManager(), new SchemaPropertyManager(), new TablePropertyManager(), new ColumnPropertyManager(), new AnalyzePropertyManager(), transactionManager); catalogManager.registerCatalog(createBogusTestingCatalog(CATALOG_NAME)); executor = newCachedThreadPool(daemonThreadsNamed("test-set-role-task-executor-%s")); parser = new SqlParser(); }
@BeforeClass public void setUp() throws Exception { CatalogManager catalogManager = new CatalogManager(); transactionManager = createTestTransactionManager(catalogManager); accessControl = new AllowAllAccessControl(); metadata = new MetadataManager( new FeaturesConfig(), new TypeRegistry(), new BlockEncodingManager(new TypeRegistry()), new SessionPropertyManager(), new SchemaPropertyManager(), new TablePropertyManager(), new ColumnPropertyManager(), new AnalyzePropertyManager(), transactionManager); catalogManager.registerCatalog(createBogusTestingCatalog(CATALOG_NAME)); executor = newCachedThreadPool(daemonThreadsNamed("test-set-role-task-executor-%s")); parser = new SqlParser(); }
catalogManager.registerCatalog(tpchTestCatalog); metadata.getAnalyzePropertyManager().addProperties(TPCH_CONNECTOR_ID, tpchTestCatalog.getConnector(TPCH_CONNECTOR_ID).getAnalyzeProperties()); catalogManager.registerCatalog(createTestingCatalog(SECOND_CATALOG, SECOND_CONNECTOR_ID)); catalogManager.registerCatalog(createTestingCatalog(THIRD_CATALOG, THIRD_CONNECTOR_ID));
private static void registerConnector( CatalogManager catalogManager, TransactionManager transactionManager, String catalogName, ConnectorId connectorId, Connector connector) { ConnectorId systemId = createSystemTablesConnectorId(connectorId); InternalNodeManager nodeManager = new InMemoryNodeManager(); MetadataManager metadata = MetadataManager.createTestMetadataManager(catalogManager); catalogManager.registerCatalog(new Catalog( catalogName, connectorId, connector, createInformationSchemaConnectorId(connectorId), new InformationSchemaConnector(catalogName, nodeManager, metadata, new AllowAllAccessControl()), systemId, new SystemConnector( systemId, nodeManager, connector.getSystemTables(), transactionId -> transactionManager.getConnectorTransaction(transactionId, connectorId)))); }
private static void registerConnector( CatalogManager catalogManager, TransactionManager transactionManager, String catalogName, ConnectorId connectorId, Connector connector) { ConnectorId systemId = createSystemTablesConnectorId(connectorId); InternalNodeManager nodeManager = new InMemoryNodeManager(); MetadataManager metadata = MetadataManager.createTestMetadataManager(catalogManager); catalogManager.registerCatalog(new Catalog( catalogName, connectorId, connector, createInformationSchemaConnectorId(connectorId), new InformationSchemaConnector(catalogName, nodeManager, metadata, new AllowAllAccessControl()), systemId, new SystemConnector( systemId, nodeManager, connector.getSystemTables(), transactionId -> transactionManager.getConnectorTransaction(transactionId, connectorId)))); }
@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 NodeSchedulerConfig().setIncludeCoordinator(true), new NodeTaskMap(finalizerService)); nodePartitioningManager = new NodePartitioningManager(nodeScheduler); planFragmenter = new PlanFragmenter(metadata, nodePartitioningManager, new QueryManagerConfig()); }
@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 NodeSchedulerConfig().setIncludeCoordinator(true), new NodeTaskMap(finalizerService)); nodePartitioningManager = new NodePartitioningManager(nodeScheduler); planFragmenter = new PlanFragmenter(metadata, nodePartitioningManager, new QueryManagerConfig()); }
public TestResetSessionTask() { CatalogManager catalogManager = new CatalogManager(); transactionManager = createTestTransactionManager(catalogManager); accessControl = new AllowAllAccessControl(); metadata = new MetadataManager( new FeaturesConfig(), new TypeRegistry(), new BlockEncodingManager(new TypeRegistry()), new SessionPropertyManager(), new SchemaPropertyManager(), new TablePropertyManager(), new ColumnPropertyManager(), new AnalyzePropertyManager(), transactionManager); metadata.getSessionPropertyManager().addSystemSessionProperty(stringProperty( "foo", "test property", null, false)); Catalog bogusTestingCatalog = createBogusTestingCatalog(CATALOG_NAME); metadata.getSessionPropertyManager().addConnectorSessionProperties(bogusTestingCatalog.getConnectorId(), ImmutableList.of(stringProperty( "baz", "test property", null, false))); catalogManager.registerCatalog(bogusTestingCatalog); }
public TestResetSessionTask() { CatalogManager catalogManager = new CatalogManager(); transactionManager = createTestTransactionManager(catalogManager); accessControl = new AllowAllAccessControl(); metadata = new MetadataManager( new FeaturesConfig(), new TypeRegistry(), new BlockEncodingManager(new TypeRegistry()), new SessionPropertyManager(), new SchemaPropertyManager(), new TablePropertyManager(), new ColumnPropertyManager(), new AnalyzePropertyManager(), transactionManager); metadata.getSessionPropertyManager().addSystemSessionProperty(stringProperty( "foo", "test property", null, false)); Catalog bogusTestingCatalog = createBogusTestingCatalog(CATALOG_NAME); metadata.getSessionPropertyManager().addConnectorSessionProperties(bogusTestingCatalog.getConnectorId(), ImmutableList.of(stringProperty( "baz", "test property", null, false))); catalogManager.registerCatalog(bogusTestingCatalog); }
addConnectorInternal(informationSchemaConnector); addConnectorInternal(systemConnector); catalogManager.registerCatalog(catalog);
addConnectorInternal(informationSchemaConnector); addConnectorInternal(systemConnector); catalogManager.registerCatalog(catalog);
catalogManager.registerCatalog(bogusTestingCatalog);
catalogManager.registerCatalog(bogusTestingCatalog);