You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2014/07/29 00:58:26 UTC
git commit: HBASE-11603 Apply version of HADOOP-8027 to our
JMXJsonServlet
Repository: hbase
Updated Branches:
refs/heads/master 7d4dbb18d -> c71d1f6a0
HBASE-11603 Apply version of HADOOP-8027 to our JMXJsonServlet
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c71d1f6a
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c71d1f6a
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c71d1f6a
Branch: refs/heads/master
Commit: c71d1f6a0233b2aca4514d0ef8f67fcff9e1fa5a
Parents: 7d4dbb1
Author: stack <st...@apache.org>
Authored: Mon Jul 28 15:58:08 2014 -0700
Committer: stack <st...@apache.org>
Committed: Mon Jul 28 15:58:08 2014 -0700
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/c71d1f6a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java
index d3812b6..3a7f798 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/http/jmx/JMXJsonServlet.java
@@ -34,6 +34,7 @@ import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.ReflectionException;
+import javax.management.RuntimeMBeanException;
import javax.management.RuntimeErrorException;
import javax.management.RuntimeMBeanException;
import javax.management.openmbean.CompositeData;
@@ -248,6 +249,15 @@ public class JMXJsonServlet extends HttpServlet {
prs = attribute;
attributeinfo = mBeanServer.getAttribute(oname, prs);
}
+ } catch (RuntimeMBeanException e) {
+ // UnsupportedOperationExceptions happen in the normal course of business,
+ // so no need to log them as errors all the time.
+ if (e.getCause() instanceof UnsupportedOperationException) {
+ LOG.debug("getting attribute " + oname + " of "+oname+" threw an exception", e);
+ } else {
+ LOG.error("getting attribute " + oname + " of "+oname+" threw an exception", e);
+ }
+ return;
} catch (AttributeNotFoundException e) {
// If the modelerType attribute was not found, the class name is used
// instead.