hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject git commit: HBASE-12328 Need to separate JvmMetrics for Master and RegionServer (Sanghyun Yun)
Date Fri, 24 Oct 2014 04:50:18 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 fc2ef413f -> bca92603e


HBASE-12328 Need to separate JvmMetrics for Master and RegionServer (Sanghyun Yun)


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

Branch: refs/heads/branch-1
Commit: bca92603e0f96beb21eba38e6d74170335658364
Parents: fc2ef41
Author: stack <stack@apache.org>
Authored: Thu Oct 23 21:49:47 2014 -0700
Committer: stack <stack@apache.org>
Committed: Thu Oct 23 21:50:09 2014 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactory.java | 4 ++--
 .../hadoop/hbase/ipc/MetricsHBaseServerSourceFactoryImpl.java    | 2 +-
 .../test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java    | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/bca92603/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactory.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactory.java
b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactory.java
index 4ad9f33..d6b1392 100644
--- a/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactory.java
+++ b/hbase-hadoop-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactory.java
@@ -47,9 +47,9 @@ public abstract class MetricsHBaseServerSourceFactory {
    * @return The Camel Cased context name.
    */
   protected static String createContextName(String serverName) {
-    if (serverName.contains("HMaster")) {
+    if (serverName.contains("HMaster") || serverName.contains("master")) {
       return "Master";
-    } else if (serverName.contains("HRegion")) {
+    } else if (serverName.contains("HRegion") || serverName.contains("regionserver")) {
       return "RegionServer";
     }
     return "IPC";

http://git-wip-us.apache.org/repos/asf/hbase/blob/bca92603/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactoryImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactoryImpl.java
b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactoryImpl.java
index df40e68..cca53e0 100644
--- a/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactoryImpl.java
+++ b/hbase-hadoop2-compat/src/main/java/org/apache/hadoop/hbase/ipc/MetricsHBaseServerSourceFactoryImpl.java
@@ -46,7 +46,7 @@ public class MetricsHBaseServerSourceFactoryImpl extends MetricsHBaseServerSourc
     if (source == null) {
       //Create the source.
       source = new MetricsHBaseServerSourceImpl(
-          METRICS_NAME,
+          context,
           METRICS_DESCRIPTION,
           context.toLowerCase(),
           context + METRICS_JMX_CONTEXT_SUFFIX, wrapper);

http://git-wip-us.apache.org/repos/asf/hbase/blob/bca92603/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java
index 1885e0e..31a69c0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/ipc/TestRpcMetrics.java
@@ -47,8 +47,8 @@ public class TestRpcMetrics {
     assertEquals("Master,sub=IPC", masterSource.getMetricsJmxContext());
     assertEquals("RegionServer,sub=IPC", rsSource.getMetricsJmxContext());
 
-    assertEquals("IPC", masterSource.getMetricsName());
-    assertEquals("IPC", rsSource.getMetricsName());
+    assertEquals("Master", masterSource.getMetricsName());
+    assertEquals("RegionServer", rsSource.getMetricsName());
   }
 
   /**


Mime
View raw message