hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [4/4] hbase git commit: HBASE-18212 reduce log level for unbuffer warning.
Date Tue, 20 Jun 2017 07:55:00 GMT
HBASE-18212 reduce log level for unbuffer warning.

In Standalone mode with local filesystem HBase logs Warning message:Failed to invoke 'unbuffer'
method in class org.apache.hadoop.fs.FSDataInputStream

Signed-off-by: Umesh Agashe <uagashe@cloudera.com>
Signed-off-by: Sean Busbey <busbey@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/4160f727
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4160f727
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4160f727

Branch: refs/heads/branch-1.2
Commit: 4160f7273affcdf3121616e4de54a143d56d7961
Parents: a8874eb
Author: Ashish Singhi <ashishsinghi@apache.org>
Authored: Fri Jun 16 10:43:56 2017 +0530
Committer: Sean Busbey <busbey@apache.org>
Committed: Tue Jun 20 02:50:03 2017 -0500

----------------------------------------------------------------------
 .../hbase/io/FSDataInputStreamWrapper.java      | 27 ++++++++++++--------
 1 file changed, 16 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/4160f727/hbase-server/src/main/java/org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.java
index dc168da..ad749f3 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/FSDataInputStreamWrapper.java
@@ -38,6 +38,7 @@ import com.google.common.annotations.VisibleForTesting;
  */
 public class FSDataInputStreamWrapper {
   private static final Log LOG = LogFactory.getLog(FSDataInputStreamWrapper.class);
+  private static final boolean isLogTraceEnabled = LOG.isTraceEnabled();
 
   private final HFileSystem hfs;
   private final Path path;
@@ -261,10 +262,11 @@ public class FSDataInputStreamWrapper {
             try {
               this.unbuffer = streamClass.getDeclaredMethod("unbuffer");
             } catch (NoSuchMethodException | SecurityException e) {
-              LOG.warn("Failed to find 'unbuffer' method in class " + streamClass
-                  + " . So there may be a TCP socket connection "
-                  + "left open in CLOSE_WAIT state.",
-                e);
+              if (isLogTraceEnabled) {
+                LOG.trace("Failed to find 'unbuffer' method in class " + streamClass
+                    + " . So there may be a TCP socket connection "
+                    + "left open in CLOSE_WAIT state.", e);
+              }
               return;
             }
             this.instanceOfCanUnbuffer = true;
@@ -276,15 +278,18 @@ public class FSDataInputStreamWrapper {
         try {
           this.unbuffer.invoke(wrappedStream);
         } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException
e) {
-          LOG.warn("Failed to invoke 'unbuffer' method in class " + streamClass
-              + " . So there may be a TCP socket connection left open in CLOSE_WAIT state.",
-            e);
+          if (isLogTraceEnabled) {
+            LOG.trace("Failed to invoke 'unbuffer' method in class " + streamClass
+                + " . So there may be a TCP socket connection left open in CLOSE_WAIT state.",
e);
+          }
         }
       } else {
-        LOG.warn("Failed to find 'unbuffer' method in class " + streamClass
-            + " . So there may be a TCP socket connection "
-            + "left open in CLOSE_WAIT state. For more details check "
-            + "https://issues.apache.org/jira/browse/HBASE-9393");
+        if (isLogTraceEnabled) {
+          LOG.trace("Failed to find 'unbuffer' method in class " + streamClass
+              + " . So there may be a TCP socket connection "
+              + "left open in CLOSE_WAIT state. For more details check "
+              + "https://issues.apache.org/jira/browse/HBASE-9393");
+        }
       }
     }
   }


Mime
View raw message