Search in sources :

Example 6 with Plugin

use of com.facebook.presto.spi.Plugin 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

Plugin (com.facebook.presto.spi.Plugin)6 ConnectorFactory (com.facebook.presto.spi.connector.ConnectorFactory)2 TestingConnectorContext (com.facebook.presto.testing.TestingConnectorContext)2 DistributedQueryRunner (com.facebook.presto.tests.DistributedQueryRunner)2 TpchPlugin (com.facebook.presto.tpch.TpchPlugin)2 ImmutableMap (com.google.common.collect.ImmutableMap)2 Test (org.testng.annotations.Test)2 H2ResourceGroupsDao (com.facebook.presto.resourceGroups.db.H2ResourceGroupsDao)1 Catalog (com.facebook.presto.server.testing.TestingPrestoServerLauncherOptions.Catalog)1 SqlParserOptions (com.facebook.presto.sql.parser.SqlParserOptions)1