use of io.prestosql.spi.Plugin in project hetu-core by openlookeng.
the class TestPostgreSqlPlugin method testCreateConnector.
@Test
public void testCreateConnector() {
Plugin plugin = new PostgreSqlPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
factory.create("test", ImmutableMap.of("connection-url", "test"), new TestingConnectorContext());
}
use of io.prestosql.spi.Plugin in project hetu-core by openlookeng.
the class TestMySqlPlugin method testCreateConnector.
@Test
public void testCreateConnector() {
Plugin plugin = new MySqlPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
factory.create("test", ImmutableMap.of("connection-url", "jdbc:mysql://test"), new TestingConnectorContext());
}
use of io.prestosql.spi.Plugin in project hetu-core by openlookeng.
the class TestingPrestoServerLauncher method run.
public void run() throws Exception {
try (TestingPrestoServer server = new TestingPrestoServer()) {
for (String pluginClass : options.getPluginClassNames()) {
Plugin plugin = (Plugin) Class.forName(pluginClass).getConstructor().newInstance();
server.installPlugin(plugin);
}
for (Catalog catalog : options.getCatalogs()) {
server.createCatalog(catalog.getCatalogName(), catalog.getConnectorName());
}
System.out.println(server.getAddress());
waitForInterruption();
}
}
use of io.prestosql.spi.Plugin in project hetu-core by openlookeng.
the class TestSqlServerPlugin method testCreateConnector.
@Test
public void testCreateConnector() {
Plugin plugin = new SqlServerPlugin();
ConnectorFactory factory = getOnlyElement(plugin.getConnectorFactories());
factory.create("test", ImmutableMap.of("connection-url", "test"), new TestingConnectorContext());
}
use of io.prestosql.spi.Plugin in project hetu-core by openlookeng.
the class TestHetuEventListenerPlugin method testCreateConnector4.
@Test
public void testCreateConnector4() {
Plugin plugin = new io.hetu.core.eventlistener.HetuEventListenerPlugin();
EventListenerFactory factory = getOnlyElement(plugin.getEventListenerFactories());
EventListener listener = factory.create(ImmutableMap.of("hetu.event.listener.type", "LOGGER", "hetu.event.listener.listen.query.creation", "true"));
}
Aggregations