You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ma...@apache.org on 2012/05/07 21:00:38 UTC
svn commit: r1335195 - in /hadoop/common/branches/branch-1: CHANGES.txt
src/core/org/apache/hadoop/jmx/JMXJsonServlet.java
Author: mattf
Date: Mon May 7 19:00:37 2012
New Revision: 1335195
URL: http://svn.apache.org/viewvc?rev=1335195&view=rev
Log:
HADOOP-8027. Visiting /jmx on the daemon web interfaces may print unnecessary error in logs. Contributed by Aaron T. Myers. Ported to hadoop-1 by Hitesh Shah.
Modified:
hadoop/common/branches/branch-1/CHANGES.txt (contents, props changed)
hadoop/common/branches/branch-1/src/core/org/apache/hadoop/jmx/JMXJsonServlet.java
Modified: hadoop/common/branches/branch-1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/CHANGES.txt?rev=1335195&r1=1335194&r2=1335195&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/CHANGES.txt (original)
+++ hadoop/common/branches/branch-1/CHANGES.txt Mon May 7 19:00:37 2012
@@ -320,6 +320,9 @@ Release 1.0.3 - 2012.05.07
MAPREDUCE-4012. Hadoop Job setup error leaves no useful info to users
(when LinuxTaskController is used) (tgraves)
+ HADOOP-8027. Visiting /jmx on the daemon web interfaces may print unnecessary
+ error in logs (Aaron Myers and Hitesh Shah)
+
Release 1.0.2 - 2012.03.24
NEW FEATURES
Propchange: hadoop/common/branches/branch-1/CHANGES.txt
------------------------------------------------------------------------------
Merged /hadoop/common/branches/branch-1.0/CHANGES.txt:r1335192
Modified: hadoop/common/branches/branch-1/src/core/org/apache/hadoop/jmx/JMXJsonServlet.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-1/src/core/org/apache/hadoop/jmx/JMXJsonServlet.java?rev=1335195&r1=1335194&r2=1335195&view=diff
==============================================================================
--- hadoop/common/branches/branch-1/src/core/org/apache/hadoop/jmx/JMXJsonServlet.java (original)
+++ hadoop/common/branches/branch-1/src/core/org/apache/hadoop/jmx/JMXJsonServlet.java Mon May 7 19:00:37 2012
@@ -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.openmbean.CompositeData;
import javax.management.openmbean.CompositeType;
import javax.management.openmbean.TabularData;
@@ -249,6 +250,15 @@ public class JMXJsonServlet extends Http
Object value = null;
try {
value = mBeanServer.getAttribute(oname, attName);
+ } 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 "+attName+" of "+oname+" threw an exception", e);
+ } else {
+ LOG.error("getting attribute "+attName+" of "+oname+" threw an exception", e);
+ }
+ return;
} catch (AttributeNotFoundException e) {
//Ignored the attribute was not found, which should never happen because the bean
//just told us that it has this attribute, but if this happens just don't output