Search in sources :

Example 6 with MessagingService

use of io.cdap.cdap.messaging.MessagingService in project cdap by caskdata.

the class PreviewRunnerModule method configure.

@Override
protected void configure() {
    Boolean artifactLocalizerEnabled = cConf.getBoolean(Constants.Preview.ARTIFACT_LOCALIZER_ENABLED, false);
    if (artifactLocalizerEnabled) {
        // Use remote implementation to fetch artifact metadata from AppFab.
        // Remote implementation internally uses artifact localizer to fetch and cache artifacts locally.
        bind(ArtifactRepositoryReader.class).to(RemoteArtifactRepositoryReaderWithLocalization.class);
        bind(ArtifactRepository.class).to(RemoteArtifactRepositoryWithLocalization.class);
        expose(ArtifactRepository.class);
        bind(ArtifactRepository.class).annotatedWith(Names.named(AppFabricServiceRuntimeModule.NOAUTH_ARTIFACT_REPO)).to(RemoteArtifactRepositoryWithLocalization.class).in(Scopes.SINGLETON);
        expose(ArtifactRepository.class).annotatedWith(Names.named(AppFabricServiceRuntimeModule.NOAUTH_ARTIFACT_REPO));
        // Use remote implementation to fetch plugin metadata from AppFab.
        // Remote implementation internally uses artifact localizer to fetch and cache artifacts locally.
        bind(PluginFinder.class).to(RemoteWorkerPluginFinder.class);
        expose(PluginFinder.class);
        // Use remote implementation to fetch preferences from AppFab.
        bind(PreferencesFetcher.class).to(RemotePreferencesFetcherInternal.class);
        expose(PreferencesFetcher.class);
    } else {
        bind(ArtifactRepositoryReader.class).toProvider(artifactRepositoryReaderProvider);
        bind(ArtifactRepository.class).to(DefaultArtifactRepository.class);
        expose(ArtifactRepository.class);
        bind(ArtifactRepository.class).annotatedWith(Names.named(AppFabricServiceRuntimeModule.NOAUTH_ARTIFACT_REPO)).to(DefaultArtifactRepository.class).in(Scopes.SINGLETON);
        expose(ArtifactRepository.class).annotatedWith(Names.named(AppFabricServiceRuntimeModule.NOAUTH_ARTIFACT_REPO));
        bind(PluginFinder.class).toProvider(pluginFinderProvider);
        expose(PluginFinder.class);
        bind(PreferencesFetcher.class).toProvider(preferencesFetcherProvider);
        expose(PreferencesFetcher.class);
    }
    bind(ArtifactStore.class).toInstance(artifactStore);
    expose(ArtifactStore.class);
    bind(MessagingService.class).annotatedWith(Names.named(PreviewConfigModule.GLOBAL_TMS)).toInstance(messagingService);
    expose(MessagingService.class).annotatedWith(Names.named(PreviewConfigModule.GLOBAL_TMS));
    bind(AccessEnforcer.class).toInstance(accessEnforcer);
    expose(AccessEnforcer.class);
    bind(ContextAccessEnforcer.class).toInstance(contextAccessEnforcer);
    expose(ContextAccessEnforcer.class);
    bind(AccessControllerInstantiator.class).toInstance(accessControllerInstantiator);
    expose(AccessControllerInstantiator.class);
    bind(PermissionManager.class).toInstance(permissionManager);
    expose(PermissionManager.class);
    bind(PreferencesService.class).toInstance(preferencesService);
    // bind explore client to mock.
    bind(ExploreClient.class).to(MockExploreClient.class);
    expose(ExploreClient.class);
    bind(ProgramRuntimeProviderLoader.class).toInstance(programRuntimeProviderLoader);
    expose(ProgramRuntimeProviderLoader.class);
    bind(StorageProviderNamespaceAdmin.class).to(LocalStorageProviderNamespaceAdmin.class);
    bind(PipelineFactory.class).to(SynchronousPipelineFactory.class);
    install(new FactoryModuleBuilder().implement(Configurator.class, InMemoryConfigurator.class).build(ConfiguratorFactory.class));
    // expose this binding so program runner modules can use
    expose(ConfiguratorFactory.class);
    install(new FactoryModuleBuilder().implement(new TypeLiteral<Manager<AppDeploymentInfo, ApplicationWithPrograms>>() {
    }, new TypeLiteral<PreviewApplicationManager<AppDeploymentInfo, ApplicationWithPrograms>>() {
    }).build(new TypeLiteral<ManagerFactory<AppDeploymentInfo, ApplicationWithPrograms>>() {
    }));
    bind(Store.class).to(DefaultStore.class);
    bind(SecretStore.class).to(DefaultSecretStore.class).in(Scopes.SINGLETON);
    bind(UGIProvider.class).to(DefaultUGIProvider.class);
    expose(UGIProvider.class);
    bind(WorkflowStateWriter.class).to(BasicWorkflowStateWriter.class);
    expose(WorkflowStateWriter.class);
    // we don't delete namespaces in preview as we just delete preview directory when its done
    bind(NamespaceResourceDeleter.class).to(NoopNamespaceResourceDeleter.class).in(Scopes.SINGLETON);
    bind(NamespaceAdmin.class).to(DefaultNamespaceAdmin.class).in(Scopes.SINGLETON);
    bind(NamespaceQueryAdmin.class).to(DefaultNamespaceAdmin.class).in(Scopes.SINGLETON);
    expose(NamespaceAdmin.class);
    expose(NamespaceQueryAdmin.class);
    bind(MetadataAdmin.class).to(DefaultMetadataAdmin.class);
    expose(MetadataAdmin.class);
    bindPreviewRunner(binder());
    expose(PreviewRunner.class);
    bind(Scheduler.class).to(NoOpScheduler.class);
    bind(DataTracerFactory.class).to(DefaultDataTracerFactory.class);
    expose(DataTracerFactory.class);
    bind(PreviewDataPublisher.class).to(MessagingPreviewDataPublisher.class);
    bind(OwnerStore.class).to(DefaultOwnerStore.class);
    expose(OwnerStore.class);
    bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
    expose(OwnerAdmin.class);
    bind(CapabilityReader.class).to(CapabilityStatusStore.class);
}
Also used : MockExploreClient(io.cdap.cdap.explore.client.MockExploreClient) ExploreClient(io.cdap.cdap.explore.client.ExploreClient) ConfiguratorFactory(io.cdap.cdap.internal.app.deploy.ConfiguratorFactory) CapabilityReader(io.cdap.cdap.internal.capability.CapabilityReader) SynchronousPipelineFactory(io.cdap.cdap.internal.pipeline.SynchronousPipelineFactory) PipelineFactory(io.cdap.cdap.pipeline.PipelineFactory) FactoryModuleBuilder(com.google.inject.assistedinject.FactoryModuleBuilder) Scheduler(io.cdap.cdap.scheduler.Scheduler) NoOpScheduler(io.cdap.cdap.scheduler.NoOpScheduler) DefaultArtifactRepository(io.cdap.cdap.internal.app.runtime.artifact.DefaultArtifactRepository) DefaultUGIProvider(io.cdap.cdap.security.impersonation.DefaultUGIProvider) UGIProvider(io.cdap.cdap.security.impersonation.UGIProvider) ArtifactStore(io.cdap.cdap.internal.app.runtime.artifact.ArtifactStore) OwnerStore(io.cdap.cdap.security.impersonation.OwnerStore) CapabilityStatusStore(io.cdap.cdap.internal.capability.CapabilityStatusStore) SecretStore(io.cdap.cdap.securestore.spi.SecretStore) DefaultSecretStore(io.cdap.cdap.data.security.DefaultSecretStore) Store(io.cdap.cdap.app.store.Store) DefaultOwnerStore(io.cdap.cdap.store.DefaultOwnerStore) DefaultStore(io.cdap.cdap.internal.app.store.DefaultStore) BasicWorkflowStateWriter(io.cdap.cdap.internal.app.runtime.workflow.BasicWorkflowStateWriter) WorkflowStateWriter(io.cdap.cdap.internal.app.runtime.workflow.WorkflowStateWriter) Manager(io.cdap.cdap.app.deploy.Manager) PermissionManager(io.cdap.cdap.security.spi.authorization.PermissionManager) DefaultNamespaceAdmin(io.cdap.cdap.internal.app.namespace.DefaultNamespaceAdmin) ArtifactRepositoryReader(io.cdap.cdap.internal.app.runtime.artifact.ArtifactRepositoryReader) PreferencesService(io.cdap.cdap.config.PreferencesService) TypeLiteral(com.google.inject.TypeLiteral) AppDeploymentInfo(io.cdap.cdap.internal.app.deploy.pipeline.AppDeploymentInfo) PluginFinder(io.cdap.cdap.internal.app.runtime.artifact.PluginFinder) RemoteWorkerPluginFinder(io.cdap.cdap.internal.app.worker.RemoteWorkerPluginFinder) StorageProviderNamespaceAdmin(io.cdap.cdap.internal.app.namespace.StorageProviderNamespaceAdmin) LocalStorageProviderNamespaceAdmin(io.cdap.cdap.internal.app.namespace.LocalStorageProviderNamespaceAdmin) ApplicationWithPrograms(io.cdap.cdap.internal.app.deploy.pipeline.ApplicationWithPrograms) AccessEnforcer(io.cdap.cdap.security.spi.authorization.AccessEnforcer) ContextAccessEnforcer(io.cdap.cdap.security.spi.authorization.ContextAccessEnforcer) NoopNamespaceResourceDeleter(io.cdap.cdap.internal.app.namespace.NoopNamespaceResourceDeleter) DefaultMetadataAdmin(io.cdap.cdap.metadata.DefaultMetadataAdmin) MetadataAdmin(io.cdap.cdap.metadata.MetadataAdmin) RemoteArtifactRepositoryWithLocalization(io.cdap.cdap.internal.app.runtime.artifact.RemoteArtifactRepositoryWithLocalization) PermissionManager(io.cdap.cdap.security.spi.authorization.PermissionManager) DefaultSecretStore(io.cdap.cdap.data.security.DefaultSecretStore) DefaultOwnerAdmin(io.cdap.cdap.security.impersonation.DefaultOwnerAdmin) OwnerAdmin(io.cdap.cdap.security.impersonation.OwnerAdmin) AccessControllerInstantiator(io.cdap.cdap.security.authorization.AccessControllerInstantiator) DefaultArtifactRepository(io.cdap.cdap.internal.app.runtime.artifact.DefaultArtifactRepository) ArtifactRepository(io.cdap.cdap.internal.app.runtime.artifact.ArtifactRepository) OwnerStore(io.cdap.cdap.security.impersonation.OwnerStore) DefaultOwnerStore(io.cdap.cdap.store.DefaultOwnerStore) MessagingService(io.cdap.cdap.messaging.MessagingService) ProgramRuntimeProviderLoader(io.cdap.cdap.internal.app.runtime.ProgramRuntimeProviderLoader) ArtifactStore(io.cdap.cdap.internal.app.runtime.artifact.ArtifactStore) DefaultDataTracerFactory(io.cdap.cdap.internal.app.preview.DefaultDataTracerFactory) PreferencesFetcher(io.cdap.cdap.metadata.PreferencesFetcher) ContextAccessEnforcer(io.cdap.cdap.security.spi.authorization.ContextAccessEnforcer) MessagingPreviewDataPublisher(io.cdap.cdap.internal.app.preview.MessagingPreviewDataPublisher)

