0
votes

I have a map/reduce job and I want to track the number of records processed in the map phase of the job. To do that, I am using Custom Counters, and incrementing them by 1, in my map phase. Also, I am monitoring these counters after every 30 seconds.

However, when I am checking the job counters progress using Job Client, I am looking at the number of records processed are not even with each periodic interval. Sometimes, there is no change and sometimes there is.

context.getCounter(ApplicationCounters.TOTAL_NUMRECORDS_PROCESSEDBY_MAP)
            .increment(1);

My hadoop cluster heartbeat interval is 15 seconds. Does not that means, I should get regular consistent updated.

1

1 Answers

0
votes

Be sure that your job has finished, using waitForCompletion is recommended. Querying the counter during runtime can end in strange results.

The counters are globally aggregated by the framework at the end of the job.