title: Hadoop MapReduce Jobs: Get the counter outside of the native jvm
body: <p>I am very new in Hadoop and Hbase. </p>
  
  <p><strong>And my use case is very simple</strong>: I want to get <code>reduce input groups</code> count for a job in the run time (i.e get the counter being updated from the initiation to the termination of the job ).</p>
  
  <p><strong>What I have searched so far</strong>:  All job related logs are written under directory <code>/var/log/hadoop/userlogs</code> like shown below:</p>
  
  <pre><code>[root@dev1-slave1 userlogs]# pwd
  /var/log/hadoop/userlogs
  [root@dev1-slave1 userlogs]# ll
  total 24
  drwx--x--- 2 mapred mapred 4096 Jan 13 19:59 job_201501121917_0008
  drwx--x--- 2 mapred mapred 4096 Jan 13 11:31 job_201501121917_0009
  drwx--x--- 2 mapred mapred 4096 Jan 13 12:01 job_201501121917_0010
  drwx--x--- 2 mapred mapred 4096 Jan 13 12:13 job_201501121917_0011
  drwx--x--- 2 mapred mapred 4096 Jan 13 12:23 job_201501121917_0012
  drwx--x--- 2 mapred mapred 4096 Jan 13 19:59 job_201501121917_0013
  </code></pre>
  
  <p>Under each <code>job</code>, there are directories such as <code>attempt_201501121917_0013_m_000000_0</code> (mapper log) and <code>attempt_201501121917_0013_r_000000_0</code> (reducer log). </p>
  
  <p>The reducer log directory <code>attempt_201501121917_0013_r_000000_0</code> contains <code>syslog</code> which contains information about job run. But it doesn't show any information about the counter.</p>
  
  <p>From the jobtracker UI of hadoop, I could see the counter <code>reduce input groups</code> being updated until the job is finished but I could not find the same elsewhere.</p>
  
  <p>How can I achieve this? Is there any Java API to get job-wise counters in an another application (NOT in the application which is performing mapreduce tasks) ?</p>
  
  <p>Any other logs or other files which I should look into?</p>
  
  <p>I hope my requirement is clear.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Hadoop version: Hadoop 1.0.3-Intel</p>