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

tasanuma pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
     new 0965822ae15 HDFS-16552. Fix NPE for TestBlockManager (#4210)
0965822ae15 is described below

commit 0965822ae15fd6e10c2cc70fe6b22d44ad1f8c4a
Author: litao <[email protected]>
AuthorDate: Sat Apr 23 11:14:06 2022 +0800

    HDFS-16552. Fix NPE for TestBlockManager (#4210)
    
    (cherry picked from commit 5ebbacc48023c0c71dd428df40a4352feede373b)
---
 .../org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
index 65e6c356620..c1a39249ad4 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManager.java
@@ -844,6 +844,7 @@ public class TestBlockManager {
 
   @Test
   public void testSkipReconstructionWithManyBusyNodes() {
+    NameNode.initMetrics(new Configuration(), 
HdfsServerConstants.NamenodeRole.NAMENODE);
     long blockId = -9223372036854775776L; // real ec block id
     // RS-3-2 EC policy
     ErasureCodingPolicy ecPolicy =
@@ -889,6 +890,7 @@ public class TestBlockManager {
 
   @Test
   public void testSkipReconstructionWithManyBusyNodes2() {
+    NameNode.initMetrics(new Configuration(), 
HdfsServerConstants.NamenodeRole.NAMENODE);
     long blockId = -9223372036854775776L; // real ec block id
     // RS-3-2 EC policy
     ErasureCodingPolicy ecPolicy =


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to