コード例 #1
0
        public virtual void TestNewCounterA()
        {
            Job           job  = CreateJob();
            Configuration conf = job.GetConfiguration();

            conf.SetInt(JobContext.IoSortFactor, 2);
            RemoveWordsFile(inFiles[3], conf);
            RemoveWordsFile(inFiles[4], conf);
            long inputSize = 0;

            inputSize += GetFileSize(inFiles[0]);
            inputSize += GetFileSize(inFiles[1]);
            inputSize += GetFileSize(inFiles[2]);
            FileInputFormat.SetInputPaths(job, InDir);
            FileOutputFormat.SetOutputPath(job, new Path(OutDir, "outputN0"));
            NUnit.Framework.Assert.IsTrue(job.WaitForCompletion(true));
            Counters c1 = Counters.Downgrade(job.GetCounters());

            ValidateCounters(c1, 73728, 15360, 61440);
            ValidateFileCounters(c1, inputSize, 0, 0, 0);
        }
コード例 #2
0
 public virtual Counters GetCounters()
 {
     return(Counters.Downgrade(base.GetTaskCounters()));
 }
コード例 #3
0
 internal static Org.Apache.Hadoop.Mapred.TaskReport Downgrade(Org.Apache.Hadoop.Mapreduce.TaskReport
                                                               report)
 {
     return(new Org.Apache.Hadoop.Mapred.TaskReport(TaskID.Downgrade(report.GetTaskID(
                                                                         )), report.GetProgress(), report.GetState(), report.GetDiagnostics(), report.GetCurrentStatus
                                                        (), report.GetStartTime(), report.GetFinishTime(), Counters.Downgrade(report.GetTaskCounters
                                                                                                                                  ())));
 }