title: Calculate time taken by reducers hadoop
body: <p>I am running a MapReduce job in Hadoop 2.7.3 in a single node cluster. How do I calculate the time taken by the map and reduce tasks of this job?</p>
  
  <p><strong>SOLVED</strong>
  In case it helps anyone who views this question or faces a similar problem.
  Thanks to @Shubham's answer and a little research I did:</p>
  
  <ol>
  <li>Job tracker has been removed in hadoop 2. It has been split into resource manager and application master.</li>
  <li>To access the Resource manager, type in the URL in your browser "<a href="http://localhost:8088" rel="nofollow noreferrer">http://localhost:8088</a>"</li>
  <li>To access the Job History Server (to view statistics about the applications and jobs that have been completed) type in the URL in your browser "<a href="http://localhost:19888" rel="nofollow noreferrer">http://localhost:19888</a>"</li>
  </ol>
  
  <p>You could encounter an error when trying to access the Job History Server. It may show that there is no history for the application. In that case follow these steps:</p>
  
  <ol>
  <li>Change the bashrc file</li>
  </ol>
  
  <p>Steps:</p>
  
  <pre><code>i. In your terminal, type "nano ~/.bashrc"
  ii. Now in this file, where the other hadoop variables are written add the line
      export HADOOP_CONFIG_DIR=/usr/local/hadoop/etc/hadoop
  iii. Exit out of nano and save the file.
  iv. Run the command "source ~/.bashrc"
  </code></pre>
  
  <p>1. To start the job history server</p>
  
  <p>Steps:</p>
  
  <pre><code>i. Run the command in your terminal
  $HADOOP_HOME/sbin/mr-jobhistory-daemon.sh --config $HADOOP_CONFIG_DIR start historyserver
  ii. Then run the command 
      jps
  You should be able to see the "JobHistoryServer" in the list
  iii. Now run the command
  netstat -ntlp | grep 19888
  </code></pre>