Beispiel #1
0
 /// <summary>Create an event to record unsuccessful completion (killed/failed) of jobs
 ///     </summary>
 /// <param name="id">Job ID</param>
 /// <param name="finishTime">Finish time of the job</param>
 /// <param name="finishedMaps">Number of finished maps</param>
 /// <param name="finishedReduces">Number of finished reduces</param>
 /// <param name="status">Status of the job</param>
 /// <param name="diagnostics">job runtime diagnostics</param>
 public JobUnsuccessfulCompletionEvent(JobID id, long finishTime, int finishedMaps
                                       , int finishedReduces, string status, IEnumerable <string> diagnostics)
 {
     datum.SetJobid(new Utf8(id.ToString()));
     datum.SetFinishTime(finishTime);
     datum.SetFinishedMaps(finishedMaps);
     datum.SetFinishedReduces(finishedReduces);
     datum.SetJobStatus(new Utf8(status));
     if (diagnostics == null)
     {
         diagnostics = NodiagsList;
     }
     datum.SetDiagnostics(new Utf8(Joiner.On('\n').SkipNulls().Join(diagnostics)));
 }
Beispiel #2
0
        private TestEvents.FakeEvent GetJobKilledEvent()
        {
            TestEvents.FakeEvent      result = new TestEvents.FakeEvent(this, EventType.JobKilled);
            JobUnsuccessfulCompletion datum  = new JobUnsuccessfulCompletion();

            datum.SetFinishedMaps(1);
            datum.SetFinishedReduces(2);
            datum.SetFinishTime(3L);
            datum.SetJobid("ID");
            datum.SetJobStatus("STATUS");
            datum.SetDiagnostics(JobImpl.JobKilledDiag);
            result.SetDatum(datum);
            return(result);
        }