title: Old API to New API
body: <p><a href="https://stackoverflow.com/questions/12577128/how-to-access-mapper-counter-value-in-a-reducer/12579138#comment16954278_12579138">My Original Question</a></p>
  
  <p>since only feasible ans to that question is found in  <a href="https://stackoverflow.com/questions/5450290/accessing-a-mappers-counter-from-a-reducer?rq=1">This Question </a>
  And the answer is in old API . So that force me to put <strong>a stupid question</strong> of translating these line to <strong>New API</strong> : </p>
  
  <pre><code>private long mapperCounter;
  
       @Override
       public void configure(JobConf conf) {
                 JobClient client = new JobClient(conf);
                 RunningJob parentJob = 
                 client.getJob(JobID.forName( conf.get("mapred.job.id") ));
                 mapperCounter = parentJob.getCounters().getCounter(MAP_COUNTER_NAME);
        }
  </code></pre>
  
  <p>Note : I want this code in reducer so inherited  functions available are :</p>
  
  <pre><code>            @Override
      protected void setup(Context context) throws IOException,
              InterruptedException {
  
  
      }
  
  
  
      @Override
      protected void cleanup(Context context) throws IOException,
              InterruptedException {
  
      }
  
  
  
      @Override
      public void run(Context context) throws IOException,
              InterruptedException {
          Job job=new Job(context.getConfiguration());
  
  
      }
  
  
  
      @Override
      public void reduce(ImmutableBytesWritable key,Iterable&lt;ImmutableBytesWritable&gt; result,Context context )
      {
  
      }
  </code></pre>
  
  <p>Thanks :)  :) </p>