private AtomicBoolean localitySet = new AtomicBoolean(false);
public void setLocalityCounter(DAGCounter localityCounter) {
if (!localitySet.get()) {
localitySet.set(true);
if (counters == null) {
counters = new TezCounters();
}
if (localityCounter != null) {
counters.findCounter(localityCounter).increment(1);
// TODO Maybe validate that the correct value is being set.
}