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

Eli Collins commented on HADOOP-6605:
-------------------------------------

bq. Why this shouldn't be in a one-time setup script rather than executed on 
every hadoop invocation?

Because the java installation may change between invocations, eg you may eg 
install java between invocations of the hadoop command, or you may remove one 
java installation and then install a new one and you don't want the old one 
(which is no longer present) cached anywhere. Eg

# exec hadoop  # fails due to lack of java
# yum install java-xyz
# exec hadoop  # now picks up java

This detection only kicks in if JAVA_HOME is not explicitly set elsewhere, if 
you want to always use a particular version of java, just set JAVA_HOME.

Any remaining technical objection?

> Add JAVA_HOME detection to hadoop-config
> ----------------------------------------
>
>                 Key: HADOOP-6605
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6605
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Chad Metcalf
>            Assignee: Eli Collins
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: HADOOP-6605.patch, hadoop-6605-1.patch
>
>
> The commands that source hadoop-config.sh currently bail with an error if 
> JAVA_HOME is not set. Let's detect JAVA_HOME (from a list of locations on 
> various OS types) if JAVA_HOME is not already set by hadoop-env.sh or the 
> environment. This way users don't have to manually configure it.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to