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 397ae7bf9fd..24b485d46a4 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 @@ -198,7 +198,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; } @@ -378,7 +380,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); @@ -1083,10 +1087,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); } }