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

Arun C Murthy commented on HADOOP-6287:
---------------------------------------

Eli, thanks for the patch, but I concur with Steve... I don't think we want to 
support units for Configuration.get{Int|Long}.

I was planning on the lines of adding a new method:

{code}
Configuration.getStorage(String key, Unit unit);
{code}

where

{code}
enum Unit {
  B,
  KB,
  MB,
  GB,
  TB,
  PB,
  ...
}
{code}

Thus, if we are setting ulimit we can do:
{code}Configuration.getStorage("mapreduce.map.child.ulimit", KB);{code}

File i/o buffer sizes:
{code}Configuration.getStorage("io.file.buffer.size", KB);{code}

Memory limits for child jvms:
{code}Configuration.getStorage("mapreduce.job.map.memory", MB);{code}

Thoughts?
                                                          

> 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