Example #1
0
        /// <summary>
        /// Create a new job executor object.
        /// </summary>
        public JobExecutor(HpcLinqContext context)
        {
            // use a new job submission object for each query
//            this.errorMsg = "";
            this.m_context     = context;
            this.currentStatus = JobStatus.NotSubmitted;
            if (context.Runtime is HpcQueryRuntime)
            {
                YarnJobSubmission job = new YarnJobSubmission(context);
//                job.LocalJM = false;
                job.Initialize();
                this.executionKind = ExecutionKind.JobScheduler;
                this.jobSubmission = job;
            }
            else
            {
                throw new DryadLinqException(HpcLinqErrorCode.UnsupportedSchedulerType,
                                             String.Format(SR.UnsupportedSchedulerType, context.Runtime));
            }
 /// <summary>
 /// Add a resource to a job.  Check whether there are clashes in resource names.
 /// </summary>
 /// <param name="jobSubmission">JobSubmission object which will hold the resources.</param>
 /// <param name="file">Pathname to file to add as a resource.</param>
 private void AddResource(IHpcLinqJobSubmission jobSubmission, string file)
 {
     // extract basename
     string basename = Path.GetFileName(file);
     this.jobSubmission.AddLocalFile(file);
 }
        /// <summary>
        /// Create a new job executor object.
        /// </summary>
        public JobExecutor(HpcLinqContext context)
        {
            // use a new job submission object for each query
            //            this.errorMsg = "";
            this.m_context = context;
            this.currentStatus = JobStatus.NotSubmitted;
            if (context.Runtime is HpcQueryRuntime)
            {
                YarnJobSubmission job = new YarnJobSubmission(context);
            //                job.LocalJM = false;
                job.Initialize();
                this.executionKind = ExecutionKind.JobScheduler;
                this.jobSubmission = job;
            }
            else
            {
                throw new DryadLinqException(HpcLinqErrorCode.UnsupportedSchedulerType,
                                           String.Format(SR.UnsupportedSchedulerType, context.Runtime));
            }

            #if REMOVE
            case SchedulerKind.LocalJM:
            {
                HpcJobSubmission job = new HpcJobSubmission(runtime);
                job.LocalJM = true;
                job.Initialize();
                this.executionKind = ExecutionKind.JobScheduler;
                this.jobSubmission = job;
                DryadLinq.SchedulerType = SchedulerKind.Hpc;
                break;
            }
            #endif
        }