Search in sources :

Example 1 with StreamServiceRuntimeModule

use of co.cask.cdap.data.stream.service.StreamServiceRuntimeModule in project cdap by caskdata.

the class GatewayTestBase method startGateway.

public static Injector startGateway(final CConfiguration conf) throws Exception {
    // Set up our Guice injections
    injector = Guice.createInjector(Modules.override(new AbstractModule() {

        @Override
        protected void configure() {
        }

        @SuppressWarnings("unused")
        @Provides
        @Named(Constants.Router.ADDRESS)
        public final InetAddress providesHostname(CConfiguration cConf) {
            return Networks.resolve(cConf.get(Constants.Router.ADDRESS), new InetSocketAddress("localhost", 0).getAddress());
        }
    }, new SecurityModules().getInMemoryModules(), new NotificationServiceRuntimeModule().getInMemoryModules(), new AppFabricTestModule(conf)).with(new AbstractModule() {

        @Override
        protected void configure() {
            install(new StreamServiceRuntimeModule().getStandaloneModules());
            // It's a bit hacky to add it here. Need to refactor these
            // bindings out as it overlaps with
            // AppFabricServiceModule
            bind(LogReader.class).to(MockLogReader.class).in(Scopes.SINGLETON);
            bind(StreamConsumerStateStoreFactory.class).to(LevelDBStreamConsumerStateStoreFactory.class).in(Singleton.class);
            bind(StreamAdmin.class).to(FileStreamAdmin.class).in(Singleton.class);
            bind(StreamConsumerFactory.class).to(LevelDBStreamFileConsumerFactory.class).in(Singleton.class);
            bind(StreamFileWriterFactory.class).to(LocationStreamFileWriterFactory.class).in(Singleton.class);
            bind(PrivilegesManager.class).to(NoOpAuthorizer.class);
            bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
        }
    }));
    messagingService = injector.getInstance(MessagingService.class);
    if (messagingService instanceof Service) {
        ((Service) messagingService).startAndWait();
    }
    txService = injector.getInstance(TransactionManager.class);
    txService.startAndWait();
    dsOpService = injector.getInstance(DatasetOpExecutor.class);
    dsOpService.startAndWait();
    datasetService = injector.getInstance(DatasetService.class);
    datasetService.startAndWait();
    appFabricServer = injector.getInstance(AppFabricServer.class);
    appFabricServer.startAndWait();
    metricsQueryService = injector.getInstance(MetricsQueryService.class);
    metricsQueryService.startAndWait();
    metricsCollectionService = injector.getInstance(MetricsCollectionService.class);
    metricsCollectionService.startAndWait();
    notificationService = injector.getInstance(NotificationService.class);
    notificationService.startAndWait();
    streamService = injector.getInstance(StreamService.class);
    streamService.startAndWait();
    namespaceAdmin = injector.getInstance(NamespaceAdmin.class);
    namespaceAdmin.create(TEST_NAMESPACE_META1);
    namespaceAdmin.create(TEST_NAMESPACE_META2);
    // Restart handlers to check if they are resilient across restarts.
    router = injector.getInstance(NettyRouter.class);
    router.startAndWait();
    Map<String, Integer> serviceMap = Maps.newHashMap();
    for (Map.Entry<Integer, String> entry : router.getServiceLookup().getServiceMap().entrySet()) {
        serviceMap.put(entry.getValue(), entry.getKey());
    }
    port = serviceMap.get(Constants.Service.GATEWAY);
    return injector;
}
Also used : InetSocketAddress(java.net.InetSocketAddress) AppFabricServer(co.cask.cdap.internal.app.services.AppFabricServer) NoOpAuthorizer(co.cask.cdap.security.spi.authorization.NoOpAuthorizer) DatasetService(co.cask.cdap.data2.datafabric.dataset.service.DatasetService) NotificationServiceRuntimeModule(co.cask.cdap.notifications.guice.NotificationServiceRuntimeModule) StreamConsumerFactory(co.cask.cdap.data2.transaction.stream.StreamConsumerFactory) SecurityModules(co.cask.cdap.security.guice.SecurityModules) StreamServiceRuntimeModule(co.cask.cdap.data.stream.service.StreamServiceRuntimeModule) StreamService(co.cask.cdap.data.stream.service.StreamService) MetricsQueryService(co.cask.cdap.metrics.query.MetricsQueryService) MetricsCollectionService(co.cask.cdap.api.metrics.MetricsCollectionService) NamespaceAdmin(co.cask.cdap.common.namespace.NamespaceAdmin) MessagingService(co.cask.cdap.messaging.MessagingService) MetricsCollectionService(co.cask.cdap.api.metrics.MetricsCollectionService) MetricsQueryService(co.cask.cdap.metrics.query.MetricsQueryService) StreamService(co.cask.cdap.data.stream.service.StreamService) NotificationService(co.cask.cdap.notifications.service.NotificationService) DatasetService(co.cask.cdap.data2.datafabric.dataset.service.DatasetService) Service(com.google.common.util.concurrent.Service) NotificationService(co.cask.cdap.notifications.service.NotificationService) DatasetOpExecutor(co.cask.cdap.data2.datafabric.dataset.service.executor.DatasetOpExecutor) DefaultOwnerAdmin(co.cask.cdap.security.impersonation.DefaultOwnerAdmin) CConfiguration(co.cask.cdap.common.conf.CConfiguration) NettyRouter(co.cask.cdap.gateway.router.NettyRouter) AbstractModule(com.google.inject.AbstractModule) MessagingService(co.cask.cdap.messaging.MessagingService) StreamAdmin(co.cask.cdap.data2.transaction.stream.StreamAdmin) FileStreamAdmin(co.cask.cdap.data2.transaction.stream.FileStreamAdmin) StreamFileWriterFactory(co.cask.cdap.data.stream.StreamFileWriterFactory) LocationStreamFileWriterFactory(co.cask.cdap.data.runtime.LocationStreamFileWriterFactory) Singleton(com.google.inject.Singleton) TransactionManager(org.apache.tephra.TransactionManager) MockLogReader(co.cask.cdap.gateway.handlers.log.MockLogReader) LogReader(co.cask.cdap.logging.read.LogReader) AppFabricTestModule(co.cask.cdap.internal.guice.AppFabricTestModule) Map(java.util.Map) StreamConsumerStateStoreFactory(co.cask.cdap.data2.transaction.stream.StreamConsumerStateStoreFactory) LevelDBStreamConsumerStateStoreFactory(co.cask.cdap.data2.transaction.stream.leveldb.LevelDBStreamConsumerStateStoreFactory)

