Esempio n. 1
0
 /**
  * Load the task profile counters from the XML element to the profile
  *
  * @param taskProf the task profile
  * @param task the task XML element
  */
 private void loadTaskProfileCounters(MRTaskProfile taskProf, Element task) {
   Element counters = (Element) task.getElementsByTagName(COUNTERS).item(0);
   NodeList counterList = counters.getElementsByTagName(COUNTER);
   for (int j = 0; j < counterList.getLength(); ++j) {
     Element counter = (Element) counterList.item(j);
     taskProf.addCounter(
         MRCounter.valueOf(counter.getAttribute(KEY)),
         Long.parseLong(counter.getAttribute(VALUE)));
   }
 }