hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-17344 The regionserver web UIs miss the coprocessors of RegionServerCoprocessorHost (ChiaPing Tsai)
Date Tue, 20 Dec 2016 16:55:14 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 97d1ba401 -> b9689808e


HBASE-17344 The regionserver web UIs miss the coprocessors of RegionServerCoprocessorHost
(ChiaPing Tsai)


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

Branch: refs/heads/branch-1
Commit: b9689808eb110ed9371bf37c8a2ae42082add353
Parents: 97d1ba4
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Dec 20 08:55:07 2016 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue Dec 20 08:55:07 2016 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/regionserver/HRegionServer.java   |  1 +
 .../org/apache/hadoop/hbase/TestJMXListener.java   | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b9689808/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 7050377..6ec4b67 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
@@ -2806,6 +2806,7 @@ public class HRegionServer extends HasThread implements
         LOG.debug("Exception details for failure to fetch wal coprocessor information.",
exception);
       }
     }
+    coprocessors.addAll(rsHost.getCoprocessors());
     return coprocessors.toArray(new String[coprocessors.size()]);
   }
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/b9689808/hbase-server/src/test/java/org/apache/hadoop/hbase/TestJMXListener.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestJMXListener.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestJMXListener.java
index af602a5..8bb5869 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestJMXListener.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestJMXListener.java
@@ -29,8 +29,10 @@ import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
 import org.apache.hadoop.hbase.testclassification.MediumTests;
+import org.apache.hadoop.hbase.util.JVMClusterUtil;
 import org.junit.AfterClass;
 import org.junit.Assert;
+import static org.junit.Assert.fail;
 import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
@@ -92,5 +94,20 @@ public class TestJMXListener {
 
   }
 
+  @Test
+  public void testGetRegionServerCoprocessors() throws Exception {
+    for (JVMClusterUtil.RegionServerThread rs : UTIL.getHBaseCluster().getRegionServerThreads())
{
+      boolean find = false;
+      for (String s : rs.getRegionServer().getRegionServerCoprocessors()) {
+        if (s.equals(JMXListener.class.getSimpleName())) {
+          find = true;
+          break;
+        }
+      }
+      if (!find) {
+        fail("where is the JMXListener?");
+      }
+    }
+  }
 
 }
\ No newline at end of file


Mime
View raw message