Example 2 with StreamServiceRuntimeModule

use of co.cask.cdap.data.stream.service.StreamServiceRuntimeModule in project cdap by caskdata.

the class StandaloneMain method createPersistentModules.

private static List<Module> createPersistentModules(CConfiguration cConf, Configuration hConf) {
    cConf.setIfUnset(Constants.CFG_DATA_LEVELDB_DIR, Constants.DEFAULT_DATA_LEVELDB_DIR);
    cConf.set(Constants.CFG_DATA_INMEMORY_PERSISTENCE, Constants.InMemoryPersistenceType.LEVELDB.name());
    // configure all services except for router and auth to bind to 127.0.0.1
    String localhost = InetAddress.getLoopbackAddress().getHostAddress();
    cConf.set(Constants.Service.MASTER_SERVICES_BIND_ADDRESS, localhost);
    cConf.set(Constants.Transaction.Container.ADDRESS, localhost);
    cConf.set(Constants.Dataset.Executor.ADDRESS, localhost);
    cConf.set(Constants.Stream.ADDRESS, localhost);
    cConf.set(Constants.Metrics.ADDRESS, localhost);
    cConf.set(Constants.MetricsProcessor.ADDRESS, localhost);
    cConf.set(Constants.LogSaver.ADDRESS, localhost);
    cConf.set(Constants.Explore.SERVER_ADDRESS, localhost);
    cConf.set(Constants.Metadata.SERVICE_BIND_ADDRESS, localhost);
    cConf.set(Constants.Preview.ADDRESS, localhost);
    return ImmutableList.of(new ConfigModule(cConf, hConf), new IOModule(), new ZKClientModule(), new KafkaClientModule(), new MetricsHandlerModule(), new DiscoveryRuntimeModule().getStandaloneModules(), new LocationRuntimeModule().getStandaloneModules(), new ProgramRunnerRuntimeModule().getStandaloneModules(), new DataFabricModules(StandaloneMain.class.getName()).getStandaloneModules(), new DataSetsModules().getStandaloneModules(), new DataSetServiceModules().getStandaloneModules(), new MetricsClientRuntimeModule().getStandaloneModules(), new LoggingModules().getStandaloneModules(), new LogReaderRuntimeModules().getStandaloneModules(), new RouterModules().getStandaloneModules(), new SecurityModules().getStandaloneModules(), new SecureStoreModules().getStandaloneModules(), new StreamServiceRuntimeModule().getStandaloneModules(), new ExploreRuntimeModule().getStandaloneModules(), new ServiceStoreModules().getStandaloneModules(), new ExploreClientModule(), new NotificationFeedServiceRuntimeModule().getStandaloneModules(), new NotificationServiceRuntimeModule().getStandaloneModules(), new ViewAdminModules().getStandaloneModules(), new StreamAdminModules().getStandaloneModules(), new NamespaceStoreModule().getStandaloneModules(), new MetadataServiceModule(), new RemoteSystemOperationsServiceModule(), new AuditModule().getStandaloneModules(), new AuthorizationModule(), new AuthorizationEnforcementModule().getStandaloneModules(), new PreviewHttpModule(), new MessagingServerRuntimeModule().getStandaloneModules(), new AppFabricServiceRuntimeModule().getStandaloneModules(), new OperationalStatsModule(), new ProvisionerModule());
}
Also used : IOModule(co.cask.cdap.common.guice.IOModule) DataSetServiceModules(co.cask.cdap.data.runtime.DataSetServiceModules) ConfigModule(co.cask.cdap.common.guice.ConfigModule) NamespaceStoreModule(co.cask.cdap.store.guice.NamespaceStoreModule) PreviewHttpModule(co.cask.cdap.app.preview.PreviewHttpModule) MessagingServerRuntimeModule(co.cask.cdap.messaging.guice.MessagingServerRuntimeModule) MetricsClientRuntimeModule(co.cask.cdap.metrics.guice.MetricsClientRuntimeModule) NotificationServiceRuntimeModule(co.cask.cdap.notifications.guice.NotificationServiceRuntimeModule) SecurityModules(co.cask.cdap.security.guice.SecurityModules) RemoteSystemOperationsServiceModule(co.cask.cdap.gateway.handlers.meta.RemoteSystemOperationsServiceModule) ViewAdminModules(co.cask.cdap.data.view.ViewAdminModules) ZKClientModule(co.cask.cdap.common.guice.ZKClientModule) KafkaClientModule(co.cask.cdap.common.guice.KafkaClientModule) StreamServiceRuntimeModule(co.cask.cdap.data.stream.service.StreamServiceRuntimeModule) DiscoveryRuntimeModule(co.cask.cdap.common.guice.DiscoveryRuntimeModule) AuthorizationModule(co.cask.cdap.app.guice.AuthorizationModule) OperationalStatsModule(co.cask.cdap.operations.guice.OperationalStatsModule) ProvisionerModule(co.cask.cdap.internal.provision.ProvisionerModule) LogReaderRuntimeModules(co.cask.cdap.logging.guice.LogReaderRuntimeModules) DataSetsModules(co.cask.cdap.data.runtime.DataSetsModules) SecureStoreModules(co.cask.cdap.security.guice.SecureStoreModules) LocationRuntimeModule(co.cask.cdap.common.guice.LocationRuntimeModule) MetadataServiceModule(co.cask.cdap.metadata.MetadataServiceModule) ExploreRuntimeModule(co.cask.cdap.explore.guice.ExploreRuntimeModule) RouterModules(co.cask.cdap.gateway.router.RouterModules) LoggingModules(co.cask.cdap.logging.guice.LoggingModules) StreamAdminModules(co.cask.cdap.data.stream.StreamAdminModules) MetricsHandlerModule(co.cask.cdap.metrics.guice.MetricsHandlerModule) ProgramRunnerRuntimeModule(co.cask.cdap.app.guice.ProgramRunnerRuntimeModule) ExploreClientModule(co.cask.cdap.explore.guice.ExploreClientModule) NotificationFeedServiceRuntimeModule(co.cask.cdap.notifications.feeds.guice.NotificationFeedServiceRuntimeModule) AuditModule(co.cask.cdap.data2.audit.AuditModule) DataFabricModules(co.cask.cdap.data.runtime.DataFabricModules) ServiceStoreModules(co.cask.cdap.app.guice.ServiceStoreModules) AuthorizationEnforcementModule(co.cask.cdap.security.authorization.AuthorizationEnforcementModule) AppFabricServiceRuntimeModule(co.cask.cdap.app.guice.AppFabricServiceRuntimeModule)

