use of co.cask.cdap.config.PreferencesStore in project cdap by caskdata.
the class PreviewRunnerModule method configure.
@Override
protected void configure() {
bind(ArtifactRepository.class).toInstance(artifactRepository);
expose(ArtifactRepository.class);
bind(ArtifactStore.class).toInstance(artifactStore);
expose(ArtifactStore.class);
bind(AuthorizerInstantiator.class).toInstance(authorizerInstantiator);
expose(AuthorizerInstantiator.class);
bind(AuthorizationEnforcer.class).toInstance(authorizationEnforcer);
expose(AuthorizationEnforcer.class);
bind(PrivilegesManager.class).toInstance(privilegesManager);
expose(PrivilegesManager.class);
bind(StreamConsumerFactory.class).to(InMemoryStreamConsumerFactory.class).in(Scopes.SINGLETON);
expose(StreamConsumerFactory.class);
bind(StreamCoordinatorClient.class).toInstance(streamCoordinatorClient);
expose(StreamCoordinatorClient.class);
bind(PreferencesStore.class).toInstance(preferencesStore);
// bind explore client to mock.
bind(ExploreClient.class).to(MockExploreClient.class);
expose(ExploreClient.class);
bind(StorageProviderNamespaceAdmin.class).to(LocalStorageProviderNamespaceAdmin.class);
bind(PipelineFactory.class).to(SynchronousPipelineFactory.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(RouteStore.class).to(LocalRouteStore.class).in(Scopes.SINGLETON);
bind(UGIProvider.class).to(UnsupportedUGIProvider.class);
expose(UGIProvider.class);
bind(RuntimeStore.class).to(DefaultStore.class);
expose(RuntimeStore.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(PreviewRunner.class).to(DefaultPreviewRunner.class).in(Scopes.SINGLETON);
expose(PreviewRunner.class);
bind(PreviewStore.class).to(DefaultPreviewStore.class).in(Scopes.SINGLETON);
bind(Scheduler.class).to(NoOpScheduler.class);
bind(co.cask.cdap.internal.app.runtime.schedule.Scheduler.class).to(co.cask.cdap.internal.app.runtime.schedule.NoOpScheduler.class);
bind(DataTracerFactory.class).to(DefaultDataTracerFactory.class);
expose(DataTracerFactory.class);
bind(OwnerStore.class).to(DefaultOwnerStore.class);
expose(OwnerStore.class);
bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class);
expose(OwnerAdmin.class);
}
Aggregations