[ https://issues.apache.org/jira/browse/HDFS-6808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14129498#comment-14129498 ]
Colin Patrick McCabe commented on HDFS-6808: -------------------------------------------- Looks good-- thanks, Eddy. {code} + /** + * Reload configuration on disk and apply changes. + */ + Map<PropertyChange, String> reloadDatanodeConfig() throws IOException; {code} Add some javadoc about the return value (from looking at the patch, mapping a key to null means success, mapping to a string gives error?) {code} + errorMessage = "Property " + change.prop + " is not reconfigurable."; + LOG.info(errorMessage); {code} Prefix this log message with "reloadDatanodeConfig: ", to let people reading the logs know what function generated it {code} + if ("-datanode".equals(nodeType)) { + ClientDatanodeProtocol dnProxy = getDataNodeProxy(address); ... + } else { + err.println("Non supported node type: " + nodeType); + return -1; + } {code} Nit: Perhaps the error message should be something like "Node type " + nodeType + " does not support reconfiguration"? Maybe > Add command line option to ask DataNode reload configuration. > ------------------------------------------------------------- > > Key: HDFS-6808 > URL: https://issues.apache.org/jira/browse/HDFS-6808 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: datanode > Affects Versions: 2.5.0 > Reporter: Lei (Eddy) Xu > Assignee: Lei (Eddy) Xu > Attachments: HDFS-6808.000.combo.patch, HDFS-6808.000.patch, > HDFS-6808.001.combo.patch, HDFS-6808.001.patch, HDFS-6808.002.combo.patch, > HDFS-6808.002.patch > > > The workflow of dynamically changing data volumes on DataNode is > # Users manually changed {{dfs.datanode.data.dir}} in the configuration file > # User use command line to notify DN to reload configuration and updates its > volumes. > This work adds command line support to notify DN to reload configuration. -- This message was sent by Atlassian JIRA (v6.3.4#6332)