Example 3 with StreamServiceRuntimeModule

use of co.cask.cdap.data.stream.service.StreamServiceRuntimeModule in project cdap by caskdata.

the class BaseHiveExploreServiceTest method createInMemoryModules.

private static List<Module> createInMemoryModules(CConfiguration configuration, Configuration hConf, TemporaryFolder tmpFolder) throws IOException {
    configuration.set(Constants.CFG_DATA_INMEMORY_PERSISTENCE, Constants.InMemoryPersistenceType.MEMORY.name());
    configuration.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath());
    configuration.set(Constants.Explore.LOCAL_DATA_DIR, tmpFolder.newFolder("hive").getAbsolutePath());
    configuration.set(TxConstants.Manager.CFG_TX_SNAPSHOT_LOCAL_DIR, tmpFolder.newFolder("tx").getAbsolutePath());
    configuration.setBoolean(TxConstants.Manager.CFG_DO_PERSIST, true);
    return ImmutableList.of(new ConfigModule(configuration, hConf), new IOModule(), new DiscoveryRuntimeModule().getInMemoryModules(), new NonCustomLocationUnitTestModule().getModule(), new DataSetsModules().getStandaloneModules(), new DataSetServiceModules().getInMemoryModules(), new MetricsClientRuntimeModule().getInMemoryModules(), new ExploreRuntimeModule().getInMemoryModules(), new ExploreClientModule(), new StreamServiceRuntimeModule().getInMemoryModules(), new ViewAdminModules().getInMemoryModules(), new StreamAdminModules().getInMemoryModules(), new NotificationServiceRuntimeModule().getInMemoryModules(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new NamespaceClientUnitTestModule().getModule(), new AbstractModule() {

        @Override
        protected void configure() {
            bind(NotificationFeedManager.class).to(NoOpNotificationFeedManager.class);
            bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
            bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
            Multibinder<HttpHandler> handlerBinder = Multibinder.newSetBinder(binder(), HttpHandler.class, Names.named(Constants.Stream.STREAM_HANDLER));
            handlerBinder.addBinding().to(StreamHandler.class);
            handlerBinder.addBinding().to(StreamFetchHandler.class);
            handlerBinder.addBinding().to(StreamViewHttpHandler.class);
            CommonHandlers.add(handlerBinder);
            bind(StreamHttpService.class).in(Scopes.SINGLETON);
            // Use LocalFileTransactionStateStorage, so that we can use transaction snapshots for assertions in test
            install(Modules.override(new DataFabricModules().getInMemoryModules()).with(new AbstractModule() {

                @Override
                protected void configure() {
                    bind(TransactionStateStorage.class).annotatedWith(Names.named("persist")).to(LocalFileTransactionStateStorage.class).in(Scopes.SINGLETON);
                    bind(TransactionStateStorage.class).toProvider(TransactionStateStorageProvider.class).in(Singleton.class);
                }
            }));
        }
    });
}
Also used : IOModule(co.cask.cdap.common.guice.IOModule) DataSetServiceModules(co.cask.cdap.data.runtime.DataSetServiceModules) ConfigModule(co.cask.cdap.common.guice.ConfigModule) MetricsClientRuntimeModule(co.cask.cdap.metrics.guice.MetricsClientRuntimeModule) NotificationServiceRuntimeModule(co.cask.cdap.notifications.guice.NotificationServiceRuntimeModule) ViewAdminModules(co.cask.cdap.data.view.ViewAdminModules) StreamViewHttpHandler(co.cask.cdap.data.stream.StreamViewHttpHandler) StreamHandler(co.cask.cdap.data.stream.service.StreamHandler) StreamFetchHandler(co.cask.cdap.data.stream.service.StreamFetchHandler) StreamServiceRuntimeModule(co.cask.cdap.data.stream.service.StreamServiceRuntimeModule) DiscoveryRuntimeModule(co.cask.cdap.common.guice.DiscoveryRuntimeModule) HttpHandler(co.cask.http.HttpHandler) StreamViewHttpHandler(co.cask.cdap.data.stream.StreamViewHttpHandler) NamespaceClientUnitTestModule(co.cask.cdap.common.guice.NamespaceClientUnitTestModule) UnsupportedUGIProvider(co.cask.cdap.security.impersonation.UnsupportedUGIProvider) Multibinder(com.google.inject.multibindings.Multibinder) 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) DefaultOwnerAdmin(co.cask.cdap.security.impersonation.DefaultOwnerAdmin) AuthorizationTestModule(co.cask.cdap.security.authorization.AuthorizationTestModule) AbstractModule(com.google.inject.AbstractModule) StreamAdminModules(co.cask.cdap.data.stream.StreamAdminModules) ExploreClientModule(co.cask.cdap.explore.guice.ExploreClientModule) Singleton(com.google.inject.Singleton) LocalFileTransactionStateStorage(org.apache.tephra.persist.LocalFileTransactionStateStorage) TransactionStateStorage(org.apache.tephra.persist.TransactionStateStorage) NoOpNotificationFeedManager(co.cask.cdap.notifications.feeds.service.NoOpNotificationFeedManager) DataFabricModules(co.cask.cdap.data.runtime.DataFabricModules) AuthorizationEnforcementModule(co.cask.cdap.security.authorization.AuthorizationEnforcementModule)

