Пример #1
0
        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());
        }
Пример #2
0
        public virtual void TestFailedJobHistoryWithoutDiagnostics()
        {
            Path histPath = new Path(GetType().GetClassLoader().GetResource("job_1393307629410_0001-1393307687476-user-Sleep+job-1393307723835-0-0-FAILED-default-1393307693920.jhist"
                                                                            ).GetFile());
            FileSystem        lfs   = FileSystem.GetLocal(new Configuration());
            FSDataInputStream fsdis = lfs.Open(histPath);

            try
            {
                JobHistoryParser         parser = new JobHistoryParser(fsdis);
                JobHistoryParser.JobInfo info   = parser.Parse();
                NUnit.Framework.Assert.AreEqual("History parsed jobId incorrectly", info.GetJobId
                                                    (), JobID.ForName("job_1393307629410_0001"));
                NUnit.Framework.Assert.AreEqual("Default diagnostics incorrect ", string.Empty, info
                                                .GetErrorInfo());
            }
            finally
            {
                fsdis.Close();
            }
        }