use of com.facebook.presto.plugin.blackhole.BlackHolePlugin in project presto by prestodb.
the class TestProxyServer method setupServer.
@BeforeClass
public void setupServer() throws Exception {
byte[] sharedSecret = Base64.getMimeEncoder().encode("test secret".getBytes(US_ASCII));
sharedSecretFile = Files.createTempFile("secret", "txt");
Files.write(sharedSecretFile, sharedSecret);
Logging.initialize();
server = new TestingPrestoServer();
server.installPlugin(new TpchPlugin());
server.createCatalog("tpch", "tpch");
server.installPlugin(new BlackHolePlugin());
server.createCatalog("blackhole", "blackhole");
server.refreshNodes();
Bootstrap app = new Bootstrap(new TestingNodeModule("test"), new TestingHttpServerModule(), new JsonModule(), new JaxrsModule(true), new TestingJmxModule(), new ProxyModule());
Injector injector = app.doNotInitializeLogging().setRequiredConfigurationProperty("proxy.uri", server.getBaseUrl().toString()).setRequiredConfigurationProperty("proxy.shared-secret-file", sharedSecretFile.toString()).quiet().initialize();
lifeCycleManager = injector.getInstance(LifeCycleManager.class);
httpServerInfo = injector.getInstance(HttpServerInfo.class);
executorService = newCachedThreadPool(daemonThreadsNamed("test-%s"));
setupTestTable();
}
use of com.facebook.presto.plugin.blackhole.BlackHolePlugin in project presto by prestodb.
the class TestJdbcWarnings method setupServer.
@BeforeClass
public void setupServer() throws Exception {
server = new TestingPrestoServer(true, ImmutableMap.<String, String>builder().put("testing-warning-collector.add-warnings", "true").put("testing-warning-collector.preloaded-warnings", String.valueOf(PRELOADED_WARNINGS)).build(), null, null, new SqlParserOptions(), ImmutableList.of());
server.installPlugin(new TpchPlugin());
server.createCatalog("tpch", "tpch");
server.installPlugin(new BlackHolePlugin());
server.createCatalog("blackhole", "blackhole");
waitForNodeRefresh(server);
}
use of com.facebook.presto.plugin.blackhole.BlackHolePlugin in project presto by prestodb.
the class TestJdbcPreparedStatement method setup.
@BeforeClass
public void setup() throws Exception {
Logging.initialize();
server = new TestingPrestoServer();
server.installPlugin(new BlackHolePlugin());
server.createCatalog("blackhole", "blackhole");
waitForNodeRefresh(server);
try (Connection connection = createConnection();
Statement statement = connection.createStatement()) {
statement.executeUpdate("CREATE SCHEMA blackhole.blackhole");
}
}
use of com.facebook.presto.plugin.blackhole.BlackHolePlugin 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");
Catalog bogusTestingCatalog = createBogusTestingCatalog(TESTING_CATALOG);
server.getCatalogManager().registerCatalog(bogusTestingCatalog);
SessionPropertyManager sessionPropertyManager = server.getMetadata().getSessionPropertyManager();
sessionPropertyManager.addConnectorSessionProperties(bogusTestingCatalog.getConnectorId(), TEST_CATALOG_PROPERTIES);
waitForNodeRefresh(server);
setupTestTables();
executorService = newCachedThreadPool(daemonThreadsNamed("test-%s"));
}
Aggregations