Example 4 with StreamServiceRuntimeModule

use of co.cask.cdap.data.stream.service.StreamServiceRuntimeModule in project cdap by caskdata.

the class BaseHiveExploreServiceTest method createStandaloneModules.

// these are needed if we actually want to query streams, as the stream input format looks at the filesystem
// to figure out splits.
private static List<Module> createStandaloneModules(CConfiguration cConf, Configuration hConf, TemporaryFolder tmpFolder) throws IOException {
    File localDataDir = tmpFolder.newFolder();
    cConf.set(Constants.CFG_LOCAL_DATA_DIR, localDataDir.getAbsolutePath());
    cConf.set(Constants.CFG_DATA_INMEMORY_PERSISTENCE, Constants.InMemoryPersistenceType.LEVELDB.name());
    cConf.set(Constants.Explore.LOCAL_DATA_DIR, tmpFolder.newFolder("hive").getAbsolutePath());
    hConf.set(Constants.CFG_LOCAL_DATA_DIR, localDataDir.getAbsolutePath());
    hConf.set(Constants.AppFabric.OUTPUT_DIR, cConf.get(Constants.AppFabric.OUTPUT_DIR));
    hConf.set("hadoop.tmp.dir", new File(localDataDir, cConf.get(Constants.AppFabric.TEMP_DIR)).getAbsolutePath());
    return ImmutableList.of(new ConfigModule(cConf, hConf), new IOModule(), new DiscoveryRuntimeModule().getStandaloneModules(), new NonCustomLocationUnitTestModule().getModule(), new DataFabricModules().getStandaloneModules(), new DataSetsModules().getStandaloneModules(), new DataSetServiceModules().getStandaloneModules(), new MetricsClientRuntimeModule().getStandaloneModules(), new ExploreRuntimeModule().getStandaloneModules(), new ExploreClientModule(), new StreamServiceRuntimeModule().getStandaloneModules(), new ViewAdminModules().getStandaloneModules(), new StreamAdminModules().getStandaloneModules(), new NotificationServiceRuntimeModule().getStandaloneModules(), // unit tests. Since this explore standalone module needs persistent of files this should not affect the tests.
    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);
            Multibinder<HttpHandler> handlerBinder = Multibinder.newSetBinder(binder(), HttpHandler.class, Names.named(Constants.Stream.STREAM_HANDLER));
            handlerBinder.addBinding().to(StreamHandler.class);
            handlerBinder.addBinding().to(StreamFetchHandler.class);
            CommonHandlers.add(handlerBinder);
            bind(StreamHttpService.class).in(Scopes.SINGLETON);
            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) ConfigModule(co.cask.cdap.common.guice.ConfigModule) MetricsClientRuntimeModule(co.cask.cdap.metrics.guice.MetricsClientRuntimeModule) NotificationServiceRuntimeModule(co.cask.cdap.notifications.guice.NotificationServiceRuntimeModule) ViewAdminModules(co.cask.cdap.data.view.ViewAdminModules) StreamHandler(co.cask.cdap.data.stream.service.StreamHandler) StreamFetchHandler(co.cask.cdap.data.stream.service.StreamFetchHandler) StreamServiceRuntimeModule(co.cask.cdap.data.stream.service.StreamServiceRuntimeModule) DiscoveryRuntimeModule(co.cask.cdap.common.guice.DiscoveryRuntimeModule) HttpHandler(co.cask.http.HttpHandler) StreamViewHttpHandler(co.cask.cdap.data.stream.StreamViewHttpHandler) UnsupportedUGIProvider(co.cask.cdap.security.impersonation.UnsupportedUGIProvider) Multibinder(com.google.inject.multibindings.Multibinder) 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) DefaultOwnerAdmin(co.cask.cdap.security.impersonation.DefaultOwnerAdmin) AuthorizationTestModule(co.cask.cdap.security.authorization.AuthorizationTestModule) 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) DataFabricModules(co.cask.cdap.data.runtime.DataFabricModules) AuthorizationEnforcementModule(co.cask.cdap.security.authorization.AuthorizationEnforcementModule)

