Posts

Showing posts with the label counters

Retrieving Hadoop Counters in Map/Reduce Tasks

Hadoop uses Counters to gather metrics/statistics which can later be analyzed for performance tuning or to find bugs in the MapReduce programs. There are some predefined Counters and Custom counters can also be defined.  JobCounter  and  TaskCounter  contain the predefined Counters in Hadoop. There are lot of  tutorials  on incrementing the Counters from the Map and Reduce tasks. But, how to fetch the current value of the Counter from with the Map and Reduce tasks. Counters can be incremented using the  Reporter  for the Old MapReduce API or by using the Context  using the New MapReduce API. These counters are sent to the TaskTracker and the TaskTracker will send to the JobTracker and the JobTracker will consolidate the Counters to produce a holistic view for the complete Job. The consolidated Counters are not relayed back to the Map and the Reduce tasks by the JobTracker. So, the Map and Reduce tasks have to contact the JobTracker to ...

Limiting the usage Counters in Hadoop

Besides the  JobCounter  and the  TaskCounter  counters which Hadoop framework maintains, it's also possible to define  custom counters  for application level statistics. Counters can be incremented using the  Reporter  for the Old MapReduce API or by using the Context  using the New MapReduce API. These counters are sent to the TaskTracker and the TaskTracker will send to the JobTracker and the JobTracker will consolidate the Counters to produce a holistic view for the complete Job. There is a chance that a rogue Job creates millions of counters and since these counters are stored in the JobTracker, there is a better chance that JobTracker will go OOM. To avoid such a scenario the number of counters that can be created per Job are limited by the Hadoop framework. The following code is in the  Counters.java . Note that this code is in the 20.203, 20.204 and 20.205 (now called 1.0) releases. Also note that some of the parameters ...

Big Data Trendz