diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java index 6174447964f..7dc52fa5fda 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/BaseReplicationPolicyTest.java @@ -98,6 +98,8 @@ abstract public class BaseReplicationPolicyTest { cluster.add(dataNodes[i]); bm.getDatanodeManager().getHeartbeatManager().addDatanode( dataNodes[i]); + bm.getDatanodeManager().getHeartbeatManager().updateDnStat( + dataNodes[i]); } updateHeartbeatWithUsage(); }