Example 5 with StreamServiceRuntimeModule

use of co.cask.cdap.data.stream.service.StreamServiceRuntimeModule in project cdap by caskdata.

the class DefaultPreviewManagerTest method beforeClass.

@BeforeClass
public static void beforeClass() throws Throwable {
    injector = Guice.createInjector(new ConfigModule(CConfiguration.create(), new Configuration()), new IOModule(), new DataFabricModules().getInMemoryModules(), new DataSetsModules().getStandaloneModules(), new TransactionExecutorModule(), new DataSetServiceModules().getInMemoryModules(), new DiscoveryRuntimeModule().getInMemoryModules(), new AppFabricServiceRuntimeModule().getInMemoryModules(), new ServiceStoreModules().getInMemoryModules(), new ProgramRunnerRuntimeModule().getInMemoryModules(), new NonCustomLocationUnitTestModule().getModule(), new LoggingModules().getInMemoryModules(), new LogReaderRuntimeModules().getInMemoryModules(), new MetricsHandlerModule(), new MetricsClientRuntimeModule().getInMemoryModules(), new ExploreClientModule(), new NotificationFeedServiceRuntimeModule().getInMemoryModules(), new NotificationServiceRuntimeModule().getInMemoryModules(), new ConfigStoreModule().getInMemoryModule(), new ViewAdminModules().getInMemoryModules(), new StreamAdminModules().getInMemoryModules(), new StreamServiceRuntimeModule().getInMemoryModules(), new NamespaceStoreModule().getStandaloneModules(), new MetadataServiceModule(), new RemoteSystemOperationsServiceModule(), new AuthorizationModule(), new AuthorizationEnforcementModule().getStandaloneModules(), new SecureStoreModules().getInMemoryModules(), new MessagingServerRuntimeModule().getInMemoryModules(), new PreviewHttpModule(), new AbstractModule() {

        @Override
        protected void configure() {
            bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
            bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
        }
    });
}
Also used : IOModule(co.cask.cdap.common.guice.IOModule) DataSetServiceModules(co.cask.cdap.data.runtime.DataSetServiceModules) CConfiguration(co.cask.cdap.common.conf.CConfiguration) Configuration(org.apache.hadoop.conf.Configuration) ConfigModule(co.cask.cdap.common.guice.ConfigModule) NamespaceStoreModule(co.cask.cdap.store.guice.NamespaceStoreModule) UGIProvider(co.cask.cdap.security.impersonation.UGIProvider) UnsupportedUGIProvider(co.cask.cdap.security.impersonation.UnsupportedUGIProvider) PreviewHttpModule(co.cask.cdap.app.preview.PreviewHttpModule) MessagingServerRuntimeModule(co.cask.cdap.messaging.guice.MessagingServerRuntimeModule) MetricsClientRuntimeModule(co.cask.cdap.metrics.guice.MetricsClientRuntimeModule) NotificationServiceRuntimeModule(co.cask.cdap.notifications.guice.NotificationServiceRuntimeModule) RemoteSystemOperationsServiceModule(co.cask.cdap.gateway.handlers.meta.RemoteSystemOperationsServiceModule) ViewAdminModules(co.cask.cdap.data.view.ViewAdminModules) TransactionExecutorModule(co.cask.cdap.data.runtime.TransactionExecutorModule) StreamServiceRuntimeModule(co.cask.cdap.data.stream.service.StreamServiceRuntimeModule) DiscoveryRuntimeModule(co.cask.cdap.common.guice.DiscoveryRuntimeModule) ConfigStoreModule(co.cask.cdap.config.guice.ConfigStoreModule) AuthorizationModule(co.cask.cdap.app.guice.AuthorizationModule) LogReaderRuntimeModules(co.cask.cdap.logging.guice.LogReaderRuntimeModules) DataSetsModules(co.cask.cdap.data.runtime.DataSetsModules) SecureStoreModules(co.cask.cdap.security.guice.SecureStoreModules) DefaultOwnerAdmin(co.cask.cdap.security.impersonation.DefaultOwnerAdmin) OwnerAdmin(co.cask.cdap.security.impersonation.OwnerAdmin) MetadataServiceModule(co.cask.cdap.metadata.MetadataServiceModule) NonCustomLocationUnitTestModule(co.cask.cdap.common.guice.NonCustomLocationUnitTestModule) LoggingModules(co.cask.cdap.logging.guice.LoggingModules) AbstractModule(com.google.inject.AbstractModule) StreamAdminModules(co.cask.cdap.data.stream.StreamAdminModules) ProgramRunnerRuntimeModule(co.cask.cdap.app.guice.ProgramRunnerRuntimeModule) MetricsHandlerModule(co.cask.cdap.metrics.guice.MetricsHandlerModule) ExploreClientModule(co.cask.cdap.explore.guice.ExploreClientModule) NotificationFeedServiceRuntimeModule(co.cask.cdap.notifications.feeds.guice.NotificationFeedServiceRuntimeModule) DataFabricModules(co.cask.cdap.data.runtime.DataFabricModules) AppFabricServiceRuntimeModule(co.cask.cdap.app.guice.AppFabricServiceRuntimeModule) ServiceStoreModules(co.cask.cdap.app.guice.ServiceStoreModules) AuthorizationEnforcementModule(co.cask.cdap.security.authorization.AuthorizationEnforcementModule) BeforeClass(org.junit.BeforeClass)

