private String getMetricsLink(String taskDetailsJsp, boolean isMapper) {
		Document mapDetails = HtmlFetcher.getHtml(taskDetailsJsp);
		Element tr = null;
		
		if(useHistory) {
			tr = mapDetails.getElementsByTag("tbody").first().child(1);
			
		}
		else {
			for(Element elem : mapDetails.getElementsByTag("tbody").first().children()) {
				if(elem.child(2).text().equals("SUCCEEDED")) {
					tr = elem;
					break;
				}
			}		
		}	
		
		if(isMapper) {
			String finishTime;
			if(useHistory) 
				finishTime = tr.child(2).text();
			else
				finishTime = tr.child(5).text();
			int mapperTimeCostSec = stringToTime(finishTime.split("\\(")[1].replace(')', ' ').trim());
			MapperTime time = new MapperTime();
			time.setMapperTimeCostSec(mapperTimeCostSec);
			
			mapperTimeList.add(time);
		}
		else {
			String shuffleTimeStr;
			String sortTimeStr;
			String finishTimeStr;
			
			if(useHistory) {
				shuffleTimeStr = tr.child(2).text().trim();
				sortTimeStr = tr.child(3).text().trim();
				finishTimeStr = tr.child(4).text().trim();
			}
			else {
				shuffleTimeStr = tr.child(5).text().trim();
				sortTimeStr = tr.child(6).text().trim();
				finishTimeStr = tr.child(7).text().trim();
			}
			
			ReducerTime time = new ReducerTime();
			int reducerShuffleTimeCostSec = stringToTime(shuffleTimeStr.split("\\(")[1].replace(')', ' ').trim());
			int reducerSortTimeCostSec = stringToTime(sortTimeStr.split("\\(")[1].replace(')', ' ').trim());
			int reducerTimeCostSec = stringToTime(finishTimeStr.split("\\(")[1].replace(')', ' ').trim());
			int reducerReduceTimeCostSec = reducerTimeCostSec - reducerShuffleTimeCostSec - reducerSortTimeCostSec;
			if(reducerReduceTimeCostSec < 0)
				reducerReduceTimeCostSec = 0;
			
			time.setReducerShuffleTimeCostSec(reducerShuffleTimeCostSec);
			time.setReducerSortTimeCostSec(reducerSortTimeCostSec);
			time.setReducerReduceTimeCostSec(reducerReduceTimeCostSec);
			time.setReducerTimeCostSec(reducerTimeCostSec);
			
			reducerTimeList.add(time);
		}
		
		
		String metricsLink = tr.child(0).child(0).absUrl("href") + "&text=true";	

		return metricsLink;
	}