hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aajis...@apache.org
Subject hadoop git commit: HADOOP-12822. Change "Metrics intern cache overflow" log level from WARN to INFO. Contributed by Andras Bokor.
Date Thu, 14 Apr 2016 02:04:54 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 df78ea84d -> 284718dec


HADOOP-12822. Change "Metrics intern cache overflow" log level from WARN to INFO. Contributed
by Andras Bokor.

(cherry picked from commit 27b131e79c5fa99de3ed4fb529d854dd5da55bde)
(cherry picked from commit 03bf09865f2cf7fe503e90bdeed1ccff1097eb89)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/284718de
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/284718de
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/284718de

Branch: refs/heads/branch-2.8
Commit: 284718deccab652168e5fb8d21e830994944ea9c
Parents: df78ea8
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Thu Apr 14 10:55:51 2016 +0900
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Thu Apr 14 10:58:05 2016 +0900

----------------------------------------------------------------------
 .../org/apache/hadoop/metrics2/lib/Interns.java     | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/284718de/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/Interns.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/Interns.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/Interns.java
index 7ad6660..8e28367 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/Interns.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/Interns.java
@@ -18,15 +18,15 @@
 
 package org.apache.hadoop.metrics2.lib;
 
-import java.util.Map;
-import java.util.LinkedHashMap;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.classification.InterfaceStability;
 import org.apache.hadoop.metrics2.MetricsInfo;
 import org.apache.hadoop.metrics2.MetricsTag;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 /**
  * Helpers to create interned metrics info
@@ -34,7 +34,7 @@ import org.apache.hadoop.metrics2.MetricsTag;
 @InterfaceAudience.Public
 @InterfaceStability.Evolving
 public class Interns {
-  private static final Log LOG = LogFactory.getLog(Interns.class);
+  private static final Logger LOG = LoggerFactory.getLogger(Interns.class);
 
   // A simple intern cache with two keys
   // (to avoid creating new (combined) key objects for lookup)
@@ -47,7 +47,7 @@ public class Interns {
       protected boolean removeEldestEntry(Map.Entry<K1, Map<K2, V>> e) {
         boolean overflow = expireKey1At(size());
         if (overflow && !gotOverflow) {
-          LOG.warn("Metrics intern cache overflow at "+ size() +" for "+ e);
+          LOG.info("Metrics intern cache overflow at {} for {}", size(), e);
           gotOverflow = true;
         }
         return overflow;
@@ -67,7 +67,7 @@ public class Interns {
           @Override protected boolean removeEldestEntry(Map.Entry<K2, V> e) {
             boolean overflow = expireKey2At(size());
             if (overflow && !gotOverflow) {
-              LOG.warn("Metrics intern cache overflow at "+ size() +" for "+ e);
+              LOG.info("Metrics intern cache overflow at {} for {}", size(), e);
               gotOverflow = true;
             }
             return overflow;


Mime
View raw message