Skip to content

Commit

Permalink
Fix Checkstyle.
Browse files Browse the repository at this point in the history
Change-Id: Ibaa0d6891658e1f54da883f9cc6b91eaa601c0ed
  • Loading branch information
ayushtkn committed Jun 21, 2023
1 parent c539e82 commit daaedd2
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,19 +465,20 @@ public TaskReport getReport() {

@Override
public TezCounters getCounters() {
TezCounters counters = null;
TezCounters tezCounters = null;
if (getVertex().isSpeculationEnabled()) {
counters = new TezCounters();
counters.incrAllCounters(this.counters);
tezCounters = new TezCounters();
tezCounters.incrAllCounters(this.counters);
}
readLock.lock();
try {
TaskAttempt bestAttempt = selectBestAttempt();
if (bestAttempt != null && counters != null) {
counters.incrAllCounters(bestAttempt.getCounters());
return counters;
if (bestAttempt != null && tezCounters != null) {
tezCounters.incrAllCounters(bestAttempt.getCounters());
return tezCounters;
}
return (bestAttempt != null) ? bestAttempt.getCounters() : TaskAttemptImpl.EMPTY_COUNTERS;
return (bestAttempt !=
null) ? bestAttempt.getCounters() : TaskAttemptImpl.EMPTY_COUNTERS;
} finally {
readLock.unlock();
}
Expand Down

0 comments on commit daaedd2

Please sign in to comment.