HDFS-16552. Fix NPE for TestBlockManager (#4210)

This commit is contained in:
litao 2022-04-23 11:14:06 +08:00 committed by GitHub
parent 214f369073
commit 5ebbacc480
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -854,6 +854,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 =
@ -899,6 +900,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 =