Exemple #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>
        /// 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
        }