Search in sources :

Example 21 with IOModule

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

the class ExploreDisabledTest method createInMemoryModules.

private static List<Module> createInMemoryModules(CConfiguration configuration, Configuration hConf) {
    configuration.set(Constants.CFG_DATA_INMEMORY_PERSISTENCE, Constants.InMemoryPersistenceType.MEMORY.name());
    configuration.setBoolean(Constants.Explore.EXPLORE_ENABLED, false);
    configuration.set(Constants.Explore.LOCAL_DATA_DIR, new File(System.getProperty("java.io.tmpdir"), "hive").getAbsolutePath());
    return ImmutableList.of(new ConfigModule(configuration, hConf), new IOModule(), new DiscoveryRuntimeModule().getInMemoryModules(), new NonCustomLocationUnitTestModule().getModule(), new DataFabricModules().getInMemoryModules(), new DataSetsModules().getStandaloneModules(), new DataSetServiceModules().getInMemoryModules(), new MetricsClientRuntimeModule().getInMemoryModules(), new ExploreRuntimeModule().getInMemoryModules(), new ExploreClientModule(), new ViewAdminModules().getInMemoryModules(), new StreamAdminModules().getInMemoryModules(), new NotificationServiceRuntimeModule().getInMemoryModules(), new NamespaceClientRuntimeModule().getInMemoryModules(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new AbstractModule() {

        @Override
        protected void configure() {
            bind(NotificationFeedManager.class).to(NoOpNotificationFeedManager.class);
            bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
            bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
        }
    });
}
Also used : IOModule(co.cask.cdap.common.guice.IOModule) NamespaceClientRuntimeModule(co.cask.cdap.common.namespace.guice.NamespaceClientRuntimeModule) DataSetServiceModules(co.cask.cdap.data.runtime.DataSetServiceModules) UnsupportedUGIProvider(co.cask.cdap.security.impersonation.UnsupportedUGIProvider) ConfigModule(co.cask.cdap.common.guice.ConfigModule) AuthenticationContextModules(co.cask.cdap.security.auth.context.AuthenticationContextModules) DataSetsModules(co.cask.cdap.data.runtime.DataSetsModules) ExploreRuntimeModule(co.cask.cdap.explore.guice.ExploreRuntimeModule) NonCustomLocationUnitTestModule(co.cask.cdap.common.guice.NonCustomLocationUnitTestModule) MetricsClientRuntimeModule(co.cask.cdap.metrics.guice.MetricsClientRuntimeModule) NotificationServiceRuntimeModule(co.cask.cdap.notifications.guice.NotificationServiceRuntimeModule) DefaultOwnerAdmin(co.cask.cdap.security.impersonation.DefaultOwnerAdmin) AuthorizationTestModule(co.cask.cdap.security.authorization.AuthorizationTestModule) ViewAdminModules(co.cask.cdap.data.view.ViewAdminModules) AbstractModule(com.google.inject.AbstractModule) StreamAdminModules(co.cask.cdap.data.stream.StreamAdminModules) ExploreClientModule(co.cask.cdap.explore.guice.ExploreClientModule) NoOpNotificationFeedManager(co.cask.cdap.notifications.feeds.service.NoOpNotificationFeedManager) File(java.io.File) DiscoveryRuntimeModule(co.cask.cdap.common.guice.DiscoveryRuntimeModule) DataFabricModules(co.cask.cdap.data.runtime.DataFabricModules) AuthorizationEnforcementModule(co.cask.cdap.security.authorization.AuthorizationEnforcementModule)

Aggregations

IOModule (co.cask.cdap.common.guice.IOModule)21 ConfigModule (co.cask.cdap.common.guice.ConfigModule)20 DiscoveryRuntimeModule (co.cask.cdap.common.guice.DiscoveryRuntimeModule)19 CConfiguration (co.cask.cdap.common.conf.CConfiguration)13 DataSetsModules (co.cask.cdap.data.runtime.DataSetsModules)13 ExploreClientModule (co.cask.cdap.explore.guice.ExploreClientModule)13 AuthorizationEnforcementModule (co.cask.cdap.security.authorization.AuthorizationEnforcementModule)13 AbstractModule (com.google.inject.AbstractModule)13 DataFabricModules (co.cask.cdap.data.runtime.DataFabricModules)12 DataSetServiceModules (co.cask.cdap.data.runtime.DataSetServiceModules)12 MetricsClientRuntimeModule (co.cask.cdap.metrics.guice.MetricsClientRuntimeModule)11 NonCustomLocationUnitTestModule (co.cask.cdap.common.guice.NonCustomLocationUnitTestModule)9 StreamAdminModules (co.cask.cdap.data.stream.StreamAdminModules)9 ViewAdminModules (co.cask.cdap.data.view.ViewAdminModules)9 NotificationServiceRuntimeModule (co.cask.cdap.notifications.guice.NotificationServiceRuntimeModule)9 Injector (com.google.inject.Injector)9 AuthenticationContextModules (co.cask.cdap.security.auth.context.AuthenticationContextModules)8 UnsupportedUGIProvider (co.cask.cdap.security.impersonation.UnsupportedUGIProvider)8 NamespaceStoreModule (co.cask.cdap.store.guice.NamespaceStoreModule)8 ZKClientModule (co.cask.cdap.common.guice.ZKClientModule)7