@Inject LocalDriverConfigurationProviderImpl(@Parameter(MaxNumberOfEvaluators.class) final int maxEvaluators, @Parameter(JVMHeapSlack.class) final double jvmHeapSlack, @Parameter(RackNames.class) final Set<String> rackNames) { this.maxEvaluators = maxEvaluators; this.jvmHeapSlack = jvmHeapSlack; this.rackNames = rackNames; }
@Inject SingleDataCenterEvaluatorToPartitionStrategy( @Parameter(JobConfExternalConstructor.InputFormatClass.class) final String inputFormatClassName, @Parameter(DistributedDataSetPartitionSerializer.DistributedDataSetPartitions.class) final Set<String> serializedDataPartitions) { super(inputFormatClassName, serializedDataPartitions); }
@Inject MultiDataCenterEvaluatorToPartitionStrategy( @Parameter(JobConfExternalConstructor.InputFormatClass.class) final String inputFormatClassName, @Parameter(DistributedDataSetPartitionSerializer.DistributedDataSetPartitions.class) final Set<String> serializedDataPartitions) { super(inputFormatClassName, serializedDataPartitions); }
@Inject public InputFormatLoadingService( final EvaluatorToPartitionStrategy<InputSplit> evaluatorToPartitionStrategy, @Parameter(DataLoadingRequestBuilder.LoadDataIntoMemory.class) final boolean inMemory, @Parameter(JobConfExternalConstructor.InputFormatClass.class) final String inputFormatClass) { this.inMemory = inMemory; this.inputFormatClass = inputFormatClass; this.evaluatorToPartitionStrategy = evaluatorToPartitionStrategy; }
@Inject ContextLifeCycle(@Parameter(ContextIdentifier.class) final String identifier, @Parameter(ContextMessageHandlers.class) final Set<EventHandler<byte[]>> contextMessageHandlers, @Parameter(ContextStartHandlers.class) final Set<EventHandler<ContextStart>> contextStartHandlers, @Parameter(ContextStopHandlers.class) final Set<EventHandler<ContextStop>> contextStopHandlers, @Parameter(ContextMessageSources.class) final Set<ContextMessageSource> contextMessageSources) { this.identifier = identifier; this.contextStartHandlers = contextStartHandlers; this.contextStopHandlers = contextStopHandlers; this.contextMessageSources = contextMessageSources; this.contextMessageHandler = new BroadCastEventHandler<>(contextMessageHandlers); }
@Inject public ClientConnection( @Parameter(JobIdentifier.class) final String jobIdentifier, final JobStatusHandler jobStatusHandler) { this.jobIdentifier = jobIdentifier; this.jobStatusHandler = jobStatusHandler; }
@Inject private LocalMessageEnvironment(@Parameter(MessageParameters.SenderId.class) final String currentNodeId, final LocalMessageDispatcher dispatcher) { this.currentNodeId = currentNodeId; this.dispatcher = dispatcher; }
@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'"); }
/** * @param evaluatorControlHandler used to send the actual evaluator control messages. * @param evaluatorId the ID of the evaluator this ContextControlHandler communicates with. */ @Inject ContextControlHandler(final EvaluatorControlHandler evaluatorControlHandler, @Parameter(EvaluatorManager.EvaluatorIdentifier.class) final String evaluatorId) { this.evaluatorControlHandler = evaluatorControlHandler; this.evaluatorId = evaluatorId; LOG.log(Level.FINE, "Instantiated 'ContextControlHandler'"); }
/** * Constructor - instantiated via TANG. * * @param outputPath path of the output directory on HDFS to write outputs. */ @Inject private TaskOutputStreamProviderHDFS( @Parameter(TaskOutputService.OutputPath.class) final String outputPath) throws IOException { this.outputPath = outputPath; final JobConf jobConf = new JobConf(); fs = FileSystem.get(jobConf); }
@Inject DFSEvaluatorPreserver(@Parameter(FailDriverOnEvaluatorLogErrors.class) final boolean failDriverOnEvaluatorLogErrors) { this(failDriverOnEvaluatorLogErrors, "/ReefApplications/" + getEvaluatorChangeLogFolderLocation()); }
@Inject public InputSplitExternalConstructor( final JobConf jobConf, @Parameter(SerializedInputSplit.class) final String serializedInputSplit) { this.inputSplit = WritableSerializer.deserialize(serializedInputSplit, jobConf); }
@Inject private RemoteClientJobStatusHandler( final RemoteManager remoteManager, @Parameter(ClientRemoteIdentifier.class) final String clientRID) { if (clientRID.equals(ClientRemoteIdentifier.NONE)) { LOG.log(Level.FINE, "Instantiated 'RemoteClientJobStatusHandler' without an actual connection to the client."); this.jobStatusHandler = new LoggingJobStatusHandler(); } else { this.jobStatusHandler = remoteManager.getHandler(clientRID, ReefServiceProtos.JobStatusProto.class); LOG.log(Level.FINE, "Instantiated 'RemoteClientJobStatusHandler' for {0}", clientRID); } }
@Inject ClientWireUp(final RemoteManager remoteManager, @Parameter(ClientPresent.class) final 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 private FileEventStream(@Parameter(Path.class) final String path) { this.dateFormat = new SimpleDateFormat("[yyyy.MM.dd HH:mm:ss.SSSS]"); this.singleThreadedExecutor = new ThreadPoolStage<>(new RunnableExecutingHandler(), 1); try { final OutputStreamWriter writer = new OutputStreamWriter( new FileOutputStream(createFileWithPath(path)), Charset.forName("UTF-8")); this.printWriter = new PrintWriter(writer); } catch (final IOException e) { throw new RuntimeException(e); } }
@Inject RootContextLauncher(@Parameter(RootContextConfiguration.class) final String rootContextConfiguration, final Injector injector, @Parameter(RootServiceConfiguration.class) final 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 Injector injector, @Parameter(RootContextConfiguration.class) final String rootContextConfiguration, @Parameter(InitialTaskConfiguration.class) final 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 private RuntimesHost( final Injector injector, @Parameter(SerializedRuntimeDefinition.class) final String serializedRuntimeDefinition) { this.originalInjector = injector; try { this.runtimeDefinition = new MultiRuntimeDefinitionSerializer().fromString(serializedRuntimeDefinition); } catch (final IOException e) { throw new RuntimeException("Unable to read runtime configuration.", e); } this.defaultRuntimeName = this.runtimeDefinition.getDefaultRuntimeName().toString(); }
@Inject private ClientRPC(final TransportFactory transportFactory, final LocalAddressProvider localAddressProvider, @Parameter(JobConf.ClientSideRPCServerHost.class) final String clientHost, @Parameter(JobConf.ClientSideRPCServerPort.class) final int clientPort) throws IOException { transport = transportFactory.newInstance(localAddressProvider.getLocalAddress(), 0, new SyncStage<>(new RPCEventHandler()), null, RETRY_COUNT, RETRY_TIMEOUT); final SocketAddress clientAddress = new InetSocketAddress(clientHost, clientPort); link = transport.open(clientAddress, ENCODER, LINK_LISTENER); }