This is an automated email from the ASF dual-hosted git repository.

hexiaoqiao pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 6d6766b  HADOOP-17690. Improve the log for The DecayRpcScheduler. 
Contributed by Bhavik Patel.
6d6766b is described below

commit 6d6766bc22d5343ad8dbbbf1b0f007ced7072c40
Author: hexiaoqiao <hexiaoq...@meituan.com>
AuthorDate: Mon May 10 14:11:36 2021 +0800

    HADOOP-17690. Improve the log for The DecayRpcScheduler. Contributed by 
Bhavik Patel.
---
 .../java/org/apache/hadoop/ipc/DecayRpcScheduler.java | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java
 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java
index 5477c97..e69064d 100644
--- 
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java
+++ 
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/DecayRpcScheduler.java
@@ -628,7 +628,8 @@ public class DecayRpcScheduler implements RpcScheduler,
     List<AtomicLong> costList = callCosts.get(identity);
     long currentCost = costList == null ? 0 : costList.get(0).get();
     int priority = computePriorityLevel(currentCost, identity);
-    LOG.debug("compute priority for {} priority {}", identity, priority);
+    LOG.debug("compute priority for identity: {}={}", identity,
+        priority);
     return priority;
   }
 
@@ -666,7 +667,7 @@ public class DecayRpcScheduler implements RpcScheduler,
   void setPriorityLevel(UserGroupInformation ugi, int priority) {
     String identity = getIdentity(newSchedulable(ugi));
     priority = Math.min(numLevels - 1, priority);
-    LOG.info("Setting priority for user:" + identity + "=" + priority);
+    LOG.info("Setting priority for user: {}={}", identity, priority);
     staticPriorities.put(identity, priority);
   }
 
@@ -735,11 +736,9 @@ public class DecayRpcScheduler implements RpcScheduler,
     responseTimeCountInCurrWindow.getAndIncrement(priorityLevel);
     responseTimeTotalInCurrWindow.getAndAdd(priorityLevel,
         queueTime+processingTime);
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("addResponseTime for call: {}  priority: {} queueTime: {} " +
-          "processingTime: {} ", callName, priorityLevel, queueTime,
-          processingTime);
-    }
+    LOG.debug("addResponseTime for call: {}  priority: {} queueTime: {} " +
+        "processingTime: {} ", callName, priorityLevel, queueTime,
+        processingTime);
   }
 
   // Update the cached average response time at the end of the decay window
@@ -763,10 +762,8 @@ public class DecayRpcScheduler implements RpcScheduler,
         responseTimeAvgInLastWindow.set(i, 0);
       }
       responseTimeCountInLastWindow.set(i, responseTimeCount);
-      if (LOG.isDebugEnabled()) {
-        LOG.debug("updateAverageResponseTime queue: {} Average: {} Count: {}",
-            i, averageResponseTime, responseTimeCount);
-      }
+      LOG.debug("updateAverageResponseTime queue: {} Average: {} Count: {}",
+          i, averageResponseTime, responseTimeCount);
       // Reset for next decay window
       responseTimeTotalInCurrWindow.set(i, 0);
       responseTimeCountInCurrWindow.set(i, 0);

---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to