From 6ceee073574214502e05b10b0147a34ad910936f Mon Sep 17 00:00:00 2001 From: Benoy Antony Date: Fri, 25 Dec 2015 08:55:39 -0800 Subject: [PATCH] HDFS-9597. BaseReplicationPolicyTest should update data node stats after adding a data node. Contributed by Wei-Chiu Chuang. --- .../hdfs/server/blockmanagement/BaseReplicationPolicyTest.java | 2 ++ 1 file changed, 2 insertions(+) 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(); }