[
https://issues.apache.org/jira/browse/HDFS-16772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17605441#comment-17605441
]
ASF GitHub Bot commented on HDFS-16772:
---------------------------------------
goiri commented on code in PR #4890:
URL: https://github.com/apache/hadoop/pull/4890#discussion_r972200934
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java:
##########
@@ -1327,8 +1327,8 @@ private void refreshHostsReader(Configuration conf)
throws IOException {
// Update the file names and refresh internal includes and excludes list.
if (conf == null) {
conf = new HdfsConfiguration();
- this.hostConfigManager.setConf(conf);
}
+ this.hostConfigManager.setConf(conf);
Review Comment:
Can we add a test?
> refreshHostsReader should use the new configuration
> ---------------------------------------------------
>
> Key: HDFS-16772
> URL: https://issues.apache.org/jira/browse/HDFS-16772
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: ZanderXu
> Assignee: ZanderXu
> Priority: Major
> Labels: pull-request-available
>
> `refreshHostsReader` should use the latest configuration.
> And the current code as bellow:
> {code:java}
> /** Reread include/exclude files. */
> private void refreshHostsReader(Configuration conf) throws IOException {
> if (conf == null) {
> conf = new HdfsConfiguration();
> // BUG here
> this.hostConfigManager.setConf(conf);
> }
> this.hostConfigManager.refresh();
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]