diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
index 5422ddd6f2f..5e942792720 100644
--- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
+++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
@@ -195,37 +195,37 @@ org.apache.hadoop.util.StringUtils;
Count |
- <% StringUtils.humanReadableInt(cacheConfig.getBlockCache().getBlockCount()) %> |
+ <% String.format("%,d", cacheConfig.getBlockCache().getBlockCount()) %> |
Number of blocks in Block Cache |
Evicted |
- <% StringUtils.humanReadableInt(cacheConfig.getBlockCache().getStats().getEvictedCount()) %> |
+ <% String.format("%,d", cacheConfig.getBlockCache().getStats().getEvictedCount()) %> |
Number of blocks evicted |
Evictions |
- <% StringUtils.humanReadableInt(cacheConfig.getBlockCache().getStats().getEvictionCount()) %> |
+ <% String.format("%,d", cacheConfig.getBlockCache().getStats().getEvictionCount()) %> |
Number of times an eviction occurred |
Hits |
- <% StringUtils.humanReadableInt(cacheConfig.getBlockCache().getStats().getHitCount()) %> |
+ <% String.format("%,d", cacheConfig.getBlockCache().getStats().getHitCount()) %> |
Number requests that were cache hits |
Hits Caching |
- <% StringUtils.humanReadableInt(cacheConfig.getBlockCache().getStats().getHitCachingCount()) %> |
+ <% String.format("%,d", cacheConfig.getBlockCache().getStats().getHitCachingCount()) %> |
Cache hit block requests but only requests set to use Block Cache |
Misses |
- <% StringUtils.humanReadableInt(cacheConfig.getBlockCache().getStats().getMissCount()) %> |
+ <% String.format("%,d", cacheConfig.getBlockCache().getStats().getMissCount()) %> |
Number of requests that were cache misses |
Misses Caching |
- <% StringUtils.humanReadableInt(cacheConfig.getBlockCache().getStats().getMissCount()) %> |
+ <% String.format("%,d", cacheConfig.getBlockCache().getStats().getMissCount()) %> |
Block requests that were cache misses but only requests set to use Block Cache |
@@ -294,15 +294,22 @@ are combined counts. Request count is sum of hits and misses.
<% bc.getClass().getSimpleName() %> |
Class implementing this Block Cache Level |
+<%if bucketCache %>
+
+ Implementation |
+ <% ((BucketCache)bc).getIoEngine() %> |
+ IOEngine |
+
+%if>
Count |
- <% StringUtils.humanReadableInt(cbsbf.getCount()) %> |
+ <% String.format("%,d", cbsbf.getCount()) %> |
Count of Blocks |
<%if !bucketCache %>
Count |
- <% StringUtils.humanReadableInt(cbsbf.getDataCount()) %> |
+ <% String.format("%,d", cbsbf.getDataCount()) %> |
Count of DATA Blocks |
%if>
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
index c01c38f1409..39cbe0b84eb 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/BucketCache.java
@@ -259,6 +259,10 @@ public class BucketCache implements BlockCache, HeapSize {
persistencePath + ", bucketAllocator=" + this.bucketAllocator);
}
+ public String getIoEngine() {
+ return ioEngine.toString();
+ }
+
/**
* Get the IOEngine from the IO engine name
* @param ioEngineName
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/ByteBufferIOEngine.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/ByteBufferIOEngine.java
index 2c3e9466a46..efb72fa7d3f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/ByteBufferIOEngine.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/ByteBufferIOEngine.java
@@ -31,6 +31,8 @@ import org.apache.hadoop.hbase.util.ByteBufferArray;
@InterfaceAudience.Private
public class ByteBufferIOEngine implements IOEngine {
private ByteBufferArray bufferArray;
+ private final long capacity;
+ private final boolean direct;
/**
* Construct the ByteBufferIOEngine with the given capacity
@@ -40,9 +42,17 @@ public class ByteBufferIOEngine implements IOEngine {
*/
public ByteBufferIOEngine(long capacity, boolean direct)
throws IOException {
+ this.capacity = capacity;
+ this.direct = direct;
bufferArray = new ByteBufferArray(capacity, direct);
}
+ @Override
+ public String toString() {
+ return "ioengine=" + this.getClass().getSimpleName() + ", capacity=" +
+ String.format("%,d", this.capacity) + ", direct=" + this.direct;
+ }
+
/**
* Memory IO engine is always unable to support persistent storage for the
* cache
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/FileIOEngine.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/FileIOEngine.java
index 3b690c20200..26aae24a10a 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/FileIOEngine.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/bucket/FileIOEngine.java
@@ -36,8 +36,12 @@ public class FileIOEngine implements IOEngine {
private static final Log LOG = LogFactory.getLog(FileIOEngine.class);
private final RandomAccessFile raf;
private final FileChannel fileChannel;
+ private final String path;
+ private long size;
public FileIOEngine(String filePath, long fileSize) throws IOException {
+ this.path = filePath;
+ this.size = fileSize;
try {
raf = new RandomAccessFile(filePath, "rw");
} catch (java.io.FileNotFoundException fex) {
@@ -58,6 +62,12 @@ public class FileIOEngine implements IOEngine {
LOG.info("Allocating " + StringUtils.byteDesc(fileSize) + ", on the path:" + filePath);
}
+ @Override
+ public String toString() {
+ return "ioengine=" + this.getClass().getSimpleName() + ", path=" + this.path +
+ ", size=" + String.format("%,d", this.size);
+ }
+
/**
* File IO engine is always able to support persistent storage for the cache
* @return true