public Collection<Pair<String, String>> findCounterValues() {
final Collection<Pair<String, String>> counters = new LinkedList<Pair<String, String>>();
final Iterable<String> groupNames = getGroupNames();
if (mapred != null) {
for (String groupName : groupNames) {
final Group group = mapred.getGroup(groupName);
collectCounters(counters, groupName, group.iterator());
}
} else {
for (String groupName : groupNames) {
final CounterGroup group = mapreduce.getGroup(groupName);
collectCounters(counters, groupName, group.iterator());
}
}
return counters;
}