Example 7 with MessagingService

use of io.cdap.cdap.messaging.MessagingService in project cdap by caskdata.

the class TwillAppLifecycleEventHandler method initialize.

@Override
public void initialize(EventHandlerContext context) {
    super.initialize(context);
    this.runningPublished = new AtomicBoolean();
    this.twillRunId = context.getRunId();
    Map<String, String> configs = context.getSpecification().getConfigs();
    this.programRunId = GSON.fromJson(configs.get("programRunId"), ProgramRunId.class);
    this.clusterMode = ClusterMode.valueOf(configs.get("clusterMode"));
    this.runtimeMonitorType = RuntimeMonitorType.valueOf(configs.get("monitorType"));
    // Fetch cConf and hConf from resources jar
    File cConfFile = new File("resources.jar/resources/" + CDAP_CONF_FILE_NAME);
    File hConfFile = new File("resources.jar/resources/" + HADOOP_CONF_FILE_NAME);
    if (!cConfFile.exists()) {
        // This shouldn't happen, unless CDAP is misconfigured
        throw new IllegalArgumentException("Missing cConf file " + cConfFile.getAbsolutePath());
    }
    try {
        // Load the configuration from the XML files serialized from the cdap master.
        CConfiguration cConf = CConfiguration.create();
        cConf.clear();
        cConf.addResource(cConfFile.toURI().toURL());
        Configuration hConf = new Configuration();
        if (hConfFile.exists()) {
            hConf.clear();
            hConf.addResource(hConfFile.toURI().toURL());
        }
        // Create the injector to create a program state writer
        List<Module> modules = new ArrayList<>(Arrays.asList(new ConfigModule(cConf, hConf), RemoteAuthenticatorModules.getDefaultModule(), new MessagingClientModule(), new AbstractModule() {

            @Override
            protected void configure() {
                bind(ProgramStateWriter.class).to(MessagingProgramStateWriter.class);
            }
        }));
        switch(clusterMode) {
            case ON_PREMISE:
                modules.add(new AuthenticationContextModules().getProgramContainerModule(cConf));
                modules.add(new ZKClientModule());
                modules.add(new ZKDiscoveryModule());
                modules.add(new KafkaClientModule());
                break;
            case ISOLATED:
                modules.add(new AuthenticationContextModules().getProgramContainerModule(cConf));
                modules.add(new RemoteExecutionDiscoveryModule());
                modules.add(new AbstractModule() {

                    @Override
                    protected void configure() {
                        bind(RuntimeMonitorType.class).toInstance(runtimeMonitorType);
                    }
                });
                break;
        }
        Injector injector = Guice.createInjector(modules);
        if (clusterMode == ClusterMode.ON_PREMISE) {
            zkClientService = injector.getInstance(ZKClientService.class);
            zkClientService.startAndWait();
        }
        ProgramStateWriter programStateWriter = injector.getInstance(ProgramStateWriter.class);
        MessagingService messagingService = injector.getInstance(MessagingService.class);
        programStateWriterWithHeartBeat = new ProgramStateWriterWithHeartBeat(programRunId, programStateWriter, messagingService, cConf);
    } catch (Exception e) {
        throw Throwables.propagate(e);
    }
}
Also used : MessagingClientModule(io.cdap.cdap.messaging.guice.MessagingClientModule) Configuration(org.apache.hadoop.conf.Configuration) CConfiguration(io.cdap.cdap.common.conf.CConfiguration) ZKDiscoveryModule(io.cdap.cdap.common.guice.ZKDiscoveryModule) ConfigModule(io.cdap.cdap.common.guice.ConfigModule) ArrayList(java.util.ArrayList) RemoteExecutionDiscoveryModule(io.cdap.cdap.app.guice.RemoteExecutionDiscoveryModule) ZKClientModule(io.cdap.cdap.common.guice.ZKClientModule) ProgramStateWriterWithHeartBeat(io.cdap.cdap.internal.app.program.ProgramStateWriterWithHeartBeat) MessagingProgramStateWriter(io.cdap.cdap.internal.app.program.MessagingProgramStateWriter) ProgramStateWriter(io.cdap.cdap.app.runtime.ProgramStateWriter) KafkaClientModule(io.cdap.cdap.common.guice.KafkaClientModule) Injector(com.google.inject.Injector) AuthenticationContextModules(io.cdap.cdap.security.auth.context.AuthenticationContextModules) CConfiguration(io.cdap.cdap.common.conf.CConfiguration) AbstractModule(com.google.inject.AbstractModule) MessagingService(io.cdap.cdap.messaging.MessagingService) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ZKClientService(org.apache.twill.zookeeper.ZKClientService) ProgramRunId(io.cdap.cdap.proto.id.ProgramRunId) Module(com.google.inject.Module) ConfigModule(io.cdap.cdap.common.guice.ConfigModule) KafkaClientModule(io.cdap.cdap.common.guice.KafkaClientModule) ZKClientModule(io.cdap.cdap.common.guice.ZKClientModule) RemoteExecutionDiscoveryModule(io.cdap.cdap.app.guice.RemoteExecutionDiscoveryModule) ZKDiscoveryModule(io.cdap.cdap.common.guice.ZKDiscoveryModule) MessagingClientModule(io.cdap.cdap.messaging.guice.MessagingClientModule) AbstractModule(com.google.inject.AbstractModule) File(java.io.File)

