diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java index 16f535e90c7..36aef8efe8a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java @@ -86,7 +86,6 @@ import com.google.common.base.Preconditions; public class Dispatcher { static final Log LOG = LogFactory.getLog(Dispatcher.class); - private static final int MAX_NO_PENDING_MOVE_ITERATIONS = 5; /** * the period of time to delay the usage of a DataNode after hitting * errors when using it for migrating data @@ -1032,6 +1031,8 @@ public class Dispatcher { } if (moveExecutor == null) { LOG.warn("No mover threads available: skip moving " + p); + targetDn.removePendingBlock(p); + p.proxySource.removePendingBlock(p); return; }