[ 
https://issues.apache.org/jira/browse/HDFS-14719?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16905851#comment-16905851
 ] 

Surendra Singh Lilhore commented on HDFS-14719:
-----------------------------------------------

Thanks [~hemanthboyina] for patch.
{code:java}
this.replQueueThreshold =
conf.getFloat(DFS_NAMENODE_REPL_QUEUE_THRESHOLD_PCT_KEY,
(float) threshold);{code}
{{ threshold}} used as a default value for {{replQueueThreshold}}. No need to 
type cast here and change {{replQueueThreshold}} also to float.

> Correct the safemode threshold value in BlockManagerSafeMode
> ------------------------------------------------------------
>
>                 Key: HDFS-14719
>                 URL: https://issues.apache.org/jira/browse/HDFS-14719
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>    Affects Versions: 3.1.1
>            Reporter: Surendra Singh Lilhore
>            Assignee: hemanthboyina
>            Priority: Major
>         Attachments: HDFS-14719.patch
>
>
> BlockManagerSafeMode is doing wrong parsing for safemode threshold. It is 
> storing float value in double, which will give different result some time. If 
> we store "0.999f" value in double then it will be converted to 
> "0.9990000128746033".
> {code:java}
> this.threshold = conf.getFloat(DFS_NAMENODE_SAFEMODE_THRESHOLD_PCT_KEY,
> DFS_NAMENODE_SAFEMODE_THRESHOLD_PCT_DEFAULT);{code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to