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

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

bq. a) we're getting into platform specific code without a good reason

The motivation is that users don't shouldn't have to manually set an 
environment variable that we can detect automatically. Multiple users have 
requested this. Why is this not a good reason? We make improvements both for 
new users (who want an easier out of the box experience) and experienced admins 
(who will manually configure HADOOP_HOME).

bq. b) this could have significant performance ramifications as we add more and 
more paths to support more and more OSes

How so?  The new code *only* executes if HADOOP_HOME is not already set, and 
the code just checks for the existence of bin/java in a set of directories, it 
bails as soon as it finds one. This is not an expensive operation.

bq. c) there is a config option to specifically eliminate the need to do this

The existence of a configuration parameter does not mean we're not allowed to 
try to detect a reasonable default if it's not set. We also automatically set a 
default MAX_HEAP_SIZE and let users override it, this is not different.

> 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