hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/3] hbase git commit: HBASE-16220 Demote log level for "HRegionFileSystem - No StoreFiles for" messages to TRACE
Date Wed, 13 Jul 2016 00:31:01 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 a16fb9ee0 -> 364fa3f7f
  refs/heads/branch-1 16be7bba5 -> 7c4c51f2c
  refs/heads/master f292048ff -> 911706a87


HBASE-16220 Demote log level for "HRegionFileSystem - No StoreFiles for" messages to TRACE


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

Branch: refs/heads/master
Commit: 911706a8732262b4ce0e060900b76f84f5fdf11b
Parents: f292048
Author: Andrew Purtell <apurtell@apache.org>
Authored: Tue Jul 12 15:44:06 2016 -0700
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Tue Jul 12 15:44:06 2016 -0700

----------------------------------------------------------------------
 .../hbase/regionserver/HRegionFileSystem.java       | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/911706a8/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
index 74ff546..995b111 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
@@ -199,7 +199,9 @@ public class HRegionFileSystem {
     Path familyDir = getStoreDir(familyName);
     FileStatus[] files = FSUtils.listStatus(this.fs, familyDir);
     if (files == null) {
-      LOG.debug("No StoreFiles for: " + familyDir);
+      if (LOG.isTraceEnabled()) {
+        LOG.trace("No StoreFiles for: " + familyDir);
+      }
       return null;
     }
 
@@ -379,7 +381,9 @@ public class HRegionFileSystem {
     if (!fs.exists(buildPath)) {
       throw new FileNotFoundException(buildPath.toString());
     }
-    LOG.debug("Committing store file " + buildPath + " as " + dstPath);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Committing store file " + buildPath + " as " + dstPath);
+    }
     // buildPath exists, therefore not doing an exists() check.
     if (!rename(buildPath, dstPath)) {
       throw new IOException("Failed rename of " + buildPath + " to " + dstPath);
@@ -1082,10 +1086,14 @@ public class HRegionFileSystem {
   private static void sleepBeforeRetry(String msg, int sleepMultiplier, int baseSleepBeforeRetries,
       int hdfsClientRetriesNumber) throws InterruptedException {
     if (sleepMultiplier > hdfsClientRetriesNumber) {
-      LOG.debug(msg + ", retries exhausted");
+      if (LOG.isDebugEnabled()) {
+        LOG.debug(msg + ", retries exhausted");
+      }
       return;
     }
-    LOG.debug(msg + ", sleeping " + baseSleepBeforeRetries + " times " + sleepMultiplier);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug(msg + ", sleeping " + baseSleepBeforeRetries + " times " + sleepMultiplier);
+    }
     Thread.sleep((long)baseSleepBeforeRetries * sleepMultiplier);
   }
 }


Mime
View raw message