You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ch...@apache.org on 2017/08/29 06:58:21 UTC
hbase git commit: HBASE-3935 HServerLoad.storefileIndexSizeMB should
be changed to storefileIndexSizeKB
Repository: hbase
Updated Branches:
refs/heads/branch-2 cc0e630d2 -> d26e22d75
HBASE-3935 HServerLoad.storefileIndexSizeMB should be changed to storefileIndexSizeKB
Signed-off-by: Chia-Ping Tsai <ch...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d26e22d7
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d26e22d7
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d26e22d7
Branch: refs/heads/branch-2
Commit: d26e22d75b581f834d34eb7b179ac4f4fe92fb88
Parents: cc0e630
Author: Andy Yang <th...@gmail.com>
Authored: Mon Aug 28 05:00:54 2017 -0700
Committer: Chia-Ping Tsai <ch...@gmail.com>
Committed: Tue Aug 29 13:43:27 2017 +0800
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/RegionLoad.java | 16 +++++++---
.../org/apache/hadoop/hbase/ServerLoad.java | 17 ++++++-----
.../src/main/protobuf/ClusterStatus.proto | 4 +--
.../src/main/protobuf/ClusterStatus.proto | 4 +--
.../rest/StorageClusterStatusResource.java | 2 +-
.../rest/model/StorageClusterStatusModel.java | 32 ++++++++++----------
.../protobuf/StorageClusterStatusMessage.proto | 2 +-
.../model/TestStorageClusterStatusModel.java | 12 ++++----
.../hbase/regionserver/HRegionServer.java | 6 ++--
.../org/apache/hadoop/hbase/TestServerLoad.java | 6 ++--
10 files changed, 55 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/d26e22d7/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLoad.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLoad.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLoad.java
index d6c028d..35cb69b 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLoad.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/RegionLoad.java
@@ -84,10 +84,18 @@ public class RegionLoad {
}
/**
- * @return the approximate size of storefile indexes on the heap, in MB
+ * @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
+ * ((<a href="https://issues.apache.org/jira/browse/HBASE-3935">HBASE-3935</a>)).
+ * Use {@link #getStorefileIndexSizeKB()} instead.
*/
+ @Deprecated
public int getStorefileIndexSizeMB() {
- return regionLoadPB.getStorefileIndexSizeMB();
+ // Return value divided by 1024
+ return (int) (regionLoadPB.getStorefileIndexSizeKB() >> 10);
+ }
+
+ public long getStorefileIndexSizeKB() {
+ return regionLoadPB.getStorefileIndexSizeKB();
}
/**
@@ -215,8 +223,8 @@ public class RegionLoad {
}
sb = Strings.appendKeyValue(sb, "memstoreSizeMB",
this.getMemStoreSizeMB());
- sb = Strings.appendKeyValue(sb, "storefileIndexSizeMB",
- this.getStorefileIndexSizeMB());
+ sb = Strings.appendKeyValue(sb, "storefileIndexSizeKB",
+ this.getStorefileIndexSizeKB());
sb = Strings.appendKeyValue(sb, "readRequestsCount",
this.getReadRequestsCount());
sb = Strings.appendKeyValue(sb, "writeRequestsCount",
http://git-wip-us.apache.org/repos/asf/hbase/blob/d26e22d7/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
index 8d4c7d3..521c079 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java
@@ -45,7 +45,7 @@ public class ServerLoad {
private int storeUncompressedSizeMB = 0;
private int storefileSizeMB = 0;
private int memstoreSizeMB = 0;
- private int storefileIndexSizeMB = 0;
+ private long storefileIndexSizeKB = 0;
private long readRequestsCount = 0;
private long filteredReadRequestsCount = 0;
private long writeRequestsCount = 0;
@@ -64,7 +64,7 @@ public class ServerLoad {
storeUncompressedSizeMB += rl.getStoreUncompressedSizeMB();
storefileSizeMB += rl.getStorefileSizeMB();
memstoreSizeMB += rl.getMemstoreSizeMB();
- storefileIndexSizeMB += rl.getStorefileIndexSizeMB();
+ storefileIndexSizeKB += rl.getStorefileIndexSizeKB();
readRequestsCount += rl.getReadRequestsCount();
filteredReadRequestsCount += rl.getFilteredReadRequestsCount();
writeRequestsCount += rl.getWriteRequestsCount();
@@ -159,15 +159,16 @@ public class ServerLoad {
/**
* @deprecated As of release 2.0.0, this will be removed in HBase 3.0.0
- * Use {@link #getStorefileIndexSizeMB()} instead.
+ * Use {@link #getStorefileIndexSizeKB()} instead.
*/
@Deprecated
public int getStorefileIndexSizeInMB() {
- return storefileIndexSizeMB;
+ // Return value divided by 1024
+ return (int) (getStorefileIndexSizeKB() >> 10);
}
- public int getStorefileIndexSizeMB() {
- return storefileIndexSizeMB;
+ public long getStorefileIndexSizeKB() {
+ return storefileIndexSizeKB;
}
public long getReadRequestsCount() {
@@ -327,8 +328,8 @@ public class ServerLoad {
}
sb = Strings.appendKeyValue(sb, "memstoreSizeMB", Integer.valueOf(this.memstoreSizeMB));
sb =
- Strings.appendKeyValue(sb, "storefileIndexSizeMB",
- Integer.valueOf(this.storefileIndexSizeMB));
+ Strings.appendKeyValue(sb, "storefileIndexSizeKB",
+ Long.valueOf(this.storefileIndexSizeKB));
sb = Strings.appendKeyValue(sb, "readRequestsCount", Long.valueOf(this.readRequestsCount));
sb = Strings.appendKeyValue(sb, "filteredReadRequestsCount",
Long.valueOf(this.filteredReadRequestsCount));
http://git-wip-us.apache.org/repos/asf/hbase/blob/d26e22d7/hbase-protocol-shaded/src/main/protobuf/ClusterStatus.proto
----------------------------------------------------------------------
diff --git a/hbase-protocol-shaded/src/main/protobuf/ClusterStatus.proto b/hbase-protocol-shaded/src/main/protobuf/ClusterStatus.proto
index d647bb1..51489b2 100644
--- a/hbase-protocol-shaded/src/main/protobuf/ClusterStatus.proto
+++ b/hbase-protocol-shaded/src/main/protobuf/ClusterStatus.proto
@@ -98,9 +98,9 @@ message RegionLoad {
/**
* The current total size of root-level store file indexes for the region,
- * in MB. The same as {@link #rootIndexSizeKB} but in MB.
+ * in KB. The same as {@link #rootIndexSizeKB}.
*/
- optional uint32 storefile_index_size_MB = 7;
+ optional uint64 storefile_index_size_KB = 7;
/** the current total read requests made to region */
optional uint64 read_requests_count = 8;
http://git-wip-us.apache.org/repos/asf/hbase/blob/d26e22d7/hbase-protocol/src/main/protobuf/ClusterStatus.proto
----------------------------------------------------------------------
diff --git a/hbase-protocol/src/main/protobuf/ClusterStatus.proto b/hbase-protocol/src/main/protobuf/ClusterStatus.proto
index 4ae3230..1bf128c 100644
--- a/hbase-protocol/src/main/protobuf/ClusterStatus.proto
+++ b/hbase-protocol/src/main/protobuf/ClusterStatus.proto
@@ -98,9 +98,9 @@ message RegionLoad {
/**
* The current total size of root-level store file indexes for the region,
- * in MB. The same as {@link #rootIndexSizeKB} but in MB.
+ * in KB. The same as {@link #rootIndexSizeKB}.
*/
- optional uint32 storefile_index_size_MB = 7;
+ optional uint64 storefile_index_size_KB = 7;
/** the current total read requests made to region */
optional uint64 read_requests_count = 8;
http://git-wip-us.apache.org/repos/asf/hbase/blob/d26e22d7/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/StorageClusterStatusResource.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/StorageClusterStatusResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/StorageClusterStatusResource.java
index 27977c3..29e95e9 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/StorageClusterStatusResource.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/StorageClusterStatusResource.java
@@ -85,7 +85,7 @@ public class StorageClusterStatusResource extends ResourceBase {
for (RegionLoad region: load.getRegionsLoad().values()) {
node.addRegion(region.getName(), region.getStores(),
region.getStorefiles(), region.getStorefileSizeMB(),
- region.getMemStoreSizeMB(), region.getStorefileIndexSizeMB(),
+ region.getMemStoreSizeMB(), region.getStorefileIndexSizeKB(),
region.getReadRequestsCount(), region.getWriteRequestsCount(),
region.getRootIndexSizeKB(), region.getTotalStaticIndexSizeKB(),
region.getTotalStaticBloomSizeKB(), region.getTotalCompactingKVs(),
http://git-wip-us.apache.org/repos/asf/hbase/blob/d26e22d7/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/StorageClusterStatusModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/StorageClusterStatusModel.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/StorageClusterStatusModel.java
index 3c3c50e..1a47232 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/StorageClusterStatusModel.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/StorageClusterStatusModel.java
@@ -115,7 +115,7 @@ public class StorageClusterStatusModel
private int storefiles;
private int storefileSizeMB;
private int memstoreSizeMB;
- private int storefileIndexSizeMB;
+ private long storefileIndexSizeKB;
private long readRequestsCount;
private long writeRequestsCount;
private int rootIndexSizeKB;
@@ -145,10 +145,10 @@ public class StorageClusterStatusModel
* @param storefiles the number of store files
* @param storefileSizeMB total size of store files, in MB
* @param memstoreSizeMB total size of memstore, in MB
- * @param storefileIndexSizeMB total size of store file indexes, in MB
+ * @param storefileIndexSizeKB total size of store file indexes, in KB
*/
public Region(byte[] name, int stores, int storefiles,
- int storefileSizeMB, int memstoreSizeMB, int storefileIndexSizeMB,
+ int storefileSizeMB, int memstoreSizeMB, long storefileIndexSizeKB,
long readRequestsCount, long writeRequestsCount, int rootIndexSizeKB,
int totalStaticIndexSizeKB, int totalStaticBloomSizeKB,
long totalCompactingKVs, long currentCompactedKVs) {
@@ -157,7 +157,7 @@ public class StorageClusterStatusModel
this.storefiles = storefiles;
this.storefileSizeMB = storefileSizeMB;
this.memstoreSizeMB = memstoreSizeMB;
- this.storefileIndexSizeMB = storefileIndexSizeMB;
+ this.storefileIndexSizeKB = storefileIndexSizeKB;
this.readRequestsCount = readRequestsCount;
this.writeRequestsCount = writeRequestsCount;
this.rootIndexSizeKB = rootIndexSizeKB;
@@ -208,11 +208,11 @@ public class StorageClusterStatusModel
}
/**
- * @return the total size of store file indexes, in MB
+ * @return the total size of store file indexes, in KB
*/
@XmlAttribute
- public int getStorefileIndexSizeMB() {
- return storefileIndexSizeMB;
+ public long getStorefileIndexSizeKB() {
+ return storefileIndexSizeKB;
}
/**
@@ -361,10 +361,10 @@ public class StorageClusterStatusModel
}
/**
- * @param storefileIndexSizeMB total size of store file indexes, in MB
+ * @param storefileIndexSizeKB total size of store file indexes, in KB
*/
- public void setStorefileIndexSizeMB(int storefileIndexSizeMB) {
- this.storefileIndexSizeMB = storefileIndexSizeMB;
+ public void setStorefileIndexSizeKB(long storefileIndexSizeKB) {
+ this.storefileIndexSizeKB = storefileIndexSizeKB;
}
}
@@ -380,12 +380,12 @@ public class StorageClusterStatusModel
* @param name the region name
*/
public void addRegion(byte[] name, int stores, int storefiles,
- int storefileSizeMB, int memstoreSizeMB, int storefileIndexSizeMB,
+ int storefileSizeMB, int memstoreSizeMB, long storefileIndexSizeKB,
long readRequestsCount, long writeRequestsCount, int rootIndexSizeKB,
int totalStaticIndexSizeKB, int totalStaticBloomSizeKB,
long totalCompactingKVs, long currentCompactedKVs) {
regions.add(new Region(name, stores, storefiles, storefileSizeMB,
- memstoreSizeMB, storefileIndexSizeMB, readRequestsCount,
+ memstoreSizeMB, storefileIndexSizeKB, readRequestsCount,
writeRequestsCount, rootIndexSizeKB, totalStaticIndexSizeKB,
totalStaticBloomSizeKB, totalCompactingKVs, currentCompactedKVs));
}
@@ -673,8 +673,8 @@ public class StorageClusterStatusModel
sb.append(region.storefileSizeMB);
sb.append("\n memstoreSizeMB=");
sb.append(region.memstoreSizeMB);
- sb.append("\n storefileIndexSizeMB=");
- sb.append(region.storefileIndexSizeMB);
+ sb.append("\n storefileIndexSizeKB=");
+ sb.append(region.storefileIndexSizeKB);
sb.append("\n readRequestsCount=");
sb.append(region.readRequestsCount);
sb.append("\n writeRequestsCount=");
@@ -729,7 +729,7 @@ public class StorageClusterStatusModel
regionBuilder.setStorefiles(region.storefiles);
regionBuilder.setStorefileSizeMB(region.storefileSizeMB);
regionBuilder.setMemstoreSizeMB(region.memstoreSizeMB);
- regionBuilder.setStorefileIndexSizeMB(region.storefileIndexSizeMB);
+ regionBuilder.setStorefileIndexSizeKB(region.storefileIndexSizeKB);
regionBuilder.setReadRequestsCount(region.readRequestsCount);
regionBuilder.setWriteRequestsCount(region.writeRequestsCount);
regionBuilder.setRootIndexSizeKB(region.rootIndexSizeKB);
@@ -775,7 +775,7 @@ public class StorageClusterStatusModel
region.getStorefiles(),
region.getStorefileSizeMB(),
region.getMemstoreSizeMB(),
- region.getStorefileIndexSizeMB(),
+ region.getStorefileIndexSizeKB(),
region.getReadRequestsCount(),
region.getWriteRequestsCount(),
region.getRootIndexSizeKB(),
http://git-wip-us.apache.org/repos/asf/hbase/blob/d26e22d7/hbase-rest/src/main/protobuf/StorageClusterStatusMessage.proto
----------------------------------------------------------------------
diff --git a/hbase-rest/src/main/protobuf/StorageClusterStatusMessage.proto b/hbase-rest/src/main/protobuf/StorageClusterStatusMessage.proto
index 34dc1c3..f69efd7 100644
--- a/hbase-rest/src/main/protobuf/StorageClusterStatusMessage.proto
+++ b/hbase-rest/src/main/protobuf/StorageClusterStatusMessage.proto
@@ -24,7 +24,7 @@ message StorageClusterStatus {
optional int32 storefiles = 3;
optional int32 storefileSizeMB = 4;
optional int32 memstoreSizeMB = 5;
- optional int32 storefileIndexSizeMB = 6;
+ optional int64 storefileIndexSizeKB = 6;
optional int64 readRequestsCount = 7;
optional int64 writeRequestsCount = 8;
optional int32 rootIndexSizeKB = 9;
http://git-wip-us.apache.org/repos/asf/hbase/blob/d26e22d7/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
----------------------------------------------------------------------
diff --git a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
index 36850a5..884e451 100644
--- a/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
+++ b/hbase-rest/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
@@ -40,12 +40,12 @@ public class TestStorageClusterStatusModel extends TestModelBase<StorageClusterS
"<DeadNodes/><LiveNodes>" +
"<Node heapSizeMB=\"128\" maxHeapSizeMB=\"1024\" name=\"test1\" requests=\"0\" startCode=\"1245219839331\">" +
"<Region currentCompactedKVs=\"1\" memstoreSizeMB=\"0\" name=\"aGJhc2U6cm9vdCwsMA==\" readRequestsCount=\"1\" " +
- "rootIndexSizeKB=\"1\" storefileIndexSizeMB=\"0\" storefileSizeMB=\"0\" storefiles=\"1\" stores=\"1\" " +
+ "rootIndexSizeKB=\"1\" storefileIndexSizeKB=\"0\" storefileSizeMB=\"0\" storefiles=\"1\" stores=\"1\" " +
"totalCompactingKVs=\"1\" totalStaticBloomSizeKB=\"1\" totalStaticIndexSizeKB=\"1\" writeRequestsCount=\"2\"/>" +
"</Node>" +
"<Node heapSizeMB=\"512\" maxHeapSizeMB=\"1024\" name=\"test2\" requests=\"0\" startCode=\"1245239331198\">" +
"<Region currentCompactedKVs=\"1\" memstoreSizeMB=\"0\" name=\"aGJhc2U6bWV0YSwsMTI0NjAwMDA0MzcyNA==\" " +
- "readRequestsCount=\"1\" rootIndexSizeKB=\"1\" storefileIndexSizeMB=\"0\" storefileSizeMB=\"0\" " +
+ "readRequestsCount=\"1\" rootIndexSizeKB=\"1\" storefileIndexSizeKB=\"0\" storefileSizeMB=\"0\" " +
"storefiles=\"1\" stores=\"1\" totalCompactingKVs=\"1\" totalStaticBloomSizeKB=\"1\" " +
"totalStaticIndexSizeKB=\"1\" writeRequestsCount=\"2\"/></Node></LiveNodes></ClusterStatus>";
@@ -61,13 +61,13 @@ public class TestStorageClusterStatusModel extends TestModelBase<StorageClusterS
AS_JSON =
"{\"regions\":2,\"requests\":0,\"averageLoad\":1.0,\"LiveNodes\":[{\"name\":\"test1\"," +
"\"Region\":[{\"name\":\"aGJhc2U6cm9vdCwsMA==\",\"stores\":1,\"storefiles\":1," +
- "\"storefileSizeMB\":0,\"memstoreSizeMB\":0,\"storefileIndexSizeMB\":0," +
+ "\"storefileSizeMB\":0,\"memstoreSizeMB\":0,\"storefileIndexSizeKB\":0," +
"\"readRequestsCount\":1,\"writeRequestsCount\":2,\"rootIndexSizeKB\":1," +
"\"totalStaticIndexSizeKB\":1,\"totalStaticBloomSizeKB\":1,\"totalCompactingKVs\":1," +
"\"currentCompactedKVs\":1}],\"requests\":0,\"startCode\":1245219839331," +
"\"heapSizeMB\":128,\"maxHeapSizeMB\":1024},{\"name\":\"test2\"," +
"\"Region\":[{\"name\":\"aGJhc2U6bWV0YSwsMTI0NjAwMDA0MzcyNA==\",\"stores\":1," +
- "\"storefiles\":1,\"storefileSizeMB\":0,\"memstoreSizeMB\":0,\"storefileIndexSizeMB\":0," +
+ "\"storefiles\":1,\"storefileSizeMB\":0,\"memstoreSizeMB\":0,\"storefileIndexSizeKB\":0," +
"\"readRequestsCount\":1,\"writeRequestsCount\":2,\"rootIndexSizeKB\":1," +
"\"totalStaticIndexSizeKB\":1,\"totalStaticBloomSizeKB\":1,\"totalCompactingKVs\":1," +
"\"currentCompactedKVs\":1}],\"requests\":0,\"startCode\":1245239331198," +
@@ -107,7 +107,7 @@ public class TestStorageClusterStatusModel extends TestModelBase<StorageClusterS
assertEquals(region.getStorefiles(), 1);
assertEquals(region.getStorefileSizeMB(), 0);
assertEquals(region.getMemstoreSizeMB(), 0);
- assertEquals(region.getStorefileIndexSizeMB(), 0);
+ assertEquals(region.getStorefileIndexSizeKB(), 0);
assertEquals(region.getReadRequestsCount(), 1);
assertEquals(region.getWriteRequestsCount(), 2);
assertEquals(region.getRootIndexSizeKB(), 1);
@@ -129,7 +129,7 @@ public class TestStorageClusterStatusModel extends TestModelBase<StorageClusterS
assertEquals(region.getStorefiles(), 1);
assertEquals(region.getStorefileSizeMB(), 0);
assertEquals(region.getMemstoreSizeMB(), 0);
- assertEquals(region.getStorefileIndexSizeMB(), 0);
+ assertEquals(region.getStorefileIndexSizeKB(), 0);
assertEquals(region.getReadRequestsCount(), 1);
assertEquals(region.getWriteRequestsCount(), 2);
assertEquals(region.getRootIndexSizeKB(), 1);
http://git-wip-us.apache.org/repos/asf/hbase/blob/d26e22d7/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
index ae2f7dd..96050a6 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
@@ -1683,7 +1683,7 @@ public class HRegionServer extends HasThread implements
int storeUncompressedSizeMB = 0;
int storefileSizeMB = 0;
int memstoreSizeMB = (int) (r.getMemstoreSize() / 1024 / 1024);
- int storefileIndexSizeMB = 0;
+ long storefileIndexSizeKB = 0;
int rootIndexSizeKB = 0;
int totalStaticIndexSizeKB = 0;
int totalStaticBloomSizeKB = 0;
@@ -1695,7 +1695,7 @@ public class HRegionServer extends HasThread implements
storefiles += store.getStorefilesCount();
storeUncompressedSizeMB += (int) (store.getStoreSizeUncompressed() / 1024 / 1024);
storefileSizeMB += (int) (store.getStorefilesSize() / 1024 / 1024);
- storefileIndexSizeMB += (int) (store.getStorefilesIndexSize() / 1024 / 1024);
+ storefileIndexSizeKB += store.getStorefilesIndexSize() / 1024;
CompactionProgress progress = store.getCompactionProgress();
if (progress != null) {
totalCompactingKVs += progress.totalCompactingKVs;
@@ -1722,7 +1722,7 @@ public class HRegionServer extends HasThread implements
.setStoreUncompressedSizeMB(storeUncompressedSizeMB)
.setStorefileSizeMB(storefileSizeMB)
.setMemstoreSizeMB(memstoreSizeMB)
- .setStorefileIndexSizeMB(storefileIndexSizeMB)
+ .setStorefileIndexSizeKB(storefileIndexSizeKB)
.setRootIndexSizeKB(rootIndexSizeKB)
.setTotalStaticIndexSizeKB(totalStaticIndexSizeKB)
.setTotalStaticBloomSizeKB(totalStaticBloomSizeKB)
http://git-wip-us.apache.org/repos/asf/hbase/blob/d26e22d7/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerLoad.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerLoad.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerLoad.java
index 2d248b0..84d509b 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerLoad.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestServerLoad.java
@@ -42,7 +42,7 @@ public class TestServerLoad {
assertEquals(129, sl.getStoreUncompressedSizeMB());
assertEquals(504, sl.getRootIndexSizeKB());
assertEquals(820, sl.getStorefileSizeMB());
- assertEquals(82, sl.getStorefileIndexSizeMB());
+ assertEquals(82, sl.getStorefileIndexSizeKB());
assertEquals(((long)Integer.MAX_VALUE)*2, sl.getReadRequestsCount());
assertEquals(300, sl.getFilteredReadRequestsCount());
@@ -83,12 +83,12 @@ public class TestServerLoad {
ClusterStatusProtos.RegionLoad.newBuilder().setRegionSpecifier(rSpecOne).setStores(10)
.setStorefiles(101).setStoreUncompressedSizeMB(106).setStorefileSizeMB(520)
.setFilteredReadRequestsCount(100)
- .setStorefileIndexSizeMB(42).setRootIndexSizeKB(201).setReadRequestsCount(Integer.MAX_VALUE).setWriteRequestsCount(Integer.MAX_VALUE).build();
+ .setStorefileIndexSizeKB(42).setRootIndexSizeKB(201).setReadRequestsCount(Integer.MAX_VALUE).setWriteRequestsCount(Integer.MAX_VALUE).build();
ClusterStatusProtos.RegionLoad rlTwo =
ClusterStatusProtos.RegionLoad.newBuilder().setRegionSpecifier(rSpecTwo).setStores(3)
.setStorefiles(13).setStoreUncompressedSizeMB(23).setStorefileSizeMB(300)
.setFilteredReadRequestsCount(200)
- .setStorefileIndexSizeMB(40).setRootIndexSizeKB(303).setReadRequestsCount(Integer.MAX_VALUE).setWriteRequestsCount(Integer.MAX_VALUE).build();
+ .setStorefileIndexSizeKB(40).setRootIndexSizeKB(303).setReadRequestsCount(Integer.MAX_VALUE).setWriteRequestsCount(Integer.MAX_VALUE).build();
ClusterStatusProtos.ServerLoad sl =
ClusterStatusProtos.ServerLoad.newBuilder().addRegionLoads(rlOne).