org.apache.reef.tang.InjectionFuture Java Examples
The following examples show how to use
org.apache.reef.tang.InjectionFuture.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RuntimeClock.java From reef with Apache License 2.0 | 6 votes |
@Inject private RuntimeClock( final Timer timer, @Parameter(Clock.StartHandler.class) final InjectionFuture<Set<EventHandler<StartTime>>> startHandler, @Parameter(Clock.StopHandler.class) final InjectionFuture<Set<EventHandler<StopTime>>> stopHandler, @Parameter(Clock.RuntimeStartHandler.class) final InjectionFuture<Set<EventHandler<RuntimeStart>>> runtimeStartHandler, @Parameter(Clock.RuntimeStopHandler.class) final InjectionFuture<Set<EventHandler<RuntimeStop>>> runtimeStopHandler, @Parameter(Clock.IdleHandler.class) final InjectionFuture<Set<EventHandler<IdleClock>>> idleHandler) { this.timer = timer; this.startHandler = startHandler; this.stopHandler = stopHandler; this.runtimeStartHandler = runtimeStartHandler; this.runtimeStopHandler = runtimeStopHandler; this.idleHandler = idleHandler; LOG.log(Level.FINE, "RuntimeClock instantiated."); }
Example #2
Source File: HeartBeatManager.java From reef with Apache License 2.0 | 6 votes |
@Inject private HeartBeatManager( final InjectionFuture<EvaluatorRuntime> evaluatorRuntime, final InjectionFuture<ContextManager> contextManager, final Clock clock, final RemoteManager remoteManager, @Parameter(HeartbeatPeriod.class) final int heartbeatPeriod, @Parameter(DriverRemoteIdentifier.class) final String driverRID) { this.evaluatorRuntime = evaluatorRuntime; this.contextManager = contextManager; this.clock = clock; this.heartbeatPeriod = heartbeatPeriod; this.evaluatorHeartbeatHandler = remoteManager.getHandler( driverRID, EvaluatorRuntimeProtocol.EvaluatorHeartbeatProto.class); }
Example #3
Source File: YARNResourceLaunchHandler.java From reef with Apache License 2.0 | 6 votes |
@Inject YARNResourceLaunchHandler(final Containers containers, final InjectionFuture<YarnContainerManager> yarnContainerManager, final EvaluatorSetupHelper evaluatorSetupHelper, final REEFFileNames filenames, @Parameter(JVMHeapSlack.class) final double jvmHeapSlack, final SecurityTokenProvider tokenProvider) { this.jvmHeapFactor = 1.0 - jvmHeapSlack; LOG.log(Level.FINEST, "Instantiating 'YARNResourceLaunchHandler'"); this.containers = containers; this.yarnContainerManager = yarnContainerManager; this.evaluatorSetupHelper = evaluatorSetupHelper; this.filenames = filenames; this.tokenProvider = tokenProvider; LOG.log(Level.FINE, "Instantiated 'YARNResourceLaunchHandler'"); }
Example #4
Source File: HttpServerReefEventHandler.java From reef with Apache License 2.0 | 6 votes |
@Inject public HttpServerReefEventHandler( final ReefEventStateManager reefStateManager, @Parameter(ClientCloseHandlers.class) final Set<EventHandler<Void>> clientCloseHandlers, @Parameter(LogLevelName.class) final String logLevel, final LoggingScopeFactory loggingScopeFactory, final REEFFileNames reefFileNames, final InjectionFuture<ProgressProvider> progressProvider) { this.reefStateManager = reefStateManager; this.clientCloseHandlers = clientCloseHandlers; this.loggingScopeFactory = loggingScopeFactory; this.logLevelPrefix = new StringBuilder().append(logLevel).append(": ").toString(); this.progressProvider = progressProvider; driverStdoutFile = reefFileNames.getDriverStdoutFileName(); driverStderrFile = reefFileNames.getDriverStderrFileName(); }
Example #5
Source File: ByteTransportChannelInitializer.java From incubator-nemo with Apache License 2.0 | 6 votes |
/** * Creates a netty channel initializer. * * @param pipeManagerWorker provides handler for new contexts by remote executors * @param blockManagerWorker provides handler for new contexts by remote executors * @param byteTransfer provides channel caching * @param byteTransport provides {@link io.netty.channel.group.ChannelGroup} * @param controlFrameEncoder encodes control frames * @param dataFrameEncoder encodes data frames * @param localExecutorId the id of this executor */ @Inject private ByteTransportChannelInitializer(final InjectionFuture<PipeManagerWorker> pipeManagerWorker, final InjectionFuture<BlockManagerWorker> blockManagerWorker, final InjectionFuture<ByteTransfer> byteTransfer, final InjectionFuture<ByteTransport> byteTransport, final ControlFrameEncoder controlFrameEncoder, final DataFrameEncoder dataFrameEncoder, @Parameter(JobConf.ExecutorId.class) final String localExecutorId) { this.pipeManagerWorker = pipeManagerWorker; this.blockManagerWorker = blockManagerWorker; this.byteTransfer = byteTransfer; this.byteTransport = byteTransport; this.controlFrameEncoder = controlFrameEncoder; this.dataFrameEncoder = dataFrameEncoder; this.localExecutorId = localExecutorId; }
Example #6
Source File: ContextFactory.java From reef with Apache License 2.0 | 6 votes |
@Inject ContextFactory(@Parameter(EvaluatorManager.EvaluatorIdentifier.class) final String evaluatorId, @Parameter(EvaluatorManager.EvaluatorDescriptorName.class) final EvaluatorDescriptor evaluatorDescriptor, final ConfigurationSerializer configurationSerializer, final ExceptionCodec exceptionCodec, final EvaluatorMessageDispatcher messageDispatcher, final ContextControlHandler contextControlHandler, final InjectionFuture<ContextRepresenters> contextRepresenters) { this.evaluatorId = evaluatorId; this.evaluatorDescriptor = evaluatorDescriptor; this.configurationSerializer = configurationSerializer; this.exceptionCodec = exceptionCodec; this.messageDispatcher = messageDispatcher; this.contextControlHandler = contextControlHandler; this.contextRepresenters = contextRepresenters; }
Example #7
Source File: ClientManager.java From reef with Apache License 2.0 | 6 votes |
@Inject ClientManager(@Parameter(ClientCloseHandlers.class) final InjectionFuture<Set<EventHandler<Void>>> clientCloseHandlers, @Parameter(ClientCloseWithMessageHandlers.class) final InjectionFuture<Set<EventHandler<byte[]>>> clientCloseWithMessageHandlers, @Parameter(ClientMessageHandlers.class) final InjectionFuture<Set<EventHandler<byte[]>>> clientMessageHandlers, @Parameter(ClientRemoteIdentifier.class) final String clientRID, final RemoteManager remoteManager, final DriverStatusManager driverStatusManager) { this.driverStatusManager = driverStatusManager; this.clientCloseHandlers = clientCloseHandlers; this.clientCloseWithMessageHandlers = clientCloseWithMessageHandlers; this.clientMessageHandlers = clientMessageHandlers; if (!clientRID.equals(ClientRemoteIdentifier.NONE)) { remoteManager.registerHandler(clientRID, ClientRuntimeProtocol.JobControlProto.class, this); } else { LOG.log(Level.FINE, "Not registering a handler for JobControlProto, as there is no client."); } }
Example #8
Source File: DriverIdleManager.java From reef with Apache License 2.0 | 5 votes |
@Inject private DriverIdleManager( @Parameter(DriverIdleSources.class) final Set<DriverIdlenessSource> idlenessSources, final InjectionFuture<DriverStatusManager> driverStatusManager) { this.idlenessSources = idlenessSources; this.driverStatusManager = driverStatusManager; }
Example #9
Source File: WakeProfiler.java From reef with Apache License 2.0 | 5 votes |
@Override public <T> void injectionFutureInstantiated(final InjectionFuture<T> arg0, final T arg1) { if (!futures.containsKey(arg0)) { LOG.warning("adding future " + arg0 + " instance " + arg1); futures.put(arg0, arg1); getVertex(arg1); } }
Example #10
Source File: YarnContainerManager.java From reef with Apache License 2.0 | 5 votes |
@Inject private YarnContainerManager( @Parameter(YarnHeartbeatPeriod.class) final int yarnRMHeartbeatPeriod, @Parameter(JobSubmissionDirectory.class) final String jobSubmissionDirectory, final YarnConfiguration yarnConf, final YarnProxyUser yarnProxyUser, final REEFEventHandlers reefEventHandlers, final Containers containers, final ApplicationMasterRegistration registration, final ContainerRequestCounter containerRequestCounter, final DriverStatusManager driverStatusManager, final REEFFileNames reefFileNames, final TrackingURLProvider trackingURLProvider, final LocalAddressProvider addressProvider, final RackNameFormatter rackNameFormatter, final InjectionFuture<ProgressProvider> progressProvider) throws IOException { this.reefEventHandlers = reefEventHandlers; this.driverStatusManager = driverStatusManager; this.containers = containers; this.registration = registration; this.containerRequestCounter = containerRequestCounter; this.yarnConf = yarnConf; this.yarnProxyUser = yarnProxyUser; this.rackNameFormatter = rackNameFormatter; this.trackingUrl = trackingURLProvider.getTrackingUrl(); this.amRegistrationHost = addressProvider.getLocalAddress(); this.resourceManager = AMRMClientAsync.createAMRMClientAsync(yarnRMHeartbeatPeriod, this); this.nodeManager = new NMClientAsyncImpl(this); this.jobSubmissionDirectory = jobSubmissionDirectory; this.reefFileNames = reefFileNames; this.progressProvider = progressProvider; LOG.log(Level.INFO, "Instantiated YarnContainerManager: {0} {1}, trackingUrl: {3}, jobSubmissionDirectory: {4}.", new Object[] {this.registration, this.yarnProxyUser, this.trackingUrl, this.jobSubmissionDirectory}); }
Example #11
Source File: AzureBatchTaskStatusAlarmHandler.java From reef with Apache License 2.0 | 5 votes |
@Inject private AzureBatchTaskStatusAlarmHandler( final InjectionFuture<AzureBatchEvaluatorShimManager> evaluatorShimManager, final AzureBatchHelper azureBatchHelper, final Evaluators evaluators, final Clock clock, @Parameter(AzureBatchTaskStatusCheckPeriod.class) final int taskStatusCheckPeriod) { this.evaluatorShimManager = evaluatorShimManager; this.azureBatchHelper = azureBatchHelper; this.evaluators = evaluators; this.clock = clock; this.taskStatusCheckPeriod = taskStatusCheckPeriod; }
Example #12
Source File: GRPCDriverClientService.java From reef with Apache License 2.0 | 5 votes |
@Inject private GRPCDriverClientService( final EvaluatorDescriptorBuilderFactory evaluatorDescriptorBuilderFactory, final ExceptionCodec exceptionCodec, final GRPCDriverServiceClient driverServiceClient, final TcpPortProvider tcpPortProvider, final InjectionFuture<Clock> clock, final InjectionFuture<DriverClientDispatcher> clientDriverDispatcher) { this.evaluatorDescriptorBuilderFactory = evaluatorDescriptorBuilderFactory; this.exceptionCodec = exceptionCodec; this.driverServiceClient = driverServiceClient; this.tcpPortProvider = tcpPortProvider; this.clock = clock; this.clientDriverDispatcher = clientDriverDispatcher; }
Example #13
Source File: ClientService.java From reef with Apache License 2.0 | 5 votes |
/** * This class should not be instantiated. */ @Inject private ClientService( @Parameter(ClientServerPort.class) final int clientServerPort, final ExceptionCodec exceptionCodec, final InjectionFuture<REEF> reef) { this.reef = reef; this.exceptionCodec = exceptionCodec; if (clientServerPort > 0) { try { this.server = ServerBuilder.forPort(0) .addService(this) .build() .start(); final ManagedChannel channel = ManagedChannelBuilder .forAddress("localhost", clientServerPort) .usePlaintext() .build(); this.clientStub = BridgeClientGrpc.newFutureStub(channel); this.clientStub.registerREEFClient( ClientProtocol.REEFClientRegistration.newBuilder() .setHostname("localhost") .setPort(this.server.getPort()) .build()); } catch (IOException e) { throw new RuntimeException("unable to start gRPC server", e); } } }
Example #14
Source File: MockEvaluatorRequestor.java From reef with Apache License 2.0 | 5 votes |
@Inject MockEvaluatorRequestor( final InjectionFuture<MockClock> clock, final InjectionFuture<MockRuntimeDriver> mockRuntimeDriver) { this.clock = clock; this.mockRuntimeDriver = mockRuntimeDriver; }
Example #15
Source File: ReefRunnableProcessObserver.java From reef with Apache License 2.0 | 5 votes |
/** * @param resourceStatusHandler the event handler to inform of resource changes. */ @Inject public ReefRunnableProcessObserver(@Parameter(RuntimeParameters.ResourceStatusHandler.class) final EventHandler<ResourceStatusEvent> resourceStatusHandler, final InjectionFuture<ResourceManager> resourceManager) { this.resourceStatusHandler = resourceStatusHandler; this.resourceManager = resourceManager; }
Example #16
Source File: NetworkTransport.java From reef with Apache License 2.0 | 5 votes |
/** * Sends and receives messages between the java bridge and C# bridge. * @param observer A multiobserver instance that will receive all incoming messages. */ @Inject private NetworkTransport( final RemoteManagerFactory remoteManagerFactory, final LocalAddressProvider localAddressProvider, final ProtocolSerializer serializer, final InjectionFuture<MultiObserver> observer) { LOG.log(Level.FINE, "Java bridge network initializing"); this.serializer = serializer; this.messageObserver = observer; this.remoteManager = remoteManagerFactory.getInstance( "JavaBridgeNetwork", localAddressProvider.getLocalAddress(), 0, new ByteCodec()); // Get our address and port number. final RemoteIdentifier remoteIdentifier = this.remoteManager.getMyIdentifier(); if (remoteIdentifier instanceof SocketRemoteIdentifier) { final SocketRemoteIdentifier socketIdentifier = (SocketRemoteIdentifier)remoteIdentifier; this.inetSocketAddress = socketIdentifier.getSocketAddress(); } else { throw new RuntimeException("Identifier is not a SocketRemoteIdentifier: " + remoteIdentifier); } // Register as the message handler for any incoming messages. this.remoteManager.registerHandler(byte[].class, new LocalObserver()); }
Example #17
Source File: ResourceManagerStatus.java From reef with Apache License 2.0 | 5 votes |
@Inject private ResourceManagerStatus( final ResourceManagerErrorHandler resourceManagerErrorHandler, final DriverStatusManager driverStatusManager, final InjectionFuture<DriverIdleManager> driverIdleManager) { this.resourceManagerErrorHandler = resourceManagerErrorHandler; this.driverStatusManager = driverStatusManager; this.driverIdleManager = driverIdleManager; }
Example #18
Source File: ResourceStatusHandler.java From reef with Apache License 2.0 | 5 votes |
@Inject ResourceStatusHandler(final Evaluators evaluators, final EvaluatorManagerFactory evaluatorManagerFactory, final InjectionFuture<DriverRestartManager> driverRestartManager) { this.evaluators = evaluators; this.evaluatorManagerFactory = evaluatorManagerFactory; this.driverRestartManager = driverRestartManager; }
Example #19
Source File: RunningJobsImpl.java From reef with Apache License 2.0 | 5 votes |
@Inject RunningJobsImpl(final Injector injector, @Parameter(ResourceManagerErrorHandler.class) final InjectionFuture<EventHandler<FailedRuntime>> failedRuntimeEventHandler) { this.injector = injector; this.failedRuntimeEventHandler = failedRuntimeEventHandler; LOG.log(Level.FINE, "Instantiated 'RunningJobImpl'"); }
Example #20
Source File: REEFErrorHandler.java From reef with Apache License 2.0 | 5 votes |
@Inject REEFErrorHandler( @Parameter(ErrorHandlerRID.class) final String errorHandlerRID, @Parameter(LaunchID.class) final String launchID, final InjectionFuture<RemoteManager> remoteManager, final ExceptionCodec exceptionCodec) { this.errorHandlerRID = errorHandlerRID; this.remoteManager = remoteManager; this.launchID = launchID; this.exceptionCodec = exceptionCodec; }
Example #21
Source File: TaskRuntime.java From reef with Apache License 2.0 | 5 votes |
@Inject private TaskRuntime( final HeartBeatManager heartBeatManager, final Task task, final TaskStatus currentStatus, @Parameter(TaskConfigurationOptions.CloseHandler.class) final InjectionFuture<EventHandler<CloseEvent>> fCloseHandler, @Parameter(TaskConfigurationOptions.SuspendHandler.class) final InjectionFuture<EventHandler<SuspendEvent>> fSuspendHandler, @Parameter(TaskConfigurationOptions.MessageHandler.class) final InjectionFuture<EventHandler<DriverMessage>> fMessageHandler, @Parameter(TaskConfigurationOptions.Memento.class) final String memento, final TaskLifeCycleHandlers taskLifeCycleHandlers) { this.heartBeatManager = heartBeatManager; this.task = task; this.taskLifeCycleHandlers = taskLifeCycleHandlers; this.memento = null == memento ? Optional.<byte[]>empty() : Optional.of(DatatypeConverter.parseBase64Binary(memento)); this.fCloseHandler = fCloseHandler; this.fSuspendHandler = fSuspendHandler; this.fMessageHandler = fMessageHandler; this.currentStatus = currentStatus; }
Example #22
Source File: TaskRuntime.java From reef with Apache License 2.0 | 5 votes |
@Inject private TaskRuntime( final HeartBeatManager heartBeatManager, final Task task, final TaskStatus currentStatus, @Parameter(TaskConfigurationOptions.CloseHandler.class) final InjectionFuture<EventHandler<CloseEvent>> fCloseHandler, @Parameter(TaskConfigurationOptions.SuspendHandler.class) final InjectionFuture<EventHandler<SuspendEvent>> fSuspendHandler, @Parameter(TaskConfigurationOptions.MessageHandler.class) final InjectionFuture<EventHandler<DriverMessage>> fMessageHandler, final TaskLifeCycleHandlers taskLifeCycleHandlers) { this(heartBeatManager, task, currentStatus, fCloseHandler, fSuspendHandler, fMessageHandler, null, taskLifeCycleHandlers); }
Example #23
Source File: ContextManager.java From reef with Apache License 2.0 | 5 votes |
/** * @param launchContext to instantiate the root context. * @param heartBeatManager for status reporting to the Driver. * @param configurationSerializer * @param exceptionCodec */ @Inject ContextManager(final InjectionFuture<RootContextLauncher> launchContext, final HeartBeatManager heartBeatManager, final ConfigurationSerializer configurationSerializer, final ExceptionCodec exceptionCodec) { this.launchContext = launchContext; this.heartBeatManager = heartBeatManager; this.configurationSerializer = configurationSerializer; this.exceptionCodec = exceptionCodec; }
Example #24
Source File: ByteTransportChannelInitializer.java From nemo with Apache License 2.0 | 5 votes |
/** * Creates a netty channel initializer. * * @param blockManagerWorker provides handler for new contexts by remote executors * @param byteTransfer provides channel caching * @param byteTransport provides {@link io.netty.channel.group.ChannelGroup} * @param controlFrameEncoder encodes control frames * @param dataFrameEncoder encodes data frames * @param localExecutorId the id of this executor */ @Inject private ByteTransportChannelInitializer(final InjectionFuture<BlockManagerWorker> blockManagerWorker, final InjectionFuture<ByteTransfer> byteTransfer, final InjectionFuture<ByteTransport> byteTransport, final ControlFrameEncoder controlFrameEncoder, final DataFrameEncoder dataFrameEncoder, @Parameter(JobConf.ExecutorId.class) final String localExecutorId) { this.blockManagerWorker = blockManagerWorker; this.byteTransfer = byteTransfer; this.byteTransport = byteTransport; this.controlFrameEncoder = controlFrameEncoder; this.dataFrameEncoder = dataFrameEncoder; this.localExecutorId = localExecutorId; }
Example #25
Source File: CyclicDependencyClassTwo.java From reef with Apache License 2.0 | 4 votes |
@Inject CyclicDependencyClassTwo(final InjectionFuture<CyclicDependencyClassOne> other) { this.other = other; }
Example #26
Source File: JavaNodeFactory.java From reef with Apache License 2.0 | 4 votes |
private static <T> ConstructorDef<T> createConstructorDef( final boolean isClassInjectionCandidate, final Constructor<T> constructor, final boolean injectable) throws ClassHierarchyException { // We don't support injection of non-static member classes with @Inject // annotations. if (injectable && !isClassInjectionCandidate) { throw new ClassHierarchyException("Cannot @Inject non-static member class unless the enclosing class an @Unit. " + " Nested class is:" + ReflectionUtilities.getFullName(constructor.getDeclaringClass())); } // TODO: When we use paramTypes below, we strip generic parameters. Is that OK? final Class<?>[] paramTypes = constructor.getParameterTypes(); final Type[] genericParamTypes = constructor.getGenericParameterTypes(); final Annotation[][] paramAnnotations = constructor.getParameterAnnotations(); if (paramTypes.length != paramAnnotations.length) { throw new IllegalStateException("The paramTypes.length is " + paramTypes.length + ", and paramAnnotations.length is " + paramAnnotations.length + ". These values should be equal." ); } final ConstructorArg[] args = new ConstructorArg[genericParamTypes.length]; for (int i = 0; i < genericParamTypes.length; i++) { // If this parameter is an injection future, unwrap the target class, // and remember by setting isFuture to true. final Type type; final boolean isFuture; if (InjectionFuture.class.isAssignableFrom(paramTypes[i])) { type = ReflectionUtilities.getInterfaceTarget(InjectionFuture.class, genericParamTypes[i]); isFuture = true; } else { type = paramTypes[i]; isFuture = false; } // Make node of the named parameter annotation (if any). Parameter named = null; for (int j = 0; j < paramAnnotations[i].length; j++) { final Annotation annotation = paramAnnotations[i][j]; if (annotation instanceof Parameter) { if (!isClassInjectionCandidate || !injectable) { throw new ClassHierarchyException(constructor + " is not injectable, but it has an @Parameter annotation."); } named = (Parameter) annotation; } } args[i] = new ConstructorArgImpl( ReflectionUtilities.getFullName(type), named == null ? null : ReflectionUtilities.getFullName(named.value()), isFuture); } return new ConstructorDefImpl<T>( ReflectionUtilities.getFullName(constructor.getDeclaringClass()), args, injectable); }
Example #27
Source File: MockRuntimeDriver.java From reef with Apache License 2.0 | 4 votes |
@Inject MockRuntimeDriver( final InjectionFuture<MockClock> clock, final MockTaskReturnValueProvider taskReturnValueProvider, @Parameter(DriverStartHandler.class) final Set<EventHandler<StartTime>> driverStartHandlers, @Parameter(Clock.StopHandler.class) final Set<EventHandler<StopTime>> driverStopHandlers, @Parameter(EvaluatorAllocatedHandlers.class) final Set<EventHandler<AllocatedEvaluator>> allocatedEvaluatorHandlers, @Parameter(EvaluatorCompletedHandlers.class) final Set<EventHandler<CompletedEvaluator>> completedEvaluatorHandlers, @Parameter(EvaluatorFailedHandlers.class) final Set<EventHandler<FailedEvaluator>> failedEvaluatorHandlers, @Parameter(TaskRunningHandlers.class) final Set<EventHandler<TaskRunningHandlers>> taskRunningHandlers, @Parameter(TaskFailedHandlers.class) final Set<EventHandler<FailedTask>> taskFailedHandlers, @Parameter(TaskMessageHandlers.class) final Set<EventHandler<TaskMessage>> taskMessageHandlers, @Parameter(TaskCompletedHandlers.class) final Set<EventHandler<CompletedTask>> taskCompletedHandlers, @Parameter(TaskSuspendedHandlers.class) final Set<EventHandler<SuspendedTask>> taskSuspendedHandlers, @Parameter(ContextActiveHandlers.class) final Set<EventHandler<ActiveContext>> contextActiveHandlers, @Parameter(ContextClosedHandlers.class) final Set<EventHandler<CloseContext>> contextClosedHandlers, @Parameter(ContextMessageHandlers.class) final Set<EventHandler<ContextMessage>> contextMessageHandlers, @Parameter(ContextFailedHandlers.class) final Set<EventHandler<FailedContext>> contextFailedHandlers, @Parameter(DriverRestartHandler.class) final Set<EventHandler<DriverRestarted>> driverRestartHandlers, @Parameter(DriverRestartTaskRunningHandlers.class) final Set<EventHandler<RunningTask>> driverRestartRunningTaskHandlers, @Parameter(DriverRestartContextActiveHandlers.class) final Set<EventHandler<ActiveContext>> driverRestartActiveContextHandlers, @Parameter(DriverRestartCompletedHandlers.class) final Set<EventHandler<DriverRestartCompleted>> driverRestartCompletedHandlers, @Parameter(DriverRestartFailedEvaluatorHandlers.class) final Set<EventHandler<FailedEvaluator>> driverRestartFailedEvaluatorHandlers){ this.clock = clock; this.taskReturnValueProvider = taskReturnValueProvider; this.driverStartHandlers = driverStartHandlers; this.driverStopHandlers = driverStopHandlers; this.allocatedEvaluatorHandlers = allocatedEvaluatorHandlers; this.completedEvaluatorHandlers = completedEvaluatorHandlers; this.failedEvaluatorHandlers = failedEvaluatorHandlers; this.taskRunningHandlers = taskRunningHandlers; this.taskFailedHandlers = taskFailedHandlers; this.taskMessageHandlers = taskMessageHandlers; this.taskCompletedHandlers = taskCompletedHandlers; this.taskSuspendedHandlers = taskSuspendedHandlers; this.contextActiveHandlers = contextActiveHandlers; this.contextClosedHandlers = contextClosedHandlers; this.contextMessageHandlers = contextMessageHandlers; this.contextFailedHandlers = contextFailedHandlers; this.driverRestartHandlers = driverRestartHandlers; this.driverRestartRunningTaskHandlers = driverRestartRunningTaskHandlers; this.driverRestartActiveContextHandlers = driverRestartActiveContextHandlers; this.driverRestartCompletedHandlers = driverRestartCompletedHandlers; this.driverRestartFailedEvaluatorHandlers = driverRestartFailedEvaluatorHandlers; }
Example #28
Source File: MockClock.java From reef with Apache License 2.0 | 4 votes |
@Inject MockClock(final InjectionFuture<MockRuntime> runtime) { this.runtime = runtime; }
Example #29
Source File: WakeProfiler.java From reef with Apache License 2.0 | 4 votes |
@SuppressWarnings("unchecked") private <T> Vertex<T> getFuture(final InjectionFuture<T> future) { return getVertex((T) futures.get(future)); }
Example #30
Source File: YARNResourceReleaseHandler.java From reef with Apache License 2.0 | 4 votes |
@Inject YARNResourceReleaseHandler(final InjectionFuture<YarnContainerManager> yarnContainerManager) { this.yarnContainerManager = yarnContainerManager; LOG.log(Level.FINE, "Instantiated 'YARNResourceReleaseHandler'"); }