use of io.prestosql.plugin.tpch.TpchPlugin in project hetu-core by openlookeng.
the class PostgreSqlQueryRunner method createPostgreSqlQueryRunner.
public static QueryRunner createPostgreSqlQueryRunner(TestingPostgreSqlServer server, Map<String, String> inputConnectorProperties, Iterable<TpchTable<?>> tables) throws Exception {
Map<String, String> connectorProperties = inputConnectorProperties;
DistributedQueryRunner queryRunner = null;
try {
queryRunner = new DistributedQueryRunner(createSession(), 3);
queryRunner.installPlugin(new TpchPlugin());
queryRunner.createCatalog("tpch", "tpch");
connectorProperties = new HashMap<>(ImmutableMap.copyOf(connectorProperties));
connectorProperties.putIfAbsent("connection-url", server.getJdbcUrl());
connectorProperties.putIfAbsent("allow-drop-table", "true");
createSchema(server.getJdbcUrl(), "tpch");
queryRunner.installPlugin(new PostgreSqlPlugin());
queryRunner.createCatalog("postgresql", "postgresql", connectorProperties);
copyTpchTables(queryRunner, "tpch", TINY_SCHEMA_NAME, createSession(), tables);
return queryRunner;
} catch (Throwable e) {
closeAllSuppress(e, queryRunner, server);
throw e;
}
}
use of io.prestosql.plugin.tpch.TpchPlugin in project hetu-core by openlookeng.
the class TestMemoryManager method createQueryRunner.
public static DistributedQueryRunner createQueryRunner(Session session, Map<String, String> properties) throws Exception {
DistributedQueryRunner queryRunner = new DistributedQueryRunner(session, 2, properties);
try {
queryRunner.installPlugin(new TpchPlugin());
queryRunner.createCatalog("tpch", "tpch");
return queryRunner;
} catch (Exception e) {
queryRunner.close();
throw e;
}
}
use of io.prestosql.plugin.tpch.TpchPlugin in project hetu-core by openlookeng.
the class TestDistributedSpilledQueries method createQueryRunner.
public static DistributedQueryRunner createQueryRunner() throws Exception {
Session defaultSession = testSessionBuilder().setCatalog("tpch").setSchema(TINY_SCHEMA_NAME).setSystemProperty(SystemSessionProperties.TASK_CONCURRENCY, "2").setSystemProperty(SystemSessionProperties.SPILL_ENABLED, "true").setSystemProperty(SystemSessionProperties.SPILL_ORDER_BY, "true").setSystemProperty(SystemSessionProperties.AGGREGATION_OPERATOR_UNSPILL_MEMORY_LIMIT, "128kB").build();
Map<String, String> extraProperties = new HashMap<String, String>();
extraProperties.put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills").toString());
extraProperties.put("experimental.spiller-max-used-space-threshold", "1.0");
// revoke always
extraProperties.put("experimental.memory-revoking-threshold", "0.0");
extraProperties.put("experimental.memory-revoking-target", "0.0");
extraProperties.put("experimental.spiller-spill-to-hdfs", "false");
DistributedQueryRunner queryRunner = new DistributedQueryRunner(defaultSession, 2, extraProperties);
try {
queryRunner.installPlugin(new TpchPlugin());
queryRunner.installPlugin(new HetuFileSystemClientPlugin());
queryRunner.createCatalog("tpch", "tpch");
return queryRunner;
} catch (Exception e) {
queryRunner.close();
throw e;
}
}
use of io.prestosql.plugin.tpch.TpchPlugin in project hetu-core by openlookeng.
the class TestBeginQuery method setUp.
@BeforeClass
public void setUp() {
metadata = new TestMetadata();
getQueryRunner().installPlugin(new TestPlugin(metadata));
getQueryRunner().installPlugin(new TpchPlugin());
getQueryRunner().createCatalog("test", "test", ImmutableMap.of());
getQueryRunner().createCatalog("tpch", "tpch", ImmutableMap.of());
}
use of io.prestosql.plugin.tpch.TpchPlugin in project hetu-core by openlookeng.
the class TestDataCenterHTTPClientV1 method createQueryRunner.
public static DistributedQueryRunner createQueryRunner(Session session) throws Exception {
DistributedQueryRunner distributedQueryRunner = DistributedQueryRunner.builder(session).setNodeCount(2).build();
try {
distributedQueryRunner.installPlugin(new TpchPlugin());
distributedQueryRunner.createCatalog("tpch", "tpch");
return distributedQueryRunner;
} catch (Exception e) {
distributedQueryRunner.close();
throw e;
}
}
Aggregations