hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [3/3] hbase git commit: HBASE-16220 Demote log level for "HRegionFileSystem - No StoreFiles for" messages to TRACE
Date Wed, 13 Jul 2016 00:31:03 GMT
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/364fa3f7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/364fa3f7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/364fa3f7

Branch: refs/heads/0.98
Commit: 364fa3f7f5f90dd7ac87b1c48234bfa4fd4cd5b9
Parents: a16fb9e
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 17:01:16 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/364fa3f7/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 578bbfc..828e815 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
@@ -189,7 +189,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;
     }
 
@@ -367,7 +369,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);
@@ -1048,10 +1052,14 @@ public class HRegionFileSystem {
   private static void sleepBeforeRetry(String msg, int sleepMultiplier, int baseSleepBeforeRetries,
       int hdfsClientRetriesNumber) {
     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);
+    }
     Threads.sleep((long)baseSleepBeforeRetries * sleepMultiplier);
   }
 }


Mime
View raw message