public static org.apache.hadoop.mapreduce.Counters fromYarn( Counters yCntrs) { if (yCntrs == null) { return null; } org.apache.hadoop.mapreduce.Counters counters = new org.apache.hadoop.mapreduce.Counters(); for (CounterGroup yGrp : yCntrs.getAllCounterGroups().values()) { counters.addGroup(yGrp.getName(), yGrp.getDisplayName()); for (Counter yCntr : yGrp.getAllCounters().values()) { org.apache.hadoop.mapreduce.Counter c = counters.findCounter(yGrp.getName(), yCntr.getName()); // if c can be found, or it will be skipped. if (c != null) { c.setValue(yCntr.getValue()); } } } return counters; }
public static org.apache.hadoop.mapreduce.Counters fromYarn( Counters yCntrs) { if (yCntrs == null) { return null; } org.apache.hadoop.mapreduce.Counters counters = new org.apache.hadoop.mapreduce.Counters(); for (CounterGroup yGrp : yCntrs.getAllCounterGroups().values()) { counters.addGroup(yGrp.getName(), yGrp.getDisplayName()); for (Counter yCntr : yGrp.getAllCounters().values()) { org.apache.hadoop.mapreduce.Counter c = counters.findCounter(yGrp.getName(), yCntr.getName()); // if c can be found, or it will be skipped. if (c != null) { c.setValue(yCntr.getValue()); } } } return counters; }
public static org.apache.hadoop.mapreduce.Counters fromYarn( Counters yCntrs) { if (yCntrs == null) { return null; } org.apache.hadoop.mapreduce.Counters counters = new org.apache.hadoop.mapreduce.Counters(); for (CounterGroup yGrp : yCntrs.getAllCounterGroups().values()) { counters.addGroup(yGrp.getName(), yGrp.getDisplayName()); for (Counter yCntr : yGrp.getAllCounters().values()) { org.apache.hadoop.mapreduce.Counter c = counters.findCounter(yGrp.getName(), yCntr.getName()); // if c can be found, or it will be skipped. if (c != null) { c.setValue(yCntr.getValue()); } } } return counters; }
public static org.apache.hadoop.mapreduce.Counters fromYarn( Counters yCntrs) { if (yCntrs == null) { return null; } org.apache.hadoop.mapreduce.Counters counters = new org.apache.hadoop.mapreduce.Counters(); for (CounterGroup yGrp : yCntrs.getAllCounterGroups().values()) { counters.addGroup(yGrp.getName(), yGrp.getDisplayName()); for (Counter yCntr : yGrp.getAllCounters().values()) { org.apache.hadoop.mapreduce.Counter c = counters.findCounter(yGrp.getName(), yCntr.getName()); // if c can be found, or it will be skipped. if (c != null) { c.setValue(yCntr.getValue()); } } } return counters; }