Author: tedyu
Date: Wed Feb  1 14:56:20 2012
New Revision: 1239157

URL: http://svn.apache.org/viewvc?rev=1239157&view=rev
Log:
HBASE-5283 Request counters may become negative for heavily loaded regions 
(Mubarak)

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/HServerLoad.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/HServerLoad.java
URL: 
http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/HServerLoad.java?rev=1239157&r1=1239156&r2=1239157&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/HServerLoad.java 
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/HServerLoad.java Wed Feb  
1 14:56:20 2012
@@ -125,9 +125,9 @@ implements WritableComparable<HServerLoa
      */
     private int storefileIndexSizeMB;
     /** the current total read requests made to region */
-    private int readRequestsCount;
+    private long readRequestsCount;
     /** the current total write requests made to region */
-    private int writeRequestsCount;
+    private long writeRequestsCount;
     /** the total compacting key values in currently running compaction */
     private long totalCompactingKVs;
     /** the completed count of key values in currently running compaction */
@@ -176,7 +176,7 @@ implements WritableComparable<HServerLoa
         final int memstoreSizeMB, final int storefileIndexSizeMB,
         final int rootIndexSizeKB, final int totalStaticIndexSizeKB,
         final int totalStaticBloomSizeKB,
-        final int readRequestsCount, final int writeRequestsCount,
+        final long readRequestsCount, final long writeRequestsCount,
         final long totalCompactingKVs, final long currentCompactedKVs,
         final Set<String> coprocessors) {
       this.name = name;
@@ -366,8 +366,8 @@ implements WritableComparable<HServerLoa
       this.storefileSizeMB = WritableUtils.readVInt(in);
       this.memstoreSizeMB = WritableUtils.readVInt(in);
       this.storefileIndexSizeMB = WritableUtils.readVInt(in);
-      this.readRequestsCount = WritableUtils.readVInt(in);
-      this.writeRequestsCount = WritableUtils.readVInt(in);
+      this.readRequestsCount = WritableUtils.readVLong(in);
+      this.writeRequestsCount = WritableUtils.readVLong(in);
       this.rootIndexSizeKB = WritableUtils.readVInt(in);
       this.totalStaticIndexSizeKB = WritableUtils.readVInt(in);
       this.totalStaticBloomSizeKB = WritableUtils.readVInt(in);
@@ -391,8 +391,8 @@ implements WritableComparable<HServerLoa
       WritableUtils.writeVInt(out, storefileSizeMB);
       WritableUtils.writeVInt(out, memstoreSizeMB);
       WritableUtils.writeVInt(out, storefileIndexSizeMB);
-      WritableUtils.writeVInt(out, readRequestsCount);
-      WritableUtils.writeVInt(out, writeRequestsCount);
+      WritableUtils.writeVLong(out, readRequestsCount);
+      WritableUtils.writeVLong(out, writeRequestsCount);
       WritableUtils.writeVInt(out, rootIndexSizeKB);
       WritableUtils.writeVInt(out, totalStaticIndexSizeKB);
       WritableUtils.writeVInt(out, totalStaticBloomSizeKB);


Reply via email to