@Override public Module getStandaloneModules() { return new DataFabricLevelDBModule(); }
@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()); } }
public Module getDataFabricModule(final TransactionSystemClient transactionSystemClient) { return Modules.override(new DataFabricLevelDBModule()).with(new AbstractModule() { @Override protected void configure() { // Use the distributed version of the transaction client bind(TransactionSystemClient.class).toInstance(transactionSystemClient); } }); }
@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 public void configure() { install(Modules.override(new DataFabricLevelDBModule()).with(new AbstractModule() { @Override protected void configure() { bind(QueueClientFactory.class).to(LevelDBAndInMemoryQueueClientFactory.class).in(Singleton.class); bind(QueueAdmin.class).to(InMemoryQueueAdmin.class).in(Singleton.class); } })); }
@BeforeClass public static void init() throws Exception { cConf = CConfiguration.create(); cConf.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath()); Injector injector = Guice.createInjector( new ConfigModule(cConf), new NonCustomLocationUnitTestModule(), new InMemoryDiscoveryModule(), new DataSetsModules().getStandaloneModules(), new DataFabricLevelDBModule(), new TransactionMetricsModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getStandaloneModules(), new AuthenticationContextModules().getMasterModule()); service = injector.getInstance(LevelDBTableService.class); }
@BeforeClass public static void init() throws Exception { CConfiguration conf = CConfiguration.create(); conf.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath()); injector = Guice.createInjector( new ConfigModule(conf), new NonCustomLocationUnitTestModule(), new InMemoryDiscoveryModule(), new DataSetsModules().getStandaloneModules(), new DataFabricLevelDBModule(), new TransactionMetricsModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getStandaloneModules(), new AuthenticationContextModules().getMasterModule()); service = injector.getInstance(LevelDBTableService.class); }
@BeforeClass public static void setup() throws Exception { CConfiguration conf = CConfiguration.create(); conf.set(Constants.CFG_LOCAL_DATA_DIR, tmpFolder.newFolder().getAbsolutePath()); Injector injector = Guice.createInjector( new ConfigModule(conf), new NonCustomLocationUnitTestModule(), new AuthorizationTestModule(), new AuthorizationEnforcementModule().getInMemoryModules(), new AuthenticationContextModules().getMasterModule(), new InMemoryDiscoveryModule(), new SystemDatasetRuntimeModule().getInMemoryModules(), new DataSetsModules().getInMemoryModules(), new DataFabricLevelDBModule(), new TransactionMetricsModule()); dsFramework = injector.getInstance(DatasetFramework.class); }