Esempio n. 1
0
        /// <summary>
        /// Runs HelloREEF using the IREEFClient passed into the constructor.
        /// </summary>
        private void Run()
        {
            // The driver configuration contains all the needed bindings.
            var helloDriverConfiguration = DriverConfiguration.ConfigurationModule
                                           .Set(DriverConfiguration.OnEvaluatorAllocated, GenericType <HelloDriver> .Class)
                                           .Set(DriverConfiguration.OnDriverStarted, GenericType <HelloDriver> .Class)
                                           .Set(DriverConfiguration.CustomTraceLevel, Level.Verbose.ToString())
                                           .Build();

            string applicationId = GetApplicationId();

            // The JobSubmission contains the Driver configuration as well as the files needed on the Driver.
            var helloJobRequest = _reefClient.NewJobRequestBuilder()
                                  .AddDriverConfiguration(helloDriverConfiguration)
                                  .AddGlobalAssemblyForType(typeof(HelloDriver))
                                  .AddGlobalAssembliesInDirectoryOfExecutingAssembly()
                                  .SetJobIdentifier(applicationId)
                                  .SetJavaLogLevel(JavaLoggingSetting.Verbose)
                                  .Build();

            IJobSubmissionResult jobSubmissionResult = _reefClient.SubmitAndGetJobStatus(helloJobRequest);

            // Wait for the Driver to complete.
            jobSubmissionResult?.WaitForDriverToFinish();
        }
Esempio n. 2
0
 public JobRequestBuilder NewJobRequestBuilder()
 {
     return(_client.NewJobRequestBuilder());
 }