@Override protected void configure() { // Bind TxDs2 stuff bind(QueueClientFactory.class).to(InMemoryQueueClientFactory.class).in(Singleton.class); bind(QueueAdmin.class).to(InMemoryQueueAdmin.class).in(Singleton.class); // bind transactions bind(TransactionSystemClientService.class).to(DelegatingTransactionSystemClientService.class); install(Modules.override(new TransactionModules(txClientId).getInMemoryModules()).with(new AbstractModule() { @Override protected void configure() { // Binds the tephra MetricsCollector to the one that emit metrics via MetricsCollectionService bind(MetricsCollector.class).to(TransactionManagerMetricsCollector.class).in(Scopes.SINGLETON); } })); install(new TransactionExecutorModule()); } }
@Override public void configure() { bind(LevelDBTableService.class).in(Scopes.SINGLETON); bind(QueueClientFactory.class).to(LevelDBQueueClientFactory.class).in(Singleton.class); bind(QueueAdmin.class).to(LevelDBQueueAdmin.class).in(Singleton.class); // bind transactions bind(TransactionSystemClientService.class).to(DelegatingTransactionSystemClientService.class); install(Modules.override(new TransactionModules().getSingleNodeModules()).with(new AbstractModule() { @Override protected void configure() { // Binds the tephra MetricsCollector to the one that emit metrics via MetricsCollectionService bind(MetricsCollector.class).to(TransactionManagerMetricsCollector.class).in(Scopes.SINGLETON); } })); install(new TransactionExecutorModule()); } }
@Override public void configure() { bind(ThriftClientProvider.class).toProvider(ThriftClientProviderSupplier.class); bind(HBaseTableUtil.class).toProvider(HBaseTableUtilFactory.class); // bind transactions bind(TransactionSystemClientService.class).to(DistributedTransactionSystemClientService.class); install(Modules.override(new TransactionModules(txClientId).getDistributedModules()).with(new AbstractModule() { @Override protected void configure() { // Binds the tephra MetricsCollector to the one that emit metrics via MetricsCollectionService bind(MetricsCollector.class).to(TransactionManagerMetricsCollector.class).in(Scopes.SINGLETON); } })); install(new TransactionExecutorModule()); // Bind the QueueAdmin, which is used in cdap master. This will be removed when Flow support is removed. bind(QueueAdmin.class).to(HBaseQueueAdmin.class).in(Singleton.class); }
@Override public void configure() { bind(ThriftClientProvider.class).toProvider(ThriftClientProviderSupplier.class); bind(HBaseTableUtil.class).toProvider(HBaseTableUtilFactory.class); // bind transactions bind(TransactionSystemClientService.class).to(DistributedTransactionSystemClientService.class); install(Modules.override(new TransactionModules(txClientId).getDistributedModules()).with(new AbstractModule() { @Override protected void configure() { // Binds the tephra MetricsCollector to the one that emit metrics via MetricsCollectionService bind(MetricsCollector.class).to(TransactionManagerMetricsCollector.class).in(Scopes.SINGLETON); } })); install(new TransactionExecutorModule()); install(new StorageModule()); }
@Override public void configure() { bind(LevelDBTableService.class).in(Scopes.SINGLETON); // bind transactions bind(TransactionSystemClientService.class).to(DelegatingTransactionSystemClientService.class); install(Modules.override(new TransactionModules().getSingleNodeModules()).with(new AbstractModule() { @Override protected void configure() { // Binds the tephra MetricsCollector to the one that emit metrics via MetricsCollectionService bind(MetricsCollector.class).to(TransactionManagerMetricsCollector.class).in(Scopes.SINGLETON); } })); install(new TransactionExecutorModule()); install(new StorageModule()); } }
@Override protected void configure() { // bind transactions bind(TransactionSystemClientService.class).to(DelegatingTransactionSystemClientService.class); install(Modules.override(new TransactionModules(txClientId).getInMemoryModules()).with(new AbstractModule() { @Override protected void configure() { // Binds the tephra MetricsCollector to the one that emit metrics via MetricsCollectionService bind(MetricsCollector.class).to(TransactionManagerMetricsCollector.class).in(Scopes.SINGLETON); } })); install(new TransactionExecutorModule()); install(new StorageModule()); } }
new TransactionExecutorModule(), new DataSetsModules().getStandaloneModules(), new DataSetServiceModules().getInMemoryModules(),
new TransactionExecutorModule(), new DataSetsModules().getStandaloneModules(), new DataSetServiceModules().getInMemoryModules(),
@Override protected void before() throws Throwable { this.tmpFolder = new TemporaryFolder(); tmpFolder.create(); File localDataDir = tmpFolder.newFolder(); cConf = CConfiguration.create(); cConf.set(Constants.CFG_LOCAL_DATA_DIR, localDataDir.getAbsolutePath()); injector = Guice.createInjector( new ConfigModule(cConf), new NonCustomLocationUnitTestModule(), new SystemDatasetRuntimeModule().getInMemoryModules(), new TransactionModules().getInMemoryModules(), new TransactionExecutorModule(), new PrivateModule() { @Override protected void configure() { bind(DatasetDefinitionRegistryFactory.class) .to(DefaultDatasetDefinitionRegistryFactory.class).in(Scopes.SINGLETON); bind(DatasetFramework.class).to(InMemoryDatasetFramework.class); expose(DatasetFramework.class); } } ); txManager = injector.getInstance(TransactionManager.class); txManager.startAndWait(); framework = injector.getInstance(DatasetFramework.class); }
new DataFabricModules().getInMemoryModules(), new DataSetsModules().getStandaloneModules(), new TransactionExecutorModule(), new DataSetServiceModules().getInMemoryModules(), new InMemoryDiscoveryModule(),
@Override protected void configure() { install(new DataFabricModules().getInMemoryModules()); install(new DataSetsModules().getStandaloneModules()); install(new TransactionExecutorModule()); install(new DataSetServiceModules().getInMemoryModules()); install(new ConfigModule(cConf, hConf, sConf)); install(new IOModule()); install(new InMemoryDiscoveryModule()); install(new AppFabricServiceRuntimeModule().getInMemoryModules()); install(new ServiceStoreModules().getInMemoryModules()); install(new ProgramRunnerRuntimeModule().getInMemoryModules()); install(new NonCustomLocationUnitTestModule()); install(new LocalLogAppenderModule()); install(new LogReaderRuntimeModules().getInMemoryModules()); install(new LogQueryServerModule()); install(new MetricsHandlerModule()); install(new MetricsClientRuntimeModule().getInMemoryModules()); install(new ExploreClientModule()); install(new ConfigStoreModule().getInMemoryModule()); install(new NamespaceStoreModule().getStandaloneModules()); install(new MetadataServiceModule()); install(new AuthorizationModule()); install(new AuthorizationEnforcementModule().getStandaloneModules()); install(new SecureStoreServerModule()); install(new MetadataReaderWriterModules().getInMemoryModules()); install(new MessagingServerRuntimeModule().getInMemoryModules()); install(new MockProvisionerModule()); } }