hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nkey...@apache.org
Subject svn commit: r1419296 - in /hbase/trunk/hbase-server/src/test: java/org/apache/hadoop/hbase/HBaseTestingUtility.java resources/log4j.properties
Date Mon, 10 Dec 2012 09:46:05 GMT
Author: nkeywal
Date: Mon Dec 10 09:46:04 2012
New Revision: 1419296

URL: http://svn.apache.org/viewvc?rev=1419296&view=rev
Log:
HBASE-4709 Hadoop metrics2 setup in test MiniDFSClusters spewing JMX errors

Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
    hbase/trunk/hbase-server/src/test/resources/log4j.properties

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java?rev=1419296&r1=1419295&r2=1419296&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
Mon Dec 10 09:46:04 2012
@@ -436,6 +436,14 @@ public class HBaseTestingUtility extends
   public MiniDFSCluster startMiniDFSCluster(int servers, final String hosts[])
   throws Exception {
     createDirsAndSetProperties();
+
+    // Error level to skip some warnings specific to the minicluster. See HBASE-4709
+    org.apache.log4j.Logger.getLogger(org.apache.hadoop.metrics2.util.MBeans.class).
+        setLevel(org.apache.log4j.Level.ERROR);
+    org.apache.log4j.Logger.getLogger(org.apache.hadoop.metrics2.impl.MetricsSystemImpl.class).
+        setLevel(org.apache.log4j.Level.ERROR);
+
+
     this.dfsCluster = new MiniDFSCluster(0, this.conf, servers, true, true,
       true, null, null, hosts, null);
 

Modified: hbase/trunk/hbase-server/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/resources/log4j.properties?rev=1419296&r1=1419295&r2=1419296&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/resources/log4j.properties (original)
+++ hbase/trunk/hbase-server/src/test/resources/log4j.properties Mon Dec 10 09:46:04 2012
@@ -61,3 +61,8 @@ log4j.appender.console.layout.Conversion
 log4j.logger.org.apache.hadoop=WARN
 log4j.logger.org.apache.zookeeper=ERROR
 log4j.logger.org.apache.hadoop.hbase=DEBUG
+
+#These two settings are workarounds against spurious logs from the minicluster.
+#See HBASE-4709
+log4j.org.apache.hadoop.metrics2.impl.MetricsSystemImpl=ERROR
+log4j.org.apache.hadoop.metrics2.util.MBeans=ERROR



Mime
View raw message