use of com.facebook.presto.tpch.TpchPlugin in project presto by prestodb.
the class TestPrestoDriver method setup.
@BeforeClass
public void setup() throws Exception {
Logging.initialize();
server = new TestingPrestoServer();
server.installPlugin(new TpchPlugin());
server.createCatalog(TEST_CATALOG, "tpch");
server.installPlugin(new BlackHolePlugin());
server.createCatalog("blackhole", "blackhole");
waitForNodeRefresh(server);
setupTestTables();
executorService = newCachedThreadPool(daemonThreadsNamed("test-%s"));
}
use of com.facebook.presto.tpch.TpchPlugin in project presto by prestodb.
the class AccumuloQueryRunner method createAccumuloQueryRunner.
public static synchronized DistributedQueryRunner createAccumuloQueryRunner(Map<String, String> extraProperties) throws Exception {
DistributedQueryRunner queryRunner = new DistributedQueryRunner(createSession(), 4, extraProperties);
queryRunner.installPlugin(new TpchPlugin());
queryRunner.createCatalog("tpch", "tpch");
queryRunner.installPlugin(new AccumuloPlugin());
Map<String, String> accumuloProperties = ImmutableMap.<String, String>builder().put(AccumuloConfig.INSTANCE, connector.getInstance().getInstanceName()).put(AccumuloConfig.ZOOKEEPERS, connector.getInstance().getZooKeepers()).put(AccumuloConfig.USERNAME, MAC_USER).put(AccumuloConfig.PASSWORD, MAC_PASSWORD).put(AccumuloConfig.ZOOKEEPER_METADATA_ROOT, "/presto-accumulo-test").build();
queryRunner.createCatalog("accumulo", "accumulo", accumuloProperties);
if (!tpchLoaded) {
copyTpchTables(queryRunner, "tpch", TINY_SCHEMA_NAME, createSession(), TpchTable.getTables());
connector.tableOperations().addSplits("tpch.orders", ImmutableSortedSet.of(new Text(new LexicoderRowSerializer().encode(BIGINT, 7500L))));
tpchLoaded = true;
}
return queryRunner;
}
use of com.facebook.presto.tpch.TpchPlugin in project presto by prestodb.
the class RaptorQueryRunner method createRaptorQueryRunner.
public static DistributedQueryRunner createRaptorQueryRunner(Map<String, String> extraProperties, boolean loadTpch, boolean bucketed) throws Exception {
DistributedQueryRunner queryRunner = new DistributedQueryRunner(createSession("tpch"), 2, extraProperties);
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", "h2").put("metadata.db.connections.max", "100").put("metadata.db.filename", new File(baseDir, "db").getAbsolutePath()).put("storage.data-directory", new File(baseDir, "data").getAbsolutePath()).put("storage.max-shard-rows", "2000").put("backup.provider", "file").put("backup.directory", new File(baseDir, "backup").getAbsolutePath()).build();
queryRunner.createCatalog("raptor", "raptor", raptorProperties);
if (loadTpch) {
copyTables(queryRunner, "tpch", createSession(), bucketed);
}
return queryRunner;
}
use of com.facebook.presto.tpch.TpchPlugin in project presto by prestodb.
the class TpchQueryRunner method createQueryRunner.
public static DistributedQueryRunner createQueryRunner(Map<String, String> extraProperties, Map<String, String> coordinatorProperties) throws Exception {
Session session = testSessionBuilder().setSource("test").setCatalog("tpch").setSchema("tiny").build();
DistributedQueryRunner queryRunner = new DistributedQueryRunner(session, 4, extraProperties, coordinatorProperties, new SqlParserOptions());
try {
queryRunner.installPlugin(new TpchPlugin());
queryRunner.createCatalog("tpch", "tpch");
return queryRunner;
} catch (Exception e) {
queryRunner.close();
throw e;
}
}
use of com.facebook.presto.tpch.TpchPlugin in project presto by prestodb.
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;
}
}
Aggregations