Example 8 with MessagingService

use of io.cdap.cdap.messaging.MessagingService in project cdap by caskdata.

the class TetheringRuntimeJobManagerTest method setUp.

@BeforeClass
public static void setUp() throws IOException, TopicAlreadyExistsException {
    CConfiguration cConf = CConfiguration.create();
    cConf.set(Constants.Tethering.TOPIC_PREFIX, "prefix-");
    cConf.set(Constants.CFG_LOCAL_DATA_DIR, TEMP_FOLDER.newFolder().getAbsolutePath());
    Injector injector = Guice.createInjector(new ConfigModule(cConf), new InMemoryDiscoveryModule(), new LocalLocationModule(), new MessagingServerRuntimeModule().getInMemoryModules(), new AbstractModule() {

        @Override
        protected void configure() {
            bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class).in(Scopes.SINGLETON);
        }
    });
    messagingService = injector.getInstance(MessagingService.class);
    if (messagingService instanceof Service) {
        ((Service) messagingService).startAndWait();
    }
    TetheringConf conf = TetheringConf.fromProperties(PROPERTIES);
    topicId = new TopicId(NamespaceId.SYSTEM.getNamespace(), cConf.get(Constants.Tethering.TOPIC_PREFIX) + TETHERED_INSTANCE_NAME);
    messagingService.createTopic(new TopicMetadata(topicId, Collections.emptyMap()));
    messageFetcher = new MultiThreadMessagingContext(messagingService).getMessageFetcher();
    runtimeJobManager = new TetheringRuntimeJobManager(conf, cConf, messagingService);
}
Also used : InMemoryDiscoveryModule(io.cdap.cdap.common.guice.InMemoryDiscoveryModule) NoOpMetricsCollectionService(io.cdap.cdap.common.metrics.NoOpMetricsCollectionService) MetricsCollectionService(io.cdap.cdap.api.metrics.MetricsCollectionService) ConfigModule(io.cdap.cdap.common.guice.ConfigModule) NoOpMetricsCollectionService(io.cdap.cdap.common.metrics.NoOpMetricsCollectionService) MessagingService(io.cdap.cdap.messaging.MessagingService) Service(com.google.common.util.concurrent.Service) MetricsCollectionService(io.cdap.cdap.api.metrics.MetricsCollectionService) MessagingServerRuntimeModule(io.cdap.cdap.messaging.guice.MessagingServerRuntimeModule) MultiThreadMessagingContext(io.cdap.cdap.messaging.context.MultiThreadMessagingContext) CConfiguration(io.cdap.cdap.common.conf.CConfiguration) AbstractModule(com.google.inject.AbstractModule) MessagingService(io.cdap.cdap.messaging.MessagingService) TopicMetadata(io.cdap.cdap.messaging.TopicMetadata) LocalLocationModule(io.cdap.cdap.common.guice.LocalLocationModule) TetheringConf(io.cdap.cdap.internal.tethering.runtime.spi.provisioner.TetheringConf) Injector(com.google.inject.Injector) TopicId(io.cdap.cdap.proto.id.TopicId) BeforeClass(org.junit.BeforeClass)

