[ https://issues.apache.org/jira/browse/HDFS-12082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16078770#comment-16078770 ]
Chen Liang commented on HDFS-12082: ----------------------------------- Thansk [~cheersyang] for reporting this! I'm a little confused about the patch though. When reading the description, I was thinking the change is probably that, when {{setHeartbeatInterval}} is called, instead of {{blockInvalidateLimit = Math.max(20 * (int) (intervalSeconds), DFSConfigKeys.DFS_BLOCK_INVALIDATE_LIMIT_DEFAULT);}} we change it to something like {{blockInvalidateLimit = Math.max(20 * (int) (intervalSeconds), configuredLimit);}} where {{final int configuredLimit = conf.getInt(DFSConfigKeys.DFS_BLOCK_INVALIDATE_LIMIT_KEY, DFSConfigKeys.DFS_BLOCK_INVALIDATE_LIMIT_DEFAULT);}} But seems the patch removed this part completely. It seems to me in this case {{blockInvalidateLimit}} will be set to configured value at the start once and will no longer change when {{setHeartbeatInterval}} gets called. Is this the desired behaviour? because the original code seems to have the syntax guarantee that no matter how {{setHeartbeatInterval}} gets called, {{blockInvalidateLimit}} will never be larger than 20x {{intervalSeconds}}, and it appears that this will not be guaranteed with the patch. An addition minor comment, in the unit test, how about changing {{"" + 6}} to {{Integer.toString(6)}}? > BlockInvalidateLimit value is incorrectly set after namenode heartbeat > interval reconfigured > --------------------------------------------------------------------------------------------- > > Key: HDFS-12082 > URL: https://issues.apache.org/jira/browse/HDFS-12082 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs, namenode > Reporter: Weiwei Yang > Assignee: Weiwei Yang > Attachments: HDFS-12082.001.patch, HDFS-12082.002.patch > > > HDFS-1477 provides an option to reconfigured namenode heartbeat interval > without restarting the namenode. When the heartbeat interval is reconfigured, > {{blockInvalidateLimit}} gets recounted > {code} > this.blockInvalidateLimit = Math.max(20 * (int) (intervalSeconds), > DFSConfigKeys.DFS_BLOCK_INVALIDATE_LIMIT_DEFAULT); > {code} > this doesn't honor the existing value set by {{dfs.block.invalidate.limit}}. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org