private void addOnPremiseModules(List<Module> modules) { String instanceId = systemArgs.getOption(ProgramOptionConstants.INSTANCE_ID); modules.add(new LocationRuntimeModule().getDistributedModules()); modules.add(new KafkaClientModule()); modules.add(new LoggingModules().getDistributedModules()); modules.add(new DataFabricModules(generateClientId(programRunId, instanceId)).getDistributedModules()); modules.add(new DataSetsModules().getDistributedModules()); modules.add(new NamespaceClientRuntimeModule().getDistributedModules()); modules.add(new DistributedProgramStreamModule()); }
private void addOnPremiseModules(List<Module> modules) { String instanceId = systemArgs.getOption(ProgramOptionConstants.INSTANCE_ID); modules.add(new DFSLocationModule()); modules.add(new KafkaClientModule()); modules.add(new KafkaLogAppenderModule()); modules.add(new DataFabricModules(generateClientId(programRunId, instanceId)).getDistributedModules()); modules.add(new DataSetsModules().getDistributedModules()); modules.add(new NamespaceQueryAdminModule()); modules.add(new AbstractModule() { @Override protected void configure() { // bind explore client to ProgramDiscoveryExploreClient which is aware of the programId bind(ExploreClient.class).to(ProgramDiscoveryExploreClient.class).in(Scopes.SINGLETON); } }); }
new DataFabricModules(txClientId).getDistributedModules(), new DataSetsModules().getDistributedModules(), new LocationRuntimeModule().getDistributedModules(),
@VisibleForTesting public static Injector createInjector(CConfiguration cConf, Configuration hConf) { return Guice.createInjector( new ConfigModule(cConf, hConf), new IOModule(), new ZKClientModule(), new ZKDiscoveryModule(), new KafkaClientModule(), new DFSLocationModule(), new DataFabricModules(HBaseTableExporter.class.getName()).getDistributedModules(), new DataSetsModules().getDistributedModules(), new MessagingClientModule(), new MetricsClientRuntimeModule().getDistributedModules(), new KafkaLogAppenderModule(), new ExploreClientModule(), new AuthorizationModule(), new AuthorizationEnforcementModule().getMasterModule(), new AuthenticationContextModules().getMasterModule(), new NamespaceQueryAdminModule(), new SecureStoreServerModule(), new AbstractModule() { @Override protected void configure() { bind(UGIProvider.class).to(RemoteUGIProvider.class); bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class); } } ); }
@VisibleForTesting static Injector createInjector(CConfiguration cConf, Configuration hConf) { return Guice.createInjector( new ConfigModule(cConf, hConf), new ZKClientModule(), new DFSLocationModule(), new NamespaceQueryAdminModule(), new ZKDiscoveryModule(), new DataFabricModules("cdap.explore.ContextManager").getDistributedModules(), new DataSetsModules().getDistributedModules(), new ExploreClientModule(), new KafkaClientModule(), new AuditModule().getDistributedModules(), new AuthorizationEnforcementModule().getDistributedModules(), new SecureStoreClientModule(), new AuthenticationContextModules().getMasterModule(), new MessagingClientModule(), new AbstractModule() { @Override protected void configure() { bind(UGIProvider.class).to(RemoteUGIProvider.class).in(Scopes.SINGLETON); bind(MetricsCollectionService.class).to(NoOpMetricsCollectionService.class).in(Scopes.SINGLETON); // bind PrivilegesManager to a remote implementation, so it does not need to instantiate the authorizer bind(PrivilegesManager.class).to(RemotePrivilegesManager.class); bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class); } } ); }
@VisibleForTesting static Injector createGuiceInjector(CConfiguration cConf, Configuration hConf, TwillContext twillContext) { String txClientId = String.format("cdap.service.%s.%d", Constants.Service.LOGSAVER, twillContext.getInstanceId()); return Guice.createInjector( new ConfigModule(cConf, hConf), new IOModule(), new ZKClientModule(), new ZKDiscoveryModule(), new KafkaClientModule(), new MetricsClientRuntimeModule().getDistributedModules(), new DFSLocationModule(), new NamespaceQueryAdminModule(), new DataFabricModules(txClientId).getDistributedModules(), new DataSetsModules().getDistributedModules(), new DistributedLogFrameworkModule(twillContext), new KafkaLogAppenderModule(), new AuditModule().getDistributedModules(), new AuthorizationEnforcementModule().getDistributedModules(), new AuthenticationContextModules().getMasterModule(), new MessagingClientModule(), new AbstractModule() { @Override protected void configure() { bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class); bind(UGIProvider.class).to(RemoteUGIProvider.class).in(Scopes.SINGLETON); } } ); } }
@VisibleForTesting static Injector createGuiceInjector(CConfiguration cConf, Configuration hConf, String txClientId, TwillContext twillContext) { return Guice.createInjector( new ConfigModule(cConf, hConf), new IOModule(), new ZKClientModule(), new ZKDiscoveryModule(), new KafkaClientModule(), new MessagingClientModule(), new MetricsClientRuntimeModule().getDistributedModules(), new MetricsStoreModule(), new KafkaLogAppenderModule(), new DFSLocationModule(), new NamespaceQueryAdminModule(), new DataFabricModules(txClientId).getDistributedModules(), new DataSetsModules().getDistributedModules(), new MetricsProcessorModule(twillContext), new MetricsProcessorStatusServiceModule(), new AuditModule().getDistributedModules(), new AuthorizationEnforcementModule().getDistributedModules(), new AuthenticationContextModules().getMasterModule(), new AbstractModule() { @Override protected void configure() { bind(OwnerAdmin.class).to(DefaultOwnerAdmin.class); } } ); }
new TwillModule(), new ExploreClientModule(), new DataFabricModules().getDistributedModules(), new ServiceStoreModules().getDistributedModules(), new DataSetsModules().getDistributedModules(),
new DFSLocationModule(), new NamespaceQueryAdminModule(), new DataFabricModules(txClientId).getDistributedModules(), new DataSetsModules().getDistributedModules(), new KafkaLogAppenderModule(),
new KafkaClientModule(), new MessagingClientModule(), new DataFabricModules(txClientId).getDistributedModules(), new DataSetsModules().getDistributedModules(), new DFSLocationModule(),
new KafkaClientModule(), new MessagingClientModule(), new DataFabricModules(txClientId).getDistributedModules(), new DataSetsModules().getDistributedModules(), new DFSLocationModule(),
new DFSLocationModule(), new NamespaceQueryAdminModule(), new DataFabricModules(txClientId).getDistributedModules(), new DataSetsModules().getDistributedModules(), new DataSetServiceModules().getDistributedModules(),
new NamespaceClientRuntimeModule().getDistributedModules(), new DiscoveryRuntimeModule().getDistributedModules(), new DataFabricModules("cdap.explore.ContextManager").getDistributedModules(), new DataSetsModules().getDistributedModules(), new ExploreClientModule(),
new AuthorizationEnforcementModule().getMasterModule(), new SecureStoreServerModule(), new DataFabricModules(UpgradeTool.class.getName()).getDistributedModules(), new AppFabricServiceRuntimeModule().getDistributedModules(), new KafkaLogAppenderModule(),
new KafkaClientModule(), new DataSetServiceModules().getDistributedModules(), new DataFabricModules("cdap.master").getDistributedModules(), new DataSetsModules().getDistributedModules(), new MetricsClientRuntimeModule().getDistributedModules(),