Search in sources :

Example 1 with StorageModule

use of io.trino.plugin.raptor.legacy.storage.StorageModule 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);
}
Also used : MBeanModule(org.weakref.jmx.guice.MBeanModule) StorageModule(io.trino.plugin.raptor.legacy.storage.StorageModule) CatalogNameModule(io.trino.plugin.base.CatalogNameModule) BackupModule(io.trino.plugin.raptor.legacy.backup.BackupModule) RaptorSecurityModule(io.trino.plugin.raptor.legacy.security.RaptorSecurityModule) ConnectorObjectNameGeneratorModule(io.trino.plugin.base.jmx.ConnectorObjectNameGeneratorModule) JsonModule(io.airlift.json.JsonModule) NodeManager(io.trino.spi.NodeManager) MBeanServerModule(io.trino.plugin.base.jmx.MBeanServerModule) Injector(com.google.inject.Injector) Bootstrap(io.airlift.bootstrap.Bootstrap) PageSorter(io.trino.spi.PageSorter) TypeManager(io.trino.spi.type.TypeManager)

Aggregations

Injector (com.google.inject.Injector)1 Bootstrap (io.airlift.bootstrap.Bootstrap)1 JsonModule (io.airlift.json.JsonModule)1 CatalogNameModule (io.trino.plugin.base.CatalogNameModule)1 ConnectorObjectNameGeneratorModule (io.trino.plugin.base.jmx.ConnectorObjectNameGeneratorModule)1 MBeanServerModule (io.trino.plugin.base.jmx.MBeanServerModule)1 BackupModule (io.trino.plugin.raptor.legacy.backup.BackupModule)1 RaptorSecurityModule (io.trino.plugin.raptor.legacy.security.RaptorSecurityModule)1 StorageModule (io.trino.plugin.raptor.legacy.storage.StorageModule)1 NodeManager (io.trino.spi.NodeManager)1 PageSorter (io.trino.spi.PageSorter)1 TypeManager (io.trino.spi.type.TypeManager)1 MBeanModule (org.weakref.jmx.guice.MBeanModule)1