HDFS-16552. Fix NPE for TestBlockManager (#4210)
(cherry picked from commit 5ebbacc480
)
This commit is contained in:
parent
261b11f7db
commit
9132eeb4dd
|
@ -854,6 +854,7 @@ public class TestBlockManager {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSkipReconstructionWithManyBusyNodes() {
|
public void testSkipReconstructionWithManyBusyNodes() {
|
||||||
|
NameNode.initMetrics(new Configuration(), HdfsServerConstants.NamenodeRole.NAMENODE);
|
||||||
long blockId = -9223372036854775776L; // real ec block id
|
long blockId = -9223372036854775776L; // real ec block id
|
||||||
// RS-3-2 EC policy
|
// RS-3-2 EC policy
|
||||||
ErasureCodingPolicy ecPolicy =
|
ErasureCodingPolicy ecPolicy =
|
||||||
|
@ -899,6 +900,7 @@ public class TestBlockManager {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSkipReconstructionWithManyBusyNodes2() {
|
public void testSkipReconstructionWithManyBusyNodes2() {
|
||||||
|
NameNode.initMetrics(new Configuration(), HdfsServerConstants.NamenodeRole.NAMENODE);
|
||||||
long blockId = -9223372036854775776L; // real ec block id
|
long blockId = -9223372036854775776L; // real ec block id
|
||||||
// RS-3-2 EC policy
|
// RS-3-2 EC policy
|
||||||
ErasureCodingPolicy ecPolicy =
|
ErasureCodingPolicy ecPolicy =
|
||||||
|
|
Loading…
Reference in New Issue