[ 
https://issues.apache.org/jira/browse/HADOOP-6287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760375#action_12760375
 ] 

Chris Douglas commented on HADOOP-6287:
---------------------------------------

The return type is not entirely clear. If one specifies 500k and the caller 
asks for the spec in megabytes, what does it return? While {{double}} return 
values would work, most contexts prefer {{long}}. We should probably just 
truncate residue (following java.util.concurrent.TimeUnit, which should also 
have get/set in this issue).

bq. For time we could have Configuration#getMilliseconds()

I'd rather follow Java and use Configuration::getTime(String, TimeUnit, long). 
I wouldn't object to a convenience getMilliseconds, though.

> Support units for configuration knobs
> -------------------------------------
>
>                 Key: HADOOP-6287
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6287
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>            Reporter: Arun C Murthy
>            Assignee: Eli Collins
>         Attachments: hadoop-6287-1.patch
>
>
> We should add support for units in our Configuration system so that we can 
> specify values to be *1GB* or *1MB* rather than forcing every component which 
> consumes such values to be aware of these.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to