@Inject TaskStatus(final @Parameter(TaskConfigurationOptions.Identifier.class) String taskId, final @Parameter(ContextIdentifier.class) String contextId, final @Parameter(TaskConfigurationOptions.TaskMessageSources.class) Set<TaskMessageSource> evaluatorMessageSources, final HeartBeatManager heartBeatManager, final ExceptionCodec exceptionCodec) { this.taskId = taskId; this.contextId = contextId; this.heartBeatManager = heartBeatManager; this.evaluatorMessageSources = evaluatorMessageSources; this.exceptionCodec = exceptionCodec; }
@Inject TaskLifeCycleHandlers(final @Parameter(TaskConfigurationOptions.StopHandlers.class) Set<EventHandler<TaskStop>> taskStopHandlers, final @Parameter(TaskConfigurationOptions.StartHandlers.class) Set<EventHandler<TaskStart>> taskStartHandlers, final TaskStartImpl taskStart, final TaskStopImpl taskStop) { this.taskStopHandlers = taskStopHandlers; this.taskStartHandlers = taskStartHandlers; this.taskStart = taskStart; this.taskStop = taskStop; }
@Inject REEFErrorHandler(final InjectionFuture<RemoteManager> remoteManager, final @Parameter(ErrorHandlerRID.class) String errorHandlerRID, final @Parameter(LaunchID.class) String launchID, final ExceptionCodec exceptionCodec) { this.errorHandlerRID = errorHandlerRID; this.remoteManager = remoteManager; this.launchID = launchID; this.exceptionCodec = exceptionCodec; }
@Inject ContextLifeCycle(final @Parameter(ContextIdentifier.class) String identifier, final @Parameter(ContextMessageHandlers.class) Set<EventHandler<byte[]>> contextMessageHandlers, final @Parameter(ContextStartHandlers.class) Set<EventHandler<ContextStart>> contextStartHandlers, final @Parameter(ContextStopHandlers.class) Set<EventHandler<ContextStop>> contextStopHandlers, final @Parameter(ContextMessageSources.class) Set<ContextMessageSource> contextMessageSources) { this.identifier = identifier; this.contextStartHandlers = contextStartHandlers; this.contextStopHandlers = contextStopHandlers; this.contextMessageSources = contextMessageSources; this.contextMessageHandler = new BroadCastEventHandler<>(contextMessageHandlers); }
@Inject ClientWireUp(final @Parameter(ClientPresent.class) String clientPresent, final RuntimeErrorProtoHandler runtimeErrorProtoHandler, final JobStatusMessageHandler jobStatusMessageHandler) { this(null, clientPresent, runtimeErrorProtoHandler, jobStatusMessageHandler); }
@Inject public UnbindNSFromTask( final NetworkService<?> ns, final @Parameter(NetworkServiceParameters.NetworkServiceIdentifierFactory.class) IdentifierFactory idFac) { this.ns = ns; this.idFac = idFac; }
@Inject DriverIdleManager(final @Parameter(DriverIdleSources.class) Set<DriverIdlenessSource> idlenessSources, final InjectionFuture<DriverStatusManager> driverStatusManager) { this.idlenessSources = idlenessSources; this.driverStatusManager = driverStatusManager; }
@Inject public HttpServerReefEventHandler( final ReefEventStateManager reefStateManager, final @Parameter(ClientCloseHandlers.class) Set<EventHandler<Void>> clientCloseHandlers) { this.reefStateManager = reefStateManager; this.clientCloseHandlers = clientCloseHandlers; }
/** * @param resourceStatusHandler the event handler to inform of resource changes. */ @Inject public ReefRunnableProcessObserver(final @Parameter(RuntimeParameters.ResourceStatusHandler.class) EventHandler<DriverRuntimeProtocol.ResourceStatusProto> resourceStatusHandler, final InjectionFuture<ResourceManager> resourceManager) { this.resourceStatusHandler = resourceStatusHandler; this.resourceManager = resourceManager; }
@Inject DefaultContextMessageHandler(final @Parameter(ContextIdentifier.class) String contextID) { this.contextID = contextID; }
@Inject LogFetcher(final @Parameter(AzureStorageAccountName.class) String accountName, final @Parameter(AzureStorageAccountKey.class) String accountKey, final @Parameter(AzureStorageAccountContainerName.class) String azureStorageContainerName) throws URISyntaxException, InvalidKeyException, StorageException, IOException { this.container = getContainer(accountName, accountKey, azureStorageContainerName); this.hadoopConfiguration = new Configuration(); this.fileSystem = FileSystem.get(hadoopConfiguration); this.tFileParser = new TFileParser(hadoopConfiguration, fileSystem); }
@Inject DriverStartHandler(final @Parameter(com.microsoft.reef.driver.parameters.DriverStartHandler.class) Set<EventHandler<StartTime>> startHandler, final @Parameter(DriverRestartHandler.class) EventHandler<StartTime> restartHandler, final DriverStatusManager driverStatusManager) { this.startHandlers = startHandler; this.restartHandler = Optional.of(restartHandler); this.driverStatusManager = driverStatusManager; LOG.log(Level.FINE, "Instantiated `DriverStartHandler with StartHandler [{0}] and RestartHandler [{1}]", new String[]{this.startHandlers.toString(), this.restartHandler.toString()}); }
@Inject DriverStartHandler(final @Parameter(com.microsoft.reef.driver.parameters.DriverStartHandler.class) Set<EventHandler<StartTime>> startHandler, final DriverStatusManager driverStatusManager) { this.startHandlers = startHandler; this.restartHandler = Optional.empty(); this.driverStatusManager = driverStatusManager; LOG.log(Level.FINE, "Instantiated `DriverStartHandler with StartHandler [{0}] and no RestartHandler", this.startHandlers.toString()); }
@Inject public PoissonPoisonedContextStartHandler( final @Parameter(CrashProbability.class) double lambda, final Clock clock) { this.clock = clock; this.timeToCrash = new PoissonDistribution(lambda * 1000).sample(); LOG.log(Level.INFO, "Created Poisson poison injector with prescribed dose: {0}. Crash in {1} msec.", new Object[] { lambda, this.timeToCrash }); }
@Inject ClientWireUp(final RemoteManager remoteManager, final @Parameter(ClientPresent.class) String clientPresent, final RuntimeErrorProtoHandler runtimeErrorProtoHandler, final JobStatusMessageHandler jobStatusMessageHandler) { this.remoteManager = Optional.ofNullable(remoteManager); this.runtimeErrorProtoHandler = runtimeErrorProtoHandler; this.jobStatusMessageHandler = jobStatusMessageHandler; this.isClientPresent = clientPresent.equals(ClientPresent.YES); LOG.log(Level.FINE, "Instantiated 'ClientWireUp'. Client present: " + this.isClientPresent()); }
@Inject public PoissonPoisonedTaskStartHandler( final @Parameter(CrashProbability.class) double lambda, final Clock clock) { this.clock = clock; this.timeToCrash = new PoissonDistribution(lambda * 1000).sample(); LOG.log(Level.INFO, "Created Poisson poison injector with prescribed dose: {0}. Crash in {1} msec.", new Object[] { lambda, this.timeToCrash }); }
@Inject RootContextLauncher(final Injector injector, final @Parameter(RootContextConfiguration.class) String rootContextConfiguration, final @Parameter(InitialTaskConfiguration.class) String initialTaskConfiguration, final ConfigurationSerializer configurationSerializer) throws IOException, BindException { this.injector = injector; this.configurationSerializer = configurationSerializer; this.rootContextConfiguration = this.configurationSerializer.fromString(rootContextConfiguration); this.rootServiceConfiguration = Optional.empty(); this.initialTaskConfiguration = Optional.of(this.configurationSerializer.fromString(initialTaskConfiguration)); }
@Inject RootContextLauncher(final @Parameter(RootContextConfiguration.class) String rootContextConfiguration, final Injector injector, final @Parameter(RootServiceConfiguration.class) String rootServiceConfiguration, final ConfigurationSerializer configurationSerializer) throws IOException, BindException { this.injector = injector; this.configurationSerializer = configurationSerializer; this.rootContextConfiguration = this.configurationSerializer.fromString(rootContextConfiguration); this.rootServiceConfiguration = Optional.of(this.configurationSerializer.fromString(rootServiceConfiguration)); this.initialTaskConfiguration = Optional.empty(); }
@Inject RootContextLauncher(final @Parameter(RootContextConfiguration.class) String rootContextConfiguration, final Injector injector, final ConfigurationSerializer configurationSerializer) throws IOException, BindException { this.injector = injector; this.configurationSerializer = configurationSerializer; this.rootContextConfiguration = this.configurationSerializer.fromString(rootContextConfiguration); this.rootServiceConfiguration = Optional.empty(); this.initialTaskConfiguration = Optional.empty(); }