Search in sources :

Example 16 with LocationRuntimeModule

use of co.cask.cdap.common.guice.LocationRuntimeModule in project cdap by caskdata.

the class MetadataStoreTest method setup.

@BeforeClass
public static void setup() throws IOException {
    Injector injector = Guice.createInjector(new ConfigModule(), Modules.override(new DataSetsModules().getInMemoryModules()).with(new AbstractModule() {

        @Override
        protected void configure() {
            // Need the distributed metadata store.
            bind(MetadataStore.class).to(DefaultMetadataStore.class);
        }
    }), new LocationRuntimeModule().getInMemoryModules(), new TransactionInMemoryModule(), new SystemDatasetRuntimeModule().getInMemoryModules(), new NamespaceClientRuntimeModule().getInMemoryModules(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new AuditModule().getInMemoryModules());
    cConf = injector.getInstance(CConfiguration.class);
    txManager = injector.getInstance(TransactionManager.class);
    txManager.startAndWait();
    store = injector.getInstance(MetadataStore.class);
    auditPublisher = injector.getInstance(InMemoryAuditPublisher.class);
}
Also used : NamespaceClientRuntimeModule(co.cask.cdap.common.namespace.guice.NamespaceClientRuntimeModule) TransactionInMemoryModule(org.apache.tephra.runtime.TransactionInMemoryModule) ConfigModule(co.cask.cdap.common.guice.ConfigModule) AuthenticationContextModules(co.cask.cdap.security.auth.context.AuthenticationContextModules) DataSetsModules(co.cask.cdap.data.runtime.DataSetsModules) LocationRuntimeModule(co.cask.cdap.common.guice.LocationRuntimeModule) AuthorizationTestModule(co.cask.cdap.security.authorization.AuthorizationTestModule) CConfiguration(co.cask.cdap.common.conf.CConfiguration) AbstractModule(com.google.inject.AbstractModule) InMemoryAuditPublisher(co.cask.cdap.data2.audit.InMemoryAuditPublisher) Injector(com.google.inject.Injector) TransactionManager(org.apache.tephra.TransactionManager) SystemDatasetRuntimeModule(co.cask.cdap.data.runtime.SystemDatasetRuntimeModule) AuditModule(co.cask.cdap.data2.audit.AuditModule) AuthorizationEnforcementModule(co.cask.cdap.security.authorization.AuthorizationEnforcementModule) BeforeClass(org.junit.BeforeClass)

Aggregations

ConfigModule (co.cask.cdap.common.guice.ConfigModule)16 LocationRuntimeModule (co.cask.cdap.common.guice.LocationRuntimeModule)16 DataSetsModules (co.cask.cdap.data.runtime.DataSetsModules)14 AuthorizationEnforcementModule (co.cask.cdap.security.authorization.AuthorizationEnforcementModule)14 AbstractModule (com.google.inject.AbstractModule)13 CConfiguration (co.cask.cdap.common.conf.CConfiguration)12 AuthenticationContextModules (co.cask.cdap.security.auth.context.AuthenticationContextModules)11 DiscoveryRuntimeModule (co.cask.cdap.common.guice.DiscoveryRuntimeModule)10 DataFabricModules (co.cask.cdap.data.runtime.DataFabricModules)9 SystemDatasetRuntimeModule (co.cask.cdap.data.runtime.SystemDatasetRuntimeModule)9 AuthorizationTestModule (co.cask.cdap.security.authorization.AuthorizationTestModule)8 Injector (com.google.inject.Injector)8 BeforeClass (org.junit.BeforeClass)8 ZKClientModule (co.cask.cdap.common.guice.ZKClientModule)7 ExploreClientModule (co.cask.cdap.explore.guice.ExploreClientModule)7 NamespaceStoreModule (co.cask.cdap.store.guice.NamespaceStoreModule)7 NamespaceClientRuntimeModule (co.cask.cdap.common.namespace.guice.NamespaceClientRuntimeModule)6 TransactionManager (org.apache.tephra.TransactionManager)6 AppFabricServiceRuntimeModule (co.cask.cdap.app.guice.AppFabricServiceRuntimeModule)5 AuthorizationModule (co.cask.cdap.app.guice.AuthorizationModule)5