Example 9 with MessagingService

use of io.cdap.cdap.messaging.MessagingService in project cdap by caskdata.

the class ProvisioningServiceTest method setupClass.

@BeforeClass
public static void setupClass() throws Exception {
    CConfiguration cConf = CConfiguration.create();
    cConf.set(Constants.CFG_LOCAL_DATA_DIR, TEMP_FOLDER.newFolder().getAbsolutePath());
    Injector injector = Guice.createInjector(new AppFabricTestModule(cConf));
    txManager = injector.getInstance(TransactionManager.class);
    txManager.startAndWait();
    // Define all StructuredTable before starting any services that need StructuredTable
    StoreDefinition.createAllTables(injector.getInstance(StructuredTableAdmin.class));
    datasetService = injector.getInstance(DatasetService.class);
    datasetService.startAndWait();
    messagingService = injector.getInstance(MessagingService.class);
    provisionerStore = injector.getInstance(ProvisionerStore.class);
    if (messagingService instanceof Service) {
        ((Service) messagingService).startAndWait();
    }
    provisioningService = injector.getInstance(ProvisioningService.class);
    provisioningService.startAndWait();
    transactionRunner = injector.getInstance(TransactionRunner.class);
}
Also used : Injector(com.google.inject.Injector) TransactionManager(org.apache.tephra.TransactionManager) StructuredTableAdmin(io.cdap.cdap.spi.data.StructuredTableAdmin) TransactionRunner(io.cdap.cdap.spi.data.transaction.TransactionRunner) MessagingService(io.cdap.cdap.messaging.MessagingService) DatasetService(io.cdap.cdap.data2.datafabric.dataset.service.DatasetService) Service(com.google.common.util.concurrent.Service) AppFabricTestModule(io.cdap.cdap.internal.guice.AppFabricTestModule) DatasetService(io.cdap.cdap.data2.datafabric.dataset.service.DatasetService) CConfiguration(io.cdap.cdap.common.conf.CConfiguration) MessagingService(io.cdap.cdap.messaging.MessagingService) BeforeClass(org.junit.BeforeClass)

