[ https://issues.apache.org/jira/browse/HDFS-17075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17743103#comment-17743103 ]
ASF GitHub Bot commented on HDFS-17075: --------------------------------------- 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. > Reconfig disk balancer parameters for datanode > ---------------------------------------------- > > Key: HDFS-17075 > URL: https://issues.apache.org/jira/browse/HDFS-17075 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Haiyang Hu > Assignee: Haiyang Hu > Priority: Major > Labels: pull-request-available > > Rolling restart datanodes takes long time, can make disk balanacer parameters > dfs.disk.balancer.enabled and dfs.disk.balancer.plan.valid.interval in > datanode reconfigurable to facilitate cluster operation and maintenance. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org