From daaedd21a6bceae8333325503fb9ecf4d6da3f6c Mon Sep 17 00:00:00 2001 From: Ayush Saxena Date: Wed, 21 Jun 2023 14:59:06 +0530 Subject: [PATCH] Fix Checkstyle. Change-Id: Ibaa0d6891658e1f54da883f9cc6b91eaa601c0ed --- .../org/apache/tez/dag/app/dag/impl/TaskImpl.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java index c02d9184de..6bcbf01ab4 100644 --- a/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java +++ b/tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java @@ -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(); }