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

eric baldeschwieler commented on HADOOP-6287:
---------------------------------------------

So what happens if I ask for the same config property, once as a time and once 
as storage?
It would seem clearer to spec what the unit is, valid ranges, etc in one place, 
where the property is defined...

Can the current code be bent to support that style?  We could then put config 
documentation in the same place and auto-generate all kinds of useful 
information.

It seems like we should allow long text (IE gigabytes) as well as GB.  We need 
to be careful of bits vs bytes.  gB and gb are not the same thing.  Taking the 
shorthand seems error prone in networking contexts where bits are the default.  
Given that we know this is byes, taking just the scale [pgmk] seems fine, but 
we would need to know that.  

We should probably throw an exception, not default or truncate when a value is 
out of range or uses a surprising unit (bits for bytes for example).

> 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