HBASE-5552 Clean up our jmx view; its a bit of a mess

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1298923 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2012-03-09 16:54:13 +00:00
parent 35a36c2c66
commit cbdf0ca007
4 changed files with 8 additions and 6 deletions

View File

@ -38,7 +38,7 @@ public class HBaseRPCStatistics extends MetricsDynamicMBeanBase {
@SuppressWarnings({"UnusedDeclaration"}) @SuppressWarnings({"UnusedDeclaration"})
public HBaseRPCStatistics(MetricsRegistry registry, public HBaseRPCStatistics(MetricsRegistry registry,
String hostName, String port) { String hostName, String port) {
super(registry, "HBaseRPCStatistics"); super(registry, "Metrics for RPC server instance");
String name = String.format("RPCStatistics-%s", String name = String.format("RPCStatistics-%s",
(port != null ? port : "unknown")); (port != null ? port : "unknown"));

View File

@ -1832,7 +1832,7 @@ Server {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
void registerMBean() { void registerMBean() {
MXBeanImpl mxBeanInfo = MXBeanImpl.init(this); MXBeanImpl mxBeanInfo = MXBeanImpl.init(this);
MBeanUtil.registerMBean("org.apache.hbase", "Master", mxBeanInfo); MBeanUtil.registerMBean("Master", "Master", mxBeanInfo);
LOG.info("Registered HMaster MXBean"); LOG.info("Registered HMaster MXBean");
} }
} }

View File

@ -38,9 +38,11 @@ public class HBaseInfo {
private final ObjectName mbeanName; private final ObjectName mbeanName;
public HBaseInfoMBean(MetricsRegistry registry, String rsName) { public HBaseInfoMBean(MetricsRegistry registry, String rsName) {
super(registry, "HBaseInfo"); super(registry, "HBase cluster information");
mbeanName = MBeanUtil.registerMBean("HBase", // The name seems wrong to me; should include clusterid IMO.
"Info", this); // That would make it harder to locate and rare we have
// two clusters up on single machine. St.Ack 20120309
mbeanName = MBeanUtil.registerMBean("HBase", "Info", this);
} }
public void shutdown() { public void shutdown() {

View File

@ -3710,7 +3710,7 @@ public class HRegionServer implements HRegionInterface, HBaseRPCErrorHandler,
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
void registerMBean() { void registerMBean() {
MXBeanImpl mxBeanInfo = MXBeanImpl.init(this); MXBeanImpl mxBeanInfo = MXBeanImpl.init(this);
mxBean = MBeanUtil.registerMBean("org.apache.hbase", "RegionServer", mxBean = MBeanUtil.registerMBean("RegionServer", "RegionServer",
mxBeanInfo); mxBeanInfo);
LOG.info("Registered RegionServer MXBean"); LOG.info("Registered RegionServer MXBean");
} }