Search in sources :

Example 1 with Catalog

use of com.facebook.presto.server.testing.TestingPrestoServerLauncherOptions.Catalog in project presto by prestodb.

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).newInstance();
            server.installPlugin(plugin);
        }
        for (Catalog catalog : options.getCatalogs()) {
            server.createCatalog(catalog.getCatalogName(), catalog.getConnectorName());
        }
        System.out.println(server.getAddress());
        waitForInterruption();
    }
}
Also used : Catalog(com.facebook.presto.server.testing.TestingPrestoServerLauncherOptions.Catalog) Plugin(com.facebook.presto.spi.Plugin)

Aggregations

Catalog (com.facebook.presto.server.testing.TestingPrestoServerLauncherOptions.Catalog)1 Plugin (com.facebook.presto.spi.Plugin)1