use of com.facebook.presto.functionNamespace.mysql.MySqlFunctionNamespaceManagerModule in project presto by prestodb.
the class H2FunctionNamespaceManagerFactory method create.
@Override
public FunctionNamespaceManager<?> create(String catalogName, Map<String, String> config, FunctionNamespaceManagerContext context) {
try {
Bootstrap app = new Bootstrap(new DriftNettyClientModule(), new MySqlFunctionNamespaceManagerModule(catalogName), new H2ConnectionModule(), new SimpleAddressSqlFunctionExecutorsModule());
Injector injector = app.doNotInitializeLogging().setRequiredConfigurationProperties(config).initialize();
return injector.getInstance(MySqlFunctionNamespaceManager.class);
} catch (Exception e) {
throwIfUnchecked(e);
throw new RuntimeException(e);
}
}
Aggregations