private void ConstructJobReport() { report = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord <JobReport>(); report.SetJobId(jobId); report.SetJobState(JobState.ValueOf(jobInfo.GetJobStatus())); report.SetSubmitTime(jobInfo.GetSubmitTime()); report.SetStartTime(jobInfo.GetLaunchTime()); report.SetFinishTime(jobInfo.GetFinishTime()); report.SetJobName(jobInfo.GetJobname()); report.SetUser(jobInfo.GetUsername()); if (GetTotalMaps() == 0) { report.SetMapProgress(1.0f); } else { report.SetMapProgress((float)GetCompletedMaps() / GetTotalMaps()); } if (GetTotalReduces() == 0) { report.SetReduceProgress(1.0f); } else { report.SetReduceProgress((float)GetCompletedReduces() / GetTotalReduces()); } report.SetJobFile(GetConfFile().ToString()); string historyUrl = "N/A"; try { historyUrl = MRWebAppUtil.GetApplicationWebURLOnJHSWithoutScheme(conf, jobId.GetAppId ()); } catch (UnknownHostException) { } //Ignore. report.SetTrackingUrl(historyUrl); report.SetAMInfos(GetAMInfos()); report.SetIsUber(IsUber()); }
public virtual void TestTaskAttemptUnsuccessfulCompletionWithoutCounters0239() { Path histPath = new Path(GetType().GetClassLoader().GetResource("job_0.23.9-FAILED.jhist" ).GetFile()); JobHistoryParser parser = new JobHistoryParser(FileSystem.GetLocal(new Configuration ()), histPath); JobHistoryParser.JobInfo jobInfo = parser.Parse(); Log.Info(" job info: " + jobInfo.GetJobname() + " " + jobInfo.GetFinishedMaps() + " " + jobInfo.GetTotalMaps() + " " + jobInfo.GetJobId()); }