use of io.trino.plugin.raptor.legacy.security.RaptorSecurityModule in project trino by trinodb.
the class RaptorConnectorFactory method create.
@Override
public Connector create(String catalogName, Map<String, String> config, ConnectorContext context) {
Bootstrap app = new Bootstrap(new CatalogNameModule(catalogName), new JsonModule(), new MBeanModule(), new ConnectorObjectNameGeneratorModule(catalogName, "io.trino.plugin.raptor.legacy", "trino.plugin.raptor.legacy"), new MBeanServerModule(), binder -> {
binder.bind(NodeManager.class).toInstance(context.getNodeManager());
binder.bind(PageSorter.class).toInstance(context.getPageSorter());
binder.bind(TypeManager.class).toInstance(context.getTypeManager());
}, metadataModule, new BackupModule(backupProviders), new StorageModule(), new RaptorModule(), new RaptorSecurityModule());
Injector injector = app.doNotInitializeLogging().setRequiredConfigurationProperties(config).initialize();
return injector.getInstance(RaptorConnector.class);
}
Aggregations