Ejemplo n.º 1
0
        public virtual JobTaskAttemptCounterInfo GetJobTaskAttemptIdCounters(HttpServletRequest
                                                                             hsr, string jid, string tid, string attId)
        {
            Init();
            Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job job = AMWebServices.GetJobFromJobIdString
                                                                 (jid, ctx);
            CheckAccess(job, hsr);
            Task        task = AMWebServices.GetTaskFromTaskIdString(tid, job);
            TaskAttempt ta   = AMWebServices.GetTaskAttemptFromTaskAttemptString(attId, task);

            return(new JobTaskAttemptCounterInfo(ta));
        }
Ejemplo n.º 2
0
        public virtual TaskAttemptInfo GetJobTaskAttemptId(HttpServletRequest hsr, string
                                                           jid, string tid, string attId)
        {
            Init();
            Org.Apache.Hadoop.Mapreduce.V2.App.Job.Job job = AMWebServices.GetJobFromJobIdString
                                                                 (jid, ctx);
            CheckAccess(job, hsr);
            Task        task = AMWebServices.GetTaskFromTaskIdString(tid, job);
            TaskAttempt ta   = AMWebServices.GetTaskAttemptFromTaskAttemptString(attId, task);

            if (task.GetType() == TaskType.Reduce)
            {
                return(new ReduceTaskAttemptInfo(ta, task.GetType()));
            }
            else
            {
                return(new TaskAttemptInfo(ta, task.GetType(), false));
            }
        }