HBASE-19388 - Incorrect value is being set for Compaction Pressure in 
RegionLoadStats object inside HRegion class

Signed-off-by: tedyu <yuzhih...@gmail.com>


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

Branch: refs/heads/branch-1.3
Commit: 7fde0fdcc19e37f9cbc66c3bcbb95bb3465faad3
Parents: 5dc97e2
Author: Harshal Deepakkumar Jain 
<harshal.j...@hjain-wsl.internal.salesforce.com>
Authored: Thu Nov 30 18:08:01 2017 +0530
Committer: Andrew Purtell <apurt...@apache.org>
Committed: Thu Nov 30 15:07:54 2017 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/regionserver/HRegion.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/7fde0fdc/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index b25e11b..99cdf5f 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -7215,8 +7215,8 @@ public class HRegion implements HeapSize, 
PropagatingConfigurationObserver, Regi
         stats.setHeapOccupancy((int)(occupancy * 100));
       }
     }
-    stats.setCompactionPressure((int)rsServices.getCompactionPressure()*100 > 
100 ? 100 :
-                (int)rsServices.getCompactionPressure()*100);
+    stats.setCompactionPressure((int) (rsServices.getCompactionPressure() * 
100 > 100 ? 100
+        : rsServices.getCompactionPressure() * 100));
     return stats.build();
   }
 

Reply via email to