This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-3 by this push:
     new b54e7da18c6 HBASE-29868 Can not start mini dfs cluster when building 
against hadoop 3.3.x (#7707)
b54e7da18c6 is described below

commit b54e7da18c6ab7dd51b8621de800dc9ddb2102e0
Author: Duo Zhang <[email protected]>
AuthorDate: Fri Feb 13 23:01:52 2026 +0800

    HBASE-29868 Can not start mini dfs cluster when building against hadoop 
3.3.x (#7707)
    
    Just disable metrics logger for NameNode and DataNode
    
    Signed-off-by: Nick Dimiduk <[email protected]>
    (cherry picked from commit 9788d694570a7bb73b94331a5e6b13cd5f16a13a)
---
 .../java/org/apache/hadoop/hbase/io/asyncfs/AsyncFSTestBase.java    | 6 ++++++
 .../src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java     | 6 ++++++
 .../src/main/java/org/apache/hadoop/hbase/HBaseTestingUtility.java  | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git 
a/hbase-asyncfs/src/test/java/org/apache/hadoop/hbase/io/asyncfs/AsyncFSTestBase.java
 
b/hbase-asyncfs/src/test/java/org/apache/hadoop/hbase/io/asyncfs/AsyncFSTestBase.java
index d5c12069deb..612eafd52a3 100644
--- 
a/hbase-asyncfs/src/test/java/org/apache/hadoop/hbase/io/asyncfs/AsyncFSTestBase.java
+++ 
b/hbase-asyncfs/src/test/java/org/apache/hadoop/hbase/io/asyncfs/AsyncFSTestBase.java
@@ -22,6 +22,7 @@ import java.io.IOException;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseCommonTestingUtil;
+import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -87,6 +88,11 @@ public abstract class AsyncFSTestBase {
     createDirAndSetProperty("dfs.journalnode.edits.dir");
     createDirAndSetProperty("dfs.provided.aliasmap.inmemory.leveldb.dir");
     createDirAndSetProperty("fs.s3a.committer.staging.tmp.path");
+
+    // disable metrics logger since it depend on commons-logging internal 
classes and we do not want
+    // commons-logging on our classpath
+    
UTIL.getConfiguration().setInt(DFSConfigKeys.DFS_NAMENODE_METRICS_LOGGER_PERIOD_SECONDS_KEY,
 0);
+    
UTIL.getConfiguration().setInt(DFSConfigKeys.DFS_DATANODE_METRICS_LOGGER_PERIOD_SECONDS_KEY,
 0);
   }
 
   protected static void startMiniDFSCluster(int servers) throws IOException {
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java
index dd7dff90c5b..5d11bf28815 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java
@@ -145,6 +145,7 @@ import org.apache.hadoop.hbase.zookeeper.EmptyWatcher;
 import org.apache.hadoop.hbase.zookeeper.ZKConfig;
 import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
 import org.apache.hadoop.hdfs.DFSClient;
+import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.DistributedFileSystem;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.hdfs.server.datanode.DataNode;
@@ -729,6 +730,11 @@ public class HBaseTestingUtil extends HBaseZKTestingUtil {
     createDirAndSetProperty("dfs.journalnode.edits.dir");
     createDirAndSetProperty("dfs.provided.aliasmap.inmemory.leveldb.dir");
     createDirAndSetProperty("fs.s3a.committer.staging.tmp.path");
+
+    // disable metrics logger since it depend on commons-logging internal 
classes and we do not want
+    // commons-logging on our classpath
+    conf.setInt(DFSConfigKeys.DFS_NAMENODE_METRICS_LOGGER_PERIOD_SECONDS_KEY, 
0);
+    conf.setInt(DFSConfigKeys.DFS_DATANODE_METRICS_LOGGER_PERIOD_SECONDS_KEY, 
0);
   }
 
   /**
diff --git 
a/hbase-testing-util/src/main/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
 
b/hbase-testing-util/src/main/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index 1dea0ba4c36..156afd9b734 100644
--- 
a/hbase-testing-util/src/main/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ 
b/hbase-testing-util/src/main/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -133,6 +133,7 @@ import org.apache.hadoop.hbase.zookeeper.EmptyWatcher;
 import org.apache.hadoop.hbase.zookeeper.ZKConfig;
 import org.apache.hadoop.hbase.zookeeper.ZKWatcher;
 import org.apache.hadoop.hdfs.DFSClient;
+import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.DistributedFileSystem;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.hdfs.server.datanode.DataNode;
@@ -683,6 +684,11 @@ public class HBaseTestingUtility extends 
HBaseZKTestingUtility {
     createDirAndSetProperty("dfs.journalnode.edits.dir");
     createDirAndSetProperty("dfs.provided.aliasmap.inmemory.leveldb.dir");
     createDirAndSetProperty("fs.s3a.committer.staging.tmp.path");
+
+    // disable metrics logger since it depend on commons-logging internal 
classes and we do not want
+    // commons-logging on our classpath
+    conf.setInt(DFSConfigKeys.DFS_NAMENODE_METRICS_LOGGER_PERIOD_SECONDS_KEY, 
0);
+    conf.setInt(DFSConfigKeys.DFS_DATANODE_METRICS_LOGGER_PERIOD_SECONDS_KEY, 
0);
   }
 
   /**

Reply via email to