private static LocalQueryRunner createMemoryLocalQueryRunner(Session session) { LocalQueryRunner localQueryRunner = LocalQueryRunner.queryRunnerWithInitialTransaction(session); // add tpch localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of()); localQueryRunner.createCatalog( "memory", new MemoryConnectorFactory(), ImmutableMap.of("memory.max-data-per-node", "4GB")); return localQueryRunner; }
private void setUp(Supplier<List<Driver>> driversSupplier) { checkState(localQueryRunner == null, "Already set up"); Session session = testSessionBuilder() .setCatalog("tpch") .setSchema("tiny") .setSystemProperty("task_default_concurrency", "1") .build(); localQueryRunner = queryRunnerWithInitialTransaction(session); // add tpch localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of()); userPool = new MemoryPool(new MemoryPoolId("test"), TEN_MEGABYTES); fakeQueryId = new QueryId("fake"); SpillSpaceTracker spillSpaceTracker = new SpillSpaceTracker(new DataSize(1, GIGABYTE)); DefaultQueryContext queryContext = new DefaultQueryContext(new QueryId("query"), TEN_MEGABYTES, new DataSize(20, MEGABYTE), userPool, new TestingGcMonitor(), localQueryRunner.getExecutor(), localQueryRunner.getScheduler(), TEN_MEGABYTES, spillSpaceTracker); taskContext = createTaskContext(queryContext, localQueryRunner.getExecutor(), session); drivers = driversSupplier.get(); }
public static LocalQueryRunner createLocalQueryRunner(boolean hashingEnabled) { SessionBuilder sessionBuilder = testSessionBuilder() .setCatalog("tpch") .setSchema(TINY_SCHEMA_NAME); if (hashingEnabled) { sessionBuilder.setSystemProperties(ImmutableMap.of("optimizer.optimize_hash_generation", "true")); } Session session = sessionBuilder.build(); LocalQueryRunner localQueryRunner = queryRunnerWithInitialTransaction(session); // add tpch InMemoryNodeManager nodeManager = localQueryRunner.getNodeManager(); localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(nodeManager, 1), ImmutableMap.<String, String>of()); return localQueryRunner; } }
private static LocalQueryRunner createMemoryLocalQueryRunner(Session session) { LocalQueryRunner localQueryRunner = LocalQueryRunner.queryRunnerWithInitialTransaction(session); // add tpch localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of()); localQueryRunner.createCatalog( "memory", new MemoryConnectorFactory(), ImmutableMap.of("memory.max-data-per-node", "4GB")); return localQueryRunner; }
.withSystemProperty("task_default_concurrency", "1"); LocalQueryRunner localQueryRunner = queryRunnerWithInitialTransaction(session);