hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michel Tourn (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-345) JobConf access to name-values
Date Tue, 01 Aug 2006 17:40:14 GMT
     [ http://issues.apache.org/jira/browse/HADOOP-345?page=all ]

Michel Tourn updated HADOOP-345:

    Attachment: config.entries.patch

All right, here is the entries() patch.

> JobConf access to name-values
> -----------------------------
>                 Key: HADOOP-345
>                 URL: http://issues.apache.org/jira/browse/HADOOP-345
>             Project: Hadoop
>          Issue Type: Improvement
>            Reporter: Michel Tourn
>         Assigned To: Michel Tourn
>         Attachments: config.entries.patch
> class JobConf (or its base class Configuration) 
> should be extended to enable enumeration of all its key-value pairs.
> ( more precisely: the Properties returned by Configuration.getProps() )
> This will be useful to "export" all JobConf properties to environment variables.
> We use env.vars to expose some Hadoop context to non-Java MapReduce applications.
> Note that the typed properties are also represented as Strings 
> (getInt, getStrings, getClass, etc.)
> So a single enumeration exposes everything as (untyped) environment variables.
> The proposed escaping rules from JobConf properties to env.var are:
> 1. values are left as-is.
> 2. keys are escaped as follows:
> [A-Za-z0-9] --> unchanged.
> all other chars --> underscore.
> For example
> set("mapred.input.key.class", "com.example.MyKey")
> becomes env.var:
> export mapred_input_key_class=com.example.MyKey
> Justification:
> 1. Environment variables are case-sensitive. (Although uppercase is the preferred convention)
>   So no need to uppercase everything.
> 2. Some characters are forbidden in env.vars, or at least not shell-friendly:
> For example period, colon are problematic.
> 3. The Hadoop conventions are already hierarchical and provide some namespace protection.
>    This means we don't need an additional prefix as protection.
>    For example all exported environment variables will start with "mapred." , "dfs."
, "ipc." etc.
>   This means they will not conflict with standard environemnt variables like PATH, USER,
>   And they will not conflict with standard hadoop env.vars because those are upper-case.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message