hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndimi...@apache.org
Subject hbase git commit: Revert "HBASE-13564 Master MBeans are not published"
Date Wed, 29 Apr 2015 16:16:13 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 85ac00ba9 -> 167f0f048


Revert "HBASE-13564 Master MBeans are not published"

This reverts commit a725044644fbf5a6ed935595a84afa413a83fd01.


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

Branch: refs/heads/master
Commit: 167f0f0480bcf862766670ae10cf5da8c0627a26
Parents: 85ac00b
Author: Nick Dimiduk <ndimiduk@apache.org>
Authored: Wed Apr 29 09:14:59 2015 -0700
Committer: Nick Dimiduk <ndimiduk@apache.org>
Committed: Wed Apr 29 09:14:59 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/JMXListener.java   | 16 ++++------------
 .../org/apache/hadoop/hbase/TestJMXListener.java    |  3 ---
 src/main/asciidoc/_chapters/configuration.adoc      |  5 +++--
 3 files changed, 7 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/167f0f04/hbase-server/src/main/java/org/apache/hadoop/hbase/JMXListener.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/JMXListener.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/JMXListener.java
index 0d1c7c4..d1a30e8 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/JMXListener.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/JMXListener.java
@@ -51,8 +51,7 @@ public class JMXListener implements Coprocessor {
   private static final Log LOG = LogFactory.getLog(JMXListener.class);
   public static final String RMI_REGISTRY_PORT_CONF_KEY = ".rmi.registry.port";
   public static final String RMI_CONNECTOR_PORT_CONF_KEY = ".rmi.connector.port";
-  public static final int defMasterRMIRegistryPort = 10101;
-  public static final int defRegionserverRMIRegistryPort = 10102;
+  public static final int defRMIRegistryPort = 10102;
 
   /**
    * workaround for HBASE-11146
@@ -164,17 +163,11 @@ public class JMXListener implements Coprocessor {
     Configuration conf = env.getConfiguration();
 
     if (env instanceof MasterCoprocessorEnvironment) {
-      // running on Master
-      rmiRegistryPort =
-          conf.getInt("master" + RMI_REGISTRY_PORT_CONF_KEY, defMasterRMIRegistryPort);
-      rmiConnectorPort = conf.getInt("master" + RMI_CONNECTOR_PORT_CONF_KEY, rmiRegistryPort);
-      LOG.info("Master rmiRegistryPort:" + rmiRegistryPort + ",Master rmiConnectorPort:"
-          + rmiConnectorPort);
+      LOG.error("JMXListener should not be loaded in Master Environment!");
     } else if (env instanceof RegionServerCoprocessorEnvironment) {
-      // running on RegionServer
+      // running on RegionServer --since 0.99 HMaster is also a HRegionServer
       rmiRegistryPort =
-        conf.getInt("regionserver" + RMI_REGISTRY_PORT_CONF_KEY,
-        defRegionserverRMIRegistryPort);
+        conf.getInt("regionserver" + RMI_REGISTRY_PORT_CONF_KEY, defRMIRegistryPort);
       rmiConnectorPort =
         conf.getInt("regionserver" + RMI_CONNECTOR_PORT_CONF_KEY, rmiRegistryPort);
       LOG.info("RegionServer rmiRegistryPort:" + rmiRegistryPort
@@ -182,7 +175,6 @@ public class JMXListener implements Coprocessor {
 
     } else if (env instanceof RegionCoprocessorEnvironment) {
       LOG.error("JMXListener should not be loaded in Region Environment!");
-      return;
     }
 
     synchronized(JMXListener.class) {

http://git-wip-us.apache.org/repos/asf/hbase/blob/167f0f04/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 510f1dc..ed141a6 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
@@ -53,9 +53,6 @@ public class TestJMXListener {
     conf.set(CoprocessorHost.REGIONSERVER_COPROCESSOR_CONF_KEY,
       JMXListener.class.getName());
     conf.setInt("regionserver.rmi.registry.port", connectorPort);
-    
-    conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, JMXListener.class.getName());
-    conf.setInt("master.rmi.registry.port", connectorPort - 1);
 
     UTIL.startMiniCluster();
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/167f0f04/src/main/asciidoc/_chapters/configuration.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/_chapters/configuration.adoc b/src/main/asciidoc/_chapters/configuration.adoc
index 2b09664..ed00a49 100644
--- a/src/main/asciidoc/_chapters/configuration.adoc
+++ b/src/main/asciidoc/_chapters/configuration.adoc
@@ -994,7 +994,8 @@ To enable it in 0.99 or above, add below property in _hbase-site.xml_:
 NOTE: DO NOT set `com.sun.management.jmxremote.port` for Java VM at the same time.
 
 Currently it supports Master and RegionServer Java VM.
-By default, the JMX listens on TCP port 10102, you can further configure the port using below
properties:
+The reason why you only configure coprocessor for 'regionserver' is that, starting from HBase
0.99, a Master IS also a RegionServer.
+(See link:https://issues.apache.org/jira/browse/HBASE-10569[HBASE-10569] for more information.)
By default, the JMX listens on TCP port 10102, you can further configure the port using below
properties:
 
 [source,xml]
 ----
@@ -1061,7 +1062,7 @@ Finally start `jconsole` on the client using the key store:
 jconsole -J-Djavax.net.ssl.trustStore=/home/tianq/jconsoleKeyStore
 ----
 
-NOTE: To enable the HBase JMX implementation on Master, you also need to add below property
in _hbase-site.xml_: 
+NOTE: for HBase 0.98, To enable the HBase JMX implementation on Master, you also need to
add below property in _hbase-site.xml_: 
 
 [source,xml]
 ----


Mime
View raw message