Aggregations

StreamServiceRuntimeModule (co.cask.cdap.data.stream.service.StreamServiceRuntimeModule)6 NotificationServiceRuntimeModule (co.cask.cdap.notifications.guice.NotificationServiceRuntimeModule)6 ConfigModule (co.cask.cdap.common.guice.ConfigModule)5 DiscoveryRuntimeModule (co.cask.cdap.common.guice.DiscoveryRuntimeModule)5 IOModule (co.cask.cdap.common.guice.IOModule)5 DataFabricModules (co.cask.cdap.data.runtime.DataFabricModules)5 DataSetServiceModules (co.cask.cdap.data.runtime.DataSetServiceModules)5 DataSetsModules (co.cask.cdap.data.runtime.DataSetsModules)5 StreamAdminModules (co.cask.cdap.data.stream.StreamAdminModules)5 ViewAdminModules (co.cask.cdap.data.view.ViewAdminModules)5 ExploreClientModule (co.cask.cdap.explore.guice.ExploreClientModule)5 MetricsClientRuntimeModule (co.cask.cdap.metrics.guice.MetricsClientRuntimeModule)5 AuthorizationEnforcementModule (co.cask.cdap.security.authorization.AuthorizationEnforcementModule)5 NonCustomLocationUnitTestModule (co.cask.cdap.common.guice.NonCustomLocationUnitTestModule)4 DefaultOwnerAdmin (co.cask.cdap.security.impersonation.DefaultOwnerAdmin)4 AbstractModule (com.google.inject.AbstractModule)4 AppFabricServiceRuntimeModule (co.cask.cdap.app.guice.AppFabricServiceRuntimeModule)3 AuthorizationModule (co.cask.cdap.app.guice.AuthorizationModule)3 ProgramRunnerRuntimeModule (co.cask.cdap.app.guice.ProgramRunnerRuntimeModule)3 ServiceStoreModules (co.cask.cdap.app.guice.ServiceStoreModules)3