.put("datasources", "default,tpch,tpch_sampled");
if (coordinator) {
properties.put("node-scheduler.include-coordinator", "false");
}
TestingPrestoServer server = new TestingPrestoServer(coordinator, properties.build(), ENVIRONMENT, discoveryUri, ImmutableList.<Module>of());
// install tpch plugins
server.installPlugin(new TpchPlugin());
server.createConnection("tpch", "tpch");
server.installPlugin(new SampledTpchPlugin());
server.createConnection("tpch_sampled", "tpch_sampled");
// install raptor plugin
File baseDir = server.getBaseDataDir().toFile();
Map<String, String> raptorProperties = ImmutableMap.<String, String>builder()
.put("metadata.db.type", "h2")
.put("metadata.db.filename", new File(baseDir, "db").getAbsolutePath())
.put("storage.data-directory", new File(baseDir, "data").getAbsolutePath())
.build();
server.installPlugin(new RaptorPlugin());
server.createConnection("default", "raptor", raptorProperties);
return server;
}