Пример #1
0
 /// <exception cref="System.IO.IOException"/>
 public virtual void ReadFields(DataInput @in)
 {
     lock (this)
     {
         this.jobid = new JobID();
         this.jobid.ReadFields(@in);
         this.setupProgress   = @in.ReadFloat();
         this.mapProgress     = @in.ReadFloat();
         this.reduceProgress  = @in.ReadFloat();
         this.cleanupProgress = @in.ReadFloat();
         this.runState        = WritableUtils.ReadEnum <JobStatus.State>(@in);
         this.startTime       = @in.ReadLong();
         this.user            = StringInterner.WeakIntern(Text.ReadString(@in));
         this.priority        = WritableUtils.ReadEnum <JobPriority>(@in);
         this.schedulingInfo  = StringInterner.WeakIntern(Text.ReadString(@in));
         this.finishTime      = @in.ReadLong();
         this.isRetired       = @in.ReadBoolean();
         this.historyFile     = StringInterner.WeakIntern(Text.ReadString(@in));
         this.jobName         = StringInterner.WeakIntern(Text.ReadString(@in));
         this.trackingUrl     = StringInterner.WeakIntern(Text.ReadString(@in));
         this.jobFile         = StringInterner.WeakIntern(Text.ReadString(@in));
         this.isUber          = @in.ReadBoolean();
         // De-serialize the job's ACLs
         int numACLs = @in.ReadInt();
         for (int i = 0; i < numACLs; i++)
         {
             JobACL            aclType = WritableUtils.ReadEnum <JobACL>(@in);
             AccessControlList acl     = new AccessControlList(" ");
             acl.ReadFields(@in);
             this.jobACLs[aclType] = acl;
         }
     }
 }
Пример #2
0
 /// <summary>Change the current run state of the job.</summary>
 protected internal virtual void SetState(JobStatus.State state)
 {
     lock (this)
     {
         this.runState = state;
     }
 }
Пример #3
0
 /// <summary>Create a job status object for a given jobid.</summary>
 /// <param name="jobid">The jobid of the job</param>
 /// <param name="setupProgress">The progress made on the setup</param>
 /// <param name="mapProgress">The progress made on the maps</param>
 /// <param name="reduceProgress">The progress made on the reduces</param>
 /// <param name="cleanupProgress">The progress made on the cleanup</param>
 /// <param name="runState">The current state of the job</param>
 /// <param name="jp">Priority of the job.</param>
 /// <param name="user">userid of the person who submitted the job.</param>
 /// <param name="jobName">user-specified job name.</param>
 /// <param name="queue">queue name</param>
 /// <param name="jobFile">job configuration file.</param>
 /// <param name="trackingUrl">link to the web-ui for details of the job.</param>
 public JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress
                  , float cleanupProgress, JobStatus.State runState, JobPriority jp, string user,
                  string jobName, string queue, string jobFile, string trackingUrl)
     : this(jobid, setupProgress, mapProgress, reduceProgress, cleanupProgress, runState
            , jp, user, jobName, queue, jobFile, trackingUrl, false)
 {
 }
Пример #4
0
 /// <summary>Create a job status object for a given jobid.</summary>
 /// <param name="jobid">The jobid of the job</param>
 /// <param name="setupProgress">The progress made on the setup</param>
 /// <param name="mapProgress">The progress made on the maps</param>
 /// <param name="reduceProgress">The progress made on the reduces</param>
 /// <param name="cleanupProgress">The progress made on the cleanup</param>
 /// <param name="runState">The current state of the job</param>
 /// <param name="jp">Priority of the job.</param>
 /// <param name="user">userid of the person who submitted the job.</param>
 /// <param name="jobName">user-specified job name.</param>
 /// <param name="queue">queue name</param>
 /// <param name="jobFile">job configuration file.</param>
 /// <param name="trackingUrl">link to the web-ui for details of the job.</param>
 /// <param name="isUber">Whether job running in uber mode</param>
 public JobStatus(JobID jobid, float setupProgress, float mapProgress, float reduceProgress
                  , float cleanupProgress, JobStatus.State runState, JobPriority jp, string user,
                  string jobName, string queue, string jobFile, string trackingUrl, bool isUber)
 {
     this.jobid           = jobid;
     this.setupProgress   = setupProgress;
     this.mapProgress     = mapProgress;
     this.reduceProgress  = reduceProgress;
     this.cleanupProgress = cleanupProgress;
     this.runState        = runState;
     this.user            = user;
     this.queue           = queue;
     if (jp == null)
     {
         throw new ArgumentException("Job Priority cannot be null.");
     }
     priority         = jp;
     this.jobName     = jobName;
     this.jobFile     = jobFile;
     this.trackingUrl = trackingUrl;
     this.isUber      = isUber;
 }
Пример #5
0
 /// <summary>For aborting an unsuccessful job's output.</summary>
 /// <remarks>
 /// For aborting an unsuccessful job's output. Note that this is invoked for
 /// jobs with final runstate as
 /// <see cref="State.Failed"/>
 /// or
 /// <see cref="State.Killed"/>
 /// .  This is called from the application
 /// master process for the entire job. This may be called multiple times.
 /// </remarks>
 /// <param name="jobContext">Context of the job whose output is being written.</param>
 /// <param name="state">final runstate of the job</param>
 /// <exception cref="System.IO.IOException"/>
 public virtual void AbortJob(JobContext jobContext, JobStatus.State state)
 {
     CleanupJob(jobContext);
 }