hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject git commit: HBASE-11398 Print the stripes' state with file size info
Date Mon, 23 Jun 2014 21:29:11 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 37ccbd4e8 -> 482f7f311


HBASE-11398 Print the stripes' state with file size info


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

Branch: refs/heads/0.98
Commit: 482f7f31101116673c8849d15ab4f589622668e5
Parents: 37ccbd4
Author: Ted Yu <tedyu@apache.org>
Authored: Mon Jun 23 21:28:51 2014 +0000
Committer: Ted Yu <tedyu@apache.org>
Committed: Mon Jun 23 21:28:51 2014 +0000

----------------------------------------------------------------------
 .../hbase/regionserver/StripeStoreFileManager.java    | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/482f7f31/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
index 9df0396..f88fd43 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFileManager.java
@@ -40,6 +40,7 @@ import org.apache.hadoop.hbase.KeyValue.KVComparator;
 import org.apache.hadoop.hbase.regionserver.compactions.StripeCompactionPolicy;
 import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.ConcatenatedLists;
+import org.apache.hadoop.util.StringUtils;
 
 import com.google.common.collect.ImmutableCollection;
 import com.google.common.collect.ImmutableList;
@@ -472,13 +473,22 @@ public class StripeStoreFileManager
     if (!LOG.isDebugEnabled()) return;
     StringBuilder sb = new StringBuilder();
     sb.append("\n" + string + "; current stripe state is as such:");
-    sb.append("\n level 0 with ").append(state.level0Files.size()).append(" files;");
+    sb.append("\n level 0 with ").append(state.level0Files.size())
+        .append(
+          " files: "
+              + StringUtils.humanReadableInt(StripeCompactionPolicy
+                  .getTotalFileSize(state.level0Files)) + ";");
     for (int i = 0; i < state.stripeFiles.size(); ++i) {
       String endRow = (i == state.stripeEndRows.length)
           ? "(end)" : "[" + Bytes.toString(state.stripeEndRows[i]) + "]";
       sb.append("\n stripe ending in ").append(endRow).append(" with ")
-        .append(state.stripeFiles.get(i).size()).append(" files;");
+          .append(state.stripeFiles.get(i).size())
+          .append(
+            " files: "
+                + StringUtils.humanReadableInt(StripeCompactionPolicy
+                    .getTotalFileSize(state.stripeFiles.get(i))) + ";");
     }
+    sb.append("\n").append(state.stripeFiles.size()).append(" stripes total.");
     sb.append("\n").append(getStorefileCount()).append(" files total.");
     LOG.debug(sb.toString());
   }


Mime
View raw message