This is an automated email from the ASF dual-hosted git repository.
zhangduo pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new 019e5812d28 HBASE-29868 Can not start mini dfs cluster when building
against hadoop 3.3.x (#7707)
019e5812d28 is described below
commit 019e5812d28fd77250b67edc26ff06c58e179922
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/HBaseTestingUtility.java | 6 ++++++
2 files changed, 12 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 0bac2fb00a3..4d69006a63a 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.HBaseCommonTestingUtility;
+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/HBaseTestingUtility.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index a7e72f61048..6b003b18dff 100644
---
a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++
b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -150,6 +150,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;
@@ -807,6 +808,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);
}
/**