public static Object getValueFromMBean(ObjectName bean, String attribute) {
    Object value = null;
    try {
      value = mbServer.getAttribute(bean, attribute);
    } catch (Exception e) {
      LOG.error("Unable to get value from MBean= " + bean.toString() + "for attribute=" + attribute
        + " " + e.getMessage());
    }
    return value;
  }
Utility for getting metric values. Collection of static methods intended for easier access to
metric values.
hbase-http/src/main/java/org/apache/hadoop/hbase/util/JSONMetricUtil.java