guangxuCheng commented on a change in pull request #834: HBASE-23237 Negative 
sign in requestsPerSecond
URL: https://github.com/apache/hbase/pull/834#discussion_r347313525
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsRegionServerWrapperImpl.java
 ##########
 @@ -797,13 +842,10 @@ synchronized public void run() {
         }
         // If we've time traveled keep the last requests per second.
         if ((currentTime - lastRan) > 0) {
-          long currentRequestCount = getTotalRowActionRequestCount();
-          requestsPerSecond = (currentRequestCount - lastRequestCount) /
-              ((currentTime - lastRan) / 1000.0);
-          lastRequestCount = currentRequestCount;
+          requestsPerSecond = tempRequestsPerSecond / ((currentTime - lastRan) 
/ 1000.0);
 
 Review comment:
   use (totalReadRequestsDelta + totalWriteRequestsDelta) instead of 
tempRequestsPerSecond

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to