@Override protected void configure() { bind(RunRecordCorrectorService.class).to(ScheduledRunRecordCorrectorService.class) .in(Scopes.SINGLETON); bind(TimeSchedulerService.class).to(DistributedTimeSchedulerService.class) .in(Scopes.SINGLETON); bind(MRJobInfoFetcher.class).to(DistributedMRJobInfoFetcher.class); bind(StorageProviderNamespaceAdmin.class) .to(DistributedStorageProviderNamespaceAdmin.class); bind(UGIProvider.class).to(DefaultUGIProvider.class); bind(RouteStore.class).to(ZKRouteStore.class).in(Scopes.SINGLETON); MapBinder<String, MasterServiceManager> mapBinder = MapBinder.newMapBinder( binder(), String.class, MasterServiceManager.class); mapBinder.addBinding(Constants.Service.LOGSAVER) .to(LogSaverStatusServiceManager.class); Multibinder.newSetBinder(binder(), String.class, Names.named("appfabric.services.names")); servicesNamesBinder.addBinding().toInstance(Constants.Service.APP_FABRIC_HTTP); Multibinder.newSetBinder(binder(), String.class, Names.named("appfabric.handler.hooks")); handlerHookNamesBinder.addBinding().toInstance(Constants.Service.APP_FABRIC_HTTP);
@Override protected void configure() { bind(RunRecordCorrectorService.class).to(ScheduledRunRecordCorrectorService.class) .in(Scopes.SINGLETON); bind(TimeSchedulerService.class).to(DistributedTimeSchedulerService.class) .in(Scopes.SINGLETON); bind(MRJobInfoFetcher.class).to(DistributedMRJobInfoFetcher.class); bind(StorageProviderNamespaceAdmin.class) .to(DistributedStorageProviderNamespaceAdmin.class); bind(UGIProvider.class).to(DefaultUGIProvider.class); bind(RouteStore.class).to(ZKRouteStore.class).in(Scopes.SINGLETON); MapBinder<String, MasterServiceManager> mapBinder = MapBinder.newMapBinder( binder(), String.class, MasterServiceManager.class); mapBinder.addBinding(Constants.Service.LOGSAVER) .to(LogSaverStatusServiceManager.class); Multibinder.newSetBinder(binder(), String.class, Names.named("appfabric.services.names")); servicesNamesBinder.addBinding().toInstance(Constants.Service.APP_FABRIC_HTTP); Multibinder.newSetBinder(binder(), String.class, Names.named("appfabric.handler.hooks")); handlerHookNamesBinder.addBinding().toInstance(Constants.Service.APP_FABRIC_HTTP);