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

Allen Wittenauer commented on HADOOP-11353:
-------------------------------------------

I'm expecting more people to use it to replace HADOOP_CLIENT_OPTS than anything 
else.  

Pointing to a different cluster sort of works; the java portions of 
HADOOP_CONF_DIR and the paths used for classpath calculations are used *after* 
.hadooprc gets processed.  So theoretically, you could do something fun like:

{code}
/sw/hadoop.${CLUSTER}
/etc/hadoop -> dir that only contains a generic hadoop-env.sh
/etc/hadoop.mycoolcluster

.hadooprc:
HADOOP_CONF_DIR=/etc/hadoop.${CLUSTER}
HADOOP_COMMON_HOME=/sw/hadoop.${CLUSTER}
HADOOP_HDFS_HOME=/sw/hadoop.${CLUSTER}
HADOOP_YARN_HOME=/sw/hadoop.${CLUSTER}
HADOOP_MAPRED_HOME=/sw/hadoop.${CLUSTER}

$ CLUSTER=mycoolcluster yarn jar myjob.jar
{code}

For documentation, do think it should be in the CommandsManual?  I've got a 
bunch of stuff to document, actually... :)

> Add support for .hadooprc
> -------------------------
>
>                 Key: HADOOP-11353
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11353
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: scripts
>    Affects Versions: 3.0.0
>            Reporter: Allen Wittenauer
>            Assignee: Allen Wittenauer
>              Labels: scripts
>         Attachments: HADOOP-11353.patch
>
>
> The system should be able to read in user-defined env vars from ~/.hadooprc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to