busbey commented on a change in pull request #916: HBASE-23382: Clean up 
Logging for Some of hbase-server Module
URL: https://github.com/apache/hbase/pull/916#discussion_r356407861
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
 ##########
 @@ -753,25 +753,25 @@ private void freeSpace(final String why) {
         if (stats[i].freeCount() < freeGoal) {
           bytesToFreeForBucket[i] = stats[i].itemSize() * (freeGoal - 
stats[i].freeCount());
           bytesToFreeWithoutExtra += bytesToFreeForBucket[i];
-          if (msgBuffer != null) {
-            msgBuffer.append("Free for bucketSize(" + stats[i].itemSize() + 
")="
+          if (LOG.isDebugEnabled()) {
+            LOG.debug("Free for bucketSize(" + stats[i].itemSize() + ")="
               + StringUtils.byteDesc(bytesToFreeForBucket[i]) + ", ");
           }
         }
       }
-      if (msgBuffer != null) {
-        msgBuffer.append("Free for total=" + 
StringUtils.byteDesc(bytesToFreeWithoutExtra) + ", ");
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Free for total=" + 
StringUtils.byteDesc(bytesToFreeWithoutExtra));
       }
 
       if (bytesToFreeWithoutExtra <= 0) {
         return;
       }
       long currentSize = bucketAllocator.getUsedSize();
       long totalSize = bucketAllocator.getTotalSize();
-      if (LOG.isDebugEnabled() && msgBuffer != null) {
-        LOG.debug("Free started because \"" + why + "\"; " + 
msgBuffer.toString() +
-          " of current used=" + StringUtils.byteDesc(currentSize) + ", actual 
cacheSize=" +
-          StringUtils.byteDesc(realCacheSize.sum()) + ", total=" + 
StringUtils.byteDesc(totalSize));
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Current used=" + StringUtils.byteDesc(currentSize) + ", 
actual cacheSize="
 
 Review comment:
   use substitution

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to