Search in sources :

Example 1 with MemoryConnectorFactory

use of com.facebook.presto.plugin.memory.MemoryConnectorFactory in project presto by prestodb.

the class MemoryLocalQueryRunner method createMemoryLocalQueryRunner.

private static LocalQueryRunner createMemoryLocalQueryRunner() {
    Session.SessionBuilder sessionBuilder = testSessionBuilder().setCatalog("memory").setSchema("default");
    Session session = sessionBuilder.build();
    LocalQueryRunner localQueryRunner = LocalQueryRunner.queryRunnerWithInitialTransaction(session);
    // add tpch
    localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.<String, String>of());
    localQueryRunner.createCatalog("memory", new MemoryConnectorFactory(), ImmutableMap.<String, String>of());
    return localQueryRunner;
}
Also used : TpchConnectorFactory(com.facebook.presto.tpch.TpchConnectorFactory) MemoryConnectorFactory(com.facebook.presto.plugin.memory.MemoryConnectorFactory) LocalQueryRunner(com.facebook.presto.testing.LocalQueryRunner) Session(com.facebook.presto.Session)

Example 2 with MemoryConnectorFactory

use of com.facebook.presto.plugin.memory.MemoryConnectorFactory in project presto by prestodb.

the class MemoryLocalQueryRunner method createMemoryLocalQueryRunner.

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;
}
Also used : TpchConnectorFactory(com.facebook.presto.tpch.TpchConnectorFactory) MemoryConnectorFactory(com.facebook.presto.plugin.memory.MemoryConnectorFactory) LocalQueryRunner(com.facebook.presto.testing.LocalQueryRunner)

Example 3 with MemoryConnectorFactory

use of com.facebook.presto.plugin.memory.MemoryConnectorFactory in project presto by prestodb.

the class TestSpatialJoinPlanning method createQueryRunner.

private static LocalQueryRunner createQueryRunner() {
    LocalQueryRunner queryRunner = new LocalQueryRunner(testSessionBuilder().setCatalog("memory").setSchema("default").build());
    queryRunner.installPlugin(new GeoPlugin());
    queryRunner.createCatalog("tpch", new TpchConnectorFactory(1), ImmutableMap.of());
    queryRunner.createCatalog("memory", new MemoryConnectorFactory(), ImmutableMap.of());
    queryRunner.execute(format("CREATE TABLE kdb_tree AS SELECT '%s' AS v", KDB_TREE_JSON));
    return queryRunner;
}
Also used : TpchConnectorFactory(com.facebook.presto.tpch.TpchConnectorFactory) MemoryConnectorFactory(com.facebook.presto.plugin.memory.MemoryConnectorFactory) LocalQueryRunner(com.facebook.presto.testing.LocalQueryRunner)

Aggregations

MemoryConnectorFactory (com.facebook.presto.plugin.memory.MemoryConnectorFactory)3 LocalQueryRunner (com.facebook.presto.testing.LocalQueryRunner)3 TpchConnectorFactory (com.facebook.presto.tpch.TpchConnectorFactory)3 Session (com.facebook.presto.Session)1