title: Is there a way to access number of successful map tasks from a reduce task in an MR job?
body: <p>In my Hadoop <em>reducers</em>, I need to know how many successful map tasks were executed in the current job.  I've come up with the following, which as far as I can tell does NOT work.</p>
  
  <pre><code>    Counter totalMapsCounter = 
          context.getCounter(JobInProgress.Counter.TOTAL_LAUNCHED_MAPS);
      Counter failedMapsCounter = 
          context.getCounter(JobInProgress.Counter.NUM_FAILED_MAPS);
      long nSuccessfulMaps = totalMapsCounter.getValue() - 
                             failedMapsCounter.getValue();
  </code></pre>
  
  <p>Alternatively, if there's a good way that I could retrieve (again, from within my <em>reducers</em>) the total number of input splits (not number of files, and not splits for one file, but total splits for the job), that would probably also work.  (Assuming my job completes normally, that should be the same number, right?)</p>