Exemple #1
0
        /// <summary>
        /// Diagnose the failures of the selected jobs.
        /// </summary>
        /// <param name="sender">Unused.</param>
        /// <param name="e">Unused.</param>
        private void diagnoseToolStripMenuItem_Click(object sender, EventArgs e)
        {
            IEnumerable <ClusterJobInformation> todo = this.SelectedJobs();
            IEnumerable <DryadLinqJobSummary>   jobs = todo.Select(j => j.DiscoverDryadLinqJob(this.clusterStatus, this.Status)).Where(j => j != null);

            var item = new BackgroundWorkItem <List <DiagnosisLog> >(
                m => ClusterWork.DiagnoseJobs(jobs, this.clusterStatus.Config, m),
                DiagnosisResult.ShowDiagnosisResult,
                "cancel");

            this.Queue(item);
        }
Exemple #2
0
        /// <summary>
        /// User intends to terminate the selected job.
        /// </summary>
        /// <param name="sender">Unused.</param>
        /// <param name="e">Unused.</param>
        private void terminateToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var todo = this.SelectedJobs().ToList();

            if (todo.Count() != 1)
            {
                this.Status("You have to select exactly one job to terminate", StatusKind.Error);
                return;
            }
            IEnumerable <DryadLinqJobSummary> jobs = todo.Select(j => j.DiscoverDryadLinqJob(this.clusterStatus, this.Status)).Where(j => j != null);

            var item = new BackgroundWorkItem <bool>(
                m => ClusterWork.CancelJobs(jobs, this.clusterStatus, m),
                (c, b) => { },
                "cancel");

            this.Queue(item);
        }