hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [1/2] hbase git commit: HBASE-15083 Gets from Multiactions are not counted in metrics for gets
Date Sat, 19 Mar 2016 07:20:16 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 deaf0f3d0 -> c26c554ab


HBASE-15083 Gets from Multiactions are not counted in metrics for gets

Amending-Author: Andrew Purtell <apurtell@apache.org>


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

Branch: refs/heads/0.98
Commit: 0e727de4d48298cb256db4074e8e95894c29eb49
Parents: deaf0f3
Author: chenheng <chenheng@apache.org>
Authored: Tue Jan 12 14:32:55 2016 +0800
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Fri Mar 18 16:39:10 2016 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/regionserver/HRegionServer.java  | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/0e727de4/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 439bee7..65e52b5 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
@@ -3728,8 +3728,15 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa
       try {
         Result r = null;
         if (action.hasGet()) {
-          Get get = ProtobufUtil.toGet(action.getGet());
-          r = region.get(get);
+          long before = EnvironmentEdgeManager.currentTimeMillis();
+          try {
+            Get get = ProtobufUtil.toGet(action.getGet());
+            r = region.get(get);
+          } finally {
+            if (metricsRegionServer != null) {
+              metricsRegionServer.updateGet(EnvironmentEdgeManager.currentTimeMillis() -
before);
+            }
+          }
         } else if (action.hasServiceCall()) {
           resultOrExceptionBuilder = ResultOrException.newBuilder();
           try {


Mime
View raw message