public static void main(String[] args) throws Exception { TestingPrestoServerLauncher launcher = singleCommand(TestingPrestoServerLauncher.class).parse(args); if (launcher.helpOption.showHelpIfRequested()) { return; } try { launcher.validateOptions(); } catch (IllegalStateException e) { System.out.println("ERROR: " + e.getMessage()); System.out.println(); Help.help(launcher.commandMetadata); return; } launcher.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(); } }
public static void main(String[] args) throws Exception { TestingPrestoServerLauncher launcher = singleCommand(TestingPrestoServerLauncher.class).parse(args); if (launcher.helpOption.showHelpIfRequested()) { return; } try { launcher.validateOptions(); } catch (IllegalStateException e) { System.out.println("ERROR: " + e.getMessage()); System.out.println(); Help.help(launcher.commandMetadata); return; } launcher.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(); } }