@Override public Module getInMemoryModules() { // No remote execution module in unit-test return Modules.combine(new InMemoryProgramRunnerModule(), new ProgramStateWriterModule()); }
bind(ServiceAnnouncer.class).to(DiscoveryServiceAnnouncer.class); install(new FactoryModuleBuilder() .implement(ArtifactManager.class, LocalArtifactManager.class) .build(ArtifactManagerFactory.class)); expose(ArtifactManagerFactory.class); bind(PluginFinder.class).to(LocalPluginFinder.class); expose(PluginFinder.class); MapBinder.newMapBinder(binder(), ProgramType.class, ProgramRunner.class); bind(ServiceProgramRunner.class); bind(WorkerProgramRunner.class); bind(ProgramRuntimeProvider.Mode.class).toInstance(ProgramRuntimeProvider.Mode.LOCAL); bind(ProgramRunnerFactory.class).to(DefaultProgramRunnerFactory.class).in(Scopes.SINGLETON); expose(ProgramRunnerFactory.class); bind(ProgramRuntimeService.class).to(InMemoryProgramRuntimeService.class).in(Scopes.SINGLETON); expose(ProgramRuntimeService.class);
bind(ServiceAnnouncer.class).to(DiscoveryServiceAnnouncer.class); bind(QueueReaderFactory.class).in(Scopes.SINGLETON); install(new FactoryModuleBuilder() .implement(ArtifactManager.class, LocalArtifactManager.class) .build(ArtifactManagerFactory.class)); expose(ArtifactManagerFactory.class); bind(PluginFinder.class).to(LocalPluginFinder.class); expose(PluginFinder.class); MapBinder.newMapBinder(binder(), ProgramType.class, ProgramRunner.class); bind(FlowletProgramRunner.class); bind(ServiceProgramRunner.class); bind(WorkerProgramRunner.class); bind(ProgramRuntimeProvider.Mode.class).toInstance(ProgramRuntimeProvider.Mode.LOCAL); bind(ProgramRunnerFactory.class).to(DefaultProgramRunnerFactory.class).in(Scopes.SINGLETON); expose(ProgramRunnerFactory.class); bind(ProgramRuntimeService.class).to(InMemoryProgramRuntimeService.class).in(Scopes.SINGLETON); expose(ProgramRuntimeService.class); install(new DataFabricFacadeModule()); install(new FactoryModuleBuilder().implement(StreamWriter.class, streamWriterClass)
@Override public Module getInMemoryModules() { // No remote execution module in unit-test return Modules.combine(new InMemoryProgramRunnerModule(streamWriterClass), new ProgramStateWriterModule()); }
@Override public Module getStandaloneModules() { // In standalone, we always use the DefaultStreamWriter return Modules.combine(new InMemoryProgramRunnerModule(DefaultStreamWriter.class), new RemoteExecutionProgramRunnerModule(), new ProgramStateWriterModule()); }
@Override public Module getStandaloneModules() { return Modules.combine(new InMemoryProgramRunnerModule(), new RemoteExecutionProgramRunnerModule(), new ProgramStateWriterModule()); }