haiyang1987 commented on code in PR #5823: URL: https://github.com/apache/hadoop/pull/5823#discussion_r1263602582
########## hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java: ########## @@ -951,6 +960,45 @@ private String reconfDfsUsageParameters(String property, String newVal) } } + private String reconfDiskBalancerParameters(String property, String newVal) + throws ReconfigurationException { + String result = null; + try { + LOG.info("Reconfiguring {} to {}", property, newVal); + if (property.equals(DFS_DISK_BALANCER_ENABLED)) { + if (newVal != null && !newVal.equalsIgnoreCase("true") + && !newVal.equalsIgnoreCase("false")) { + throw new IllegalArgumentException("Not a valid Boolean value for " + property + + " in reconfDiskBalancerParameters"); + } + boolean enable = (newVal == null ? DFS_DISK_BALANCER_ENABLED_DEFAULT : + Boolean.parseBoolean(newVal)); Review Comment: Hi Sir, the addition of this check is intended to consider the case where newVal is null. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org