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

star commented on HDFS-14436:
-----------------------------

It is a little wired to return only the raw literal number when default time 
units and literal number is provided. It may mislead us to unexpected behave if 
we just take into account its name and parameters.  Though changing long 10 to 
string '10s' will return expected result, I think it should return the same 
result when long 10 and default time unit SECOND is given. 

> Configuration#getTimeDuration is not consistent between default value and 
> manual settings.
> ------------------------------------------------------------------------------------------
>
>                 Key: HDFS-14436
>                 URL: https://issues.apache.org/jira/browse/HDFS-14436
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: star
>            Assignee: star
>            Priority: Major
>         Attachments: HDFS-14436.001.patch
>
>
> When call getTimeDuration like this:
> {quote}conf.getTimeDuration("nn.interval", 10, 
> TimeUnit.{color:#9876aa}SECONDS{color}{color:#cc7832}, 
> {color}TimeUnit.{color:#9876aa}MILLISECONDS{color}){color:#cc7832};{color}
> {quote}
>  {color:#333333}If "nn.interval" is set manually or configured in xml file, 
> 10000 will be retrurned.{color}
>  If not, 10 will be returned while 10000 is expected. 
>  The logic is not consistent.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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