Example 10 with MessagingService

use of io.cdap.cdap.messaging.MessagingService in project cdap by caskdata.

the class MetadataSubscriberServiceTest method testAppDeletionMessage.

@Test
public void testAppDeletionMessage() throws Exception {
    Injector injector = getInjector();
    // get the alert publisher
    CConfiguration cConf = injector.getInstance(CConfiguration.class);
    MessagingService messagingService = injector.getInstance(MessagingService.class);
    MultiThreadMessagingContext messagingContext = new MultiThreadMessagingContext(messagingService);
    AdminEventPublisher publisher = new AdminEventPublisher(cConf, messagingContext);
    // get the mds and put some workflow metadata in that, the publish of app deletion message should get the metadata
    // deleted
    MetadataStorage mds = injector.getInstance(MetadataStorage.class);
    // use an app with all program types to get all specification tested
    ApplicationId appId = NamespaceId.DEFAULT.app(AllProgramsApp.NAME);
    ProgramId workflowId = appId.workflow(AllProgramsApp.NoOpWorkflow.NAME);
    // generate an app spec from the application
    ApplicationSpecification appSpec = Specifications.from(new AllProgramsApp());
    // need to put metadata on workflow since we currently only set or delete workflow metadata
    mds.apply(new MetadataMutation.Update(workflowId.toMetadataEntity(), new Metadata(MetadataScope.SYSTEM, Collections.singletonMap("profile", ProfileId.NATIVE.getScopedName()))), MutationOptions.DEFAULT);
    Assert.assertEquals(ProfileId.NATIVE.getScopedName(), getProfileProperty(mds, workflowId));
    // publish app deletion message
    publisher.publishAppDeletion(appId, appSpec);
    // Verify the workflow profile metadata is removed because of the publish app deletion message
    Tasks.waitFor(true, () -> mds.read(new Read(workflowId.toMetadataEntity())).isEmpty(), 10, TimeUnit.SECONDS, 100, TimeUnit.MILLISECONDS);
}
Also used : ApplicationSpecification(io.cdap.cdap.api.app.ApplicationSpecification) AdminEventPublisher(io.cdap.cdap.internal.profile.AdminEventPublisher) Metadata(io.cdap.cdap.spi.metadata.Metadata) MultiThreadMessagingContext(io.cdap.cdap.messaging.context.MultiThreadMessagingContext) AllProgramsApp(io.cdap.cdap.AllProgramsApp) ProgramId(io.cdap.cdap.proto.id.ProgramId) CConfiguration(io.cdap.cdap.common.conf.CConfiguration) MessagingService(io.cdap.cdap.messaging.MessagingService) CoreMessagingService(io.cdap.cdap.messaging.service.CoreMessagingService) Read(io.cdap.cdap.spi.metadata.Read) MetadataMutation(io.cdap.cdap.spi.metadata.MetadataMutation) Injector(com.google.inject.Injector) MetadataStorage(io.cdap.cdap.spi.metadata.MetadataStorage) ApplicationId(io.cdap.cdap.proto.id.ApplicationId) Test(org.junit.Test)

