You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Nicolas Liochon <nk...@gmail.com> on 2012/11/23 19:43:33 UTC

workaround to remove a warning stack in the test logs

Hi,

We have this well known stack everytime we launch a minicluster:

12/04/05 16:56:07 WARN util.MBeans:
Hadoop:service=DataNode,name=MetricsSystem,sub=Control
javax.management.InstanceAlreadyExistsException: MXBean already
registered with name
Hadoop:service=NameNode,name=MetricsSystem,sub=Control
	at com.sun.jmx.mbeanserver.MXBeanLookup.addReference(MXBeanLookup.java:120)
	at com.sun.jmx.mbeanserver.MXBeanSupport.register(MXBeanSupport.java:143)
	at com.sun.jmx.mbeanserver.MBeanSupport.preRegister2(MBeanSupport.java:183)


That's HBASE-4709.

It could be removed by adding this in HBaseTestingUtility:

  static {
org.apache.log4j.Logger.getLogger(org.apache.hadoop.metrics2.util.MBeans.class).
        setLevel(org.apache.log4j.Level.ERROR);
  }

This would hide all the warnings from this class, which is acceptable imho.

Is it an issue for anyone if I do it (in trunk) ?

The other solution is to understand the problem and fix it, but it could
take me hours, I don't really have them for this :-)


Cheers,

Nicolas

Re: workaround to remove a warning stack in the test logs

Posted by Stack <st...@duboce.net>.
On Fri, Nov 23, 2012 at 10:43 AM, Nicolas Liochon <nk...@gmail.com> wrote:
> Hi,
>
> We have this well known stack everytime we launch a minicluster:
>
> 12/04/05 16:56:07 WARN util.MBeans:
> Hadoop:service=DataNode,name=MetricsSystem,sub=Control
> javax.management.InstanceAlreadyExistsException: MXBean already
> registered with name
> Hadoop:service=NameNode,name=MetricsSystem,sub=Control
>         at com.sun.jmx.mbeanserver.MXBeanLookup.addReference(MXBeanLookup.java:120)
>         at com.sun.jmx.mbeanserver.MXBeanSupport.register(MXBeanSupport.java:143)
>         at com.sun.jmx.mbeanserver.MBeanSupport.preRegister2(MBeanSupport.java:183)
>
>
> That's HBASE-4709.
>
> It could be removed by adding this in HBaseTestingUtility:
>
>   static {
> org.apache.log4j.Logger.getLogger(org.apache.hadoop.metrics2.util.MBeans.class).
>         setLevel(org.apache.log4j.Level.ERROR);
>   }
>
> This would hide all the warnings from this class, which is acceptable imho.
>
> Is it an issue for anyone if I do it (in trunk) ?
>
> The other solution is to understand the problem and fix it, but it could
> take me hours, I don't really have them for this :-)
>
>

Sounds good N.  Its a silly little oversight.  Daemons should be
registering their mbeans at different locations when multiple servers
in the one JVM.
St.Ack

Re: workaround to remove a warning stack in the test logs

Posted by yu...@gmail.com.
I think we can do the following until someone finds out the root cause. 

Thanks Nicolas. 



On Nov 23, 2012, at 10:43 AM, Nicolas Liochon <nk...@gmail.com> wrote:

> Hi,
> 
> We have this well known stack everytime we launch a minicluster:
> 
> 12/04/05 16:56:07 WARN util.MBeans:
> Hadoop:service=DataNode,name=MetricsSystem,sub=Control
> javax.management.InstanceAlreadyExistsException: MXBean already
> registered with name
> Hadoop:service=NameNode,name=MetricsSystem,sub=Control
>    at com.sun.jmx.mbeanserver.MXBeanLookup.addReference(MXBeanLookup.java:120)
>    at com.sun.jmx.mbeanserver.MXBeanSupport.register(MXBeanSupport.java:143)
>    at com.sun.jmx.mbeanserver.MBeanSupport.preRegister2(MBeanSupport.java:183)
> 
> 
> That's HBASE-4709.
> 
> It could be removed by adding this in HBaseTestingUtility:
> 
>  static {
> org.apache.log4j.Logger.getLogger(org.apache.hadoop.metrics2.util.MBeans.class).
>        setLevel(org.apache.log4j.Level.ERROR);
>  }
> 
> This would hide all the warnings from this class, which is acceptable imho.
> 
> Is it an issue for anyone if I do it (in trunk) ?
> 
> The other solution is to understand the problem and fix it, but it could
> take me hours, I don't really have them for this :-)
> 
> 
> Cheers,
> 
> Nicolas