use of com.facebook.presto.raptor.RaptorPlugin in project presto by prestodb.
the class TestRaptorIntegrationSmokeTestMySql method createRaptorMySqlQueryRunner.
private static DistributedQueryRunner createRaptorMySqlQueryRunner(String mysqlUrl) throws Exception {
DistributedQueryRunner queryRunner = new DistributedQueryRunner(createSession("tpch"), 2);
queryRunner.installPlugin(new TpchPlugin());
queryRunner.createCatalog("tpch", "tpch");
queryRunner.installPlugin(new RaptorPlugin());
File baseDir = queryRunner.getCoordinator().getBaseDataDir().toFile();
Map<String, String> raptorProperties = ImmutableMap.<String, String>builder().put("metadata.db.type", "mysql").put("metadata.db.url", mysqlUrl).put("storage.data-directory", new File(baseDir, "data").toURI().toString()).put("storage.max-shard-rows", "2000").put("backup.provider", "file").put("raptor.startup-grace-period", "10s").put("backup.directory", new File(baseDir, "backup").getAbsolutePath()).build();
queryRunner.createCatalog("raptor", "raptor", raptorProperties);
copyTables(queryRunner, "tpch", createSession(), false);
return queryRunner;
}
Aggregations