Aggregations

MessagingService (io.cdap.cdap.messaging.MessagingService)64 Service (com.google.common.util.concurrent.Service)52 MetricsCollectionService (io.cdap.cdap.api.metrics.MetricsCollectionService)48 CConfiguration (io.cdap.cdap.common.conf.CConfiguration)34 Injector (com.google.inject.Injector)24 ConfigModule (io.cdap.cdap.common.guice.ConfigModule)20 NoOpMetricsCollectionService (io.cdap.cdap.common.metrics.NoOpMetricsCollectionService)20 DatasetService (io.cdap.cdap.data2.datafabric.dataset.service.DatasetService)20 AbstractModule (com.google.inject.AbstractModule)18 DatasetOpExecutorService (io.cdap.cdap.data2.datafabric.dataset.service.executor.DatasetOpExecutorService)18 MessagingServerRuntimeModule (io.cdap.cdap.messaging.guice.MessagingServerRuntimeModule)18 IOException (java.io.IOException)18 LocalLocationModule (io.cdap.cdap.common.guice.LocalLocationModule)16 AuthenticationContextModules (io.cdap.cdap.security.auth.context.AuthenticationContextModules)16 Test (org.junit.Test)16 MultiThreadMessagingContext (io.cdap.cdap.messaging.context.MultiThreadMessagingContext)14 ProgramRunId (io.cdap.cdap.proto.id.ProgramRunId)14 DiscoveryServiceClient (org.apache.twill.discovery.DiscoveryServiceClient)14 Before (org.junit.Before)14 MetadataService (io.cdap.cdap.metadata.MetadataService)12