diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java index 14a325b844ce..72f5b9eb47ce 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/replication/ReplicationManager.java @@ -1333,8 +1333,14 @@ public void validate() { + " event.timeout, which is set to " + eventTimeout); } if (reconstructionCommandWeight <= 0) { - throw new IllegalArgumentException("reconstructionCommandWeight is" - + " set to " + reconstructionCommandWeight + " and must be > 0"); + throw new IllegalArgumentException("datanode.reconstruction.weight: " + + reconstructionCommandWeight + " must be > 0"); + } + if (datanodeReplicationLimit < reconstructionCommandWeight) { + throw new IllegalArgumentException("datanode.replication.limit: " + + datanodeReplicationLimit + + " must be >= datanode.reconstruction.weight: " + + reconstructionCommandWeight); } if (inflightReplicationLimitFactor < 0) { throw new IllegalArgumentException(