Пример #1
0
 /// <exception cref="System.IO.IOException"/>
 public override JobStatus SubmitJob(JobID jobid, string jobSubmitDir, Credentials
                                     credentials)
 {
     LocalJobRunner.Job job = new LocalJobRunner.Job(this, JobID.Downgrade(jobid), jobSubmitDir
                                                     );
     job.job.SetCredentials(credentials);
     return(job.status);
 }
Пример #2
0
 /// <summary>
 /// Construct a
 /// <see cref="JobProfile"/>
 /// the userid, jobid,
 /// job config-file, job-details url and job name.
 /// </summary>
 /// <param name="user">userid of the person who submitted the job.</param>
 /// <param name="jobid">id of the job.</param>
 /// <param name="jobFile">job configuration file.</param>
 /// <param name="url">link to the web-ui for details of the job.</param>
 /// <param name="name">user-specified job name.</param>
 /// <param name="queueName">name of the queue to which the job is submitted</param>
 public JobProfile(string user, JobID jobid, string jobFile, string url, string name
                   , string queueName)
 {
     this.user      = user;
     this.jobid     = JobID.Downgrade(jobid);
     this.jobFile   = jobFile;
     this.url       = url;
     this.name      = name;
     this.queueName = queueName;
 }
Пример #3
0
 public override JobStatus GetJobStatus(JobID id)
 {
     LocalJobRunner.Job job = jobs[JobID.Downgrade(id)];
     if (job != null)
     {
         return(job.status);
     }
     else
     {
         return(null);
     }
 }
Пример #4
0
 /// <summary>Downgrade a new TaskID to an old one</summary>
 /// <param name="old">a new or old TaskID</param>
 /// <returns>either old or a new TaskID build to match old</returns>
 public static Org.Apache.Hadoop.Mapred.TaskID Downgrade(Org.Apache.Hadoop.Mapreduce.TaskID
                                                         old)
 {
     if (old is Org.Apache.Hadoop.Mapred.TaskID)
     {
         return((Org.Apache.Hadoop.Mapred.TaskID)old);
     }
     else
     {
         return(new Org.Apache.Hadoop.Mapred.TaskID(JobID.Downgrade(old.GetJobID()), old.GetTaskType
                                                        (), old.GetId()));
     }
 }
Пример #5
0
 public override Counters GetJobCounters(JobID id)
 {
     LocalJobRunner.Job job = jobs[JobID.Downgrade(id)];
     return(new Counters(job.GetCurrentCounters()));
 }
Пример #6
0
 public override void KillJob(JobID id)
 {
     jobs[JobID.Downgrade(id)].killed = true;
     jobs[JobID.Downgrade(id)].Interrupt();
 }
Пример #7
0
 /// <returns>The jobid of the Job</returns>
 public override JobID GetJobID()
 {
     return(JobID.Downgrade(base.GetJobID()));
 }
Пример #8
0
 public static Org.Apache.Hadoop.Mapred.JobStatus Downgrade(Org.Apache.Hadoop.Mapreduce.JobStatus
                                                            stat)
 {
     Org.Apache.Hadoop.Mapred.JobStatus old = new Org.Apache.Hadoop.Mapred.JobStatus(JobID
                                                                                     .Downgrade(stat.GetJobID()), stat.GetSetupProgress(), stat.GetMapProgress(), stat
                                                                                     .GetReduceProgress(), stat.GetCleanupProgress(), stat.GetState().GetValue(), JobPriority
                                                                                     .ValueOf(stat.GetPriority().ToString()), stat.GetUsername(), stat.GetJobName(),
                                                                                     stat.GetQueue(), stat.GetJobFile(), stat.GetTrackingUrl(), stat.IsUber());
     old.SetStartTime(stat.GetStartTime());
     old.SetFinishTime(stat.GetFinishTime());
     old.SetSchedulingInfo(stat.GetSchedulingInfo());
     old.SetHistoryFile(stat.GetHistoryFile());
     return(old);
 }