You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Chad Metcalf (JIRA)" <ji...@apache.org> on 2010/03/02 02:40:08 UTC

[jira] Created: (HADOOP-6605) Improve JAVA_HOME detection and handling in hadoop-config

Improve JAVA_HOME detection and handling in hadoop-config
---------------------------------------------------------

                 Key: HADOOP-6605
                 URL: https://issues.apache.org/jira/browse/HADOOP-6605
             Project: Hadoop Common
          Issue Type: Improvement
    Affects Versions: 0.20.2
            Reporter: Chad Metcalf
            Assignee: Chad Metcalf


JAVA_HOME can be set in hadoop-env.sh and hadoop-config.sh should respect this. hadoop-config will source hadoop-env after it determines a config directory. If JAVA_HOME still isn't set, it will try to guess one from a list of Linux usual locations. If one still isn't set it will quit with a verbose error message.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6605) Improve JAVA_HOME detection and handling in hadoop-config

Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840623#action_12840623 ] 

Steve Loughran commented on HADOOP-6605:
----------------------------------------

# Unless there is a need for JDK stuff, all that's needed is java on the path. Maybe check for it being an odd java and warn if its an unsupported version (e.g. gcj), but even there, that gets annoying, like Log4J telling you off for not having a log4j config.
# Not happy with telling people to d/l from sun. It's oracle now, URLs have changed and anyway, well managed clusters don't have people downloading and installing by hand.


Ant's startup script is probably the most thorough in find-and-bind, handles cygwin, IBM JVMs, etc
[http://svn.apache.org/viewvc/ant/core/trunk/src/script/ant?view=markup]
but: people are scared of touching that code, it's brittle code that needs to be tested everywhere  before you can be sure you've made changes.

Adding this stuff is taking on maintenance problems, forever. I'd consider it very carefully.

> Improve JAVA_HOME detection and handling in hadoop-config
> ---------------------------------------------------------
>
>                 Key: HADOOP-6605
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6605
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.20.2
>            Reporter: Chad Metcalf
>            Assignee: Chad Metcalf
>         Attachments: HADOOP-6605.patch
>
>
> JAVA_HOME can be set in hadoop-env.sh and hadoop-config.sh should respect this. hadoop-config will source hadoop-env after it determines a config directory. If JAVA_HOME still isn't set, it will try to guess one from a list of Linux usual locations. If one still isn't set it will quit with a verbose error message.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6605) Improve JAVA_HOME detection and handling in hadoop-config

Posted by "Allen Wittenauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839966#action_12839966 ] 

Allen Wittenauer commented on HADOOP-6605:
------------------------------------------

Also, rather than make this Linux specific, adding /usr/jdk/instances/(version) to the detection and you'll get Solaris support.  I also notice that the patch already has Mac OS X.

It also just occurred to me that in the past there has been a very big reluctance to put OS specific fixes/changes in place.  I'm not sure if the community will take such a change here.

> Improve JAVA_HOME detection and handling in hadoop-config
> ---------------------------------------------------------
>
>                 Key: HADOOP-6605
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6605
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.20.2
>            Reporter: Chad Metcalf
>            Assignee: Chad Metcalf
>         Attachments: HADOOP-6605.patch
>
>
> JAVA_HOME can be set in hadoop-env.sh and hadoop-config.sh should respect this. hadoop-config will source hadoop-env after it determines a config directory. If JAVA_HOME still isn't set, it will try to guess one from a list of Linux usual locations. If one still isn't set it will quit with a verbose error message.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HADOOP-6605) Improve JAVA_HOME detection and handling in hadoop-config

Posted by "Chad Metcalf (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-6605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chad Metcalf updated HADOOP-6605:
---------------------------------

    Attachment: HADOOP-6605.patch

This patch only applies to 0.20.2 not trunk.

> Improve JAVA_HOME detection and handling in hadoop-config
> ---------------------------------------------------------
>
>                 Key: HADOOP-6605
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6605
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.20.2
>            Reporter: Chad Metcalf
>            Assignee: Chad Metcalf
>         Attachments: HADOOP-6605.patch
>
>
> JAVA_HOME can be set in hadoop-env.sh and hadoop-config.sh should respect this. hadoop-config will source hadoop-env after it determines a config directory. If JAVA_HOME still isn't set, it will try to guess one from a list of Linux usual locations. If one still isn't set it will quit with a verbose error message.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6605) Improve JAVA_HOME detection and handling in hadoop-config

Posted by "Allen Wittenauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839958#action_12839958 ] 

Allen Wittenauer commented on HADOOP-6605:
------------------------------------------

Why doesn't this try the java that is the path?   Why doesn't this verify that $JAVA_HOME/bin/java actually works? Shouldn't it verify that it found JDK6 or better? Why is the error message RH-based specific? Heck, why have the "please download" message at all?  

> Improve JAVA_HOME detection and handling in hadoop-config
> ---------------------------------------------------------
>
>                 Key: HADOOP-6605
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6605
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.20.2
>            Reporter: Chad Metcalf
>            Assignee: Chad Metcalf
>         Attachments: HADOOP-6605.patch
>
>
> JAVA_HOME can be set in hadoop-env.sh and hadoop-config.sh should respect this. hadoop-config will source hadoop-env after it determines a config directory. If JAVA_HOME still isn't set, it will try to guess one from a list of Linux usual locations. If one still isn't set it will quit with a verbose error message.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HADOOP-6605) Improve JAVA_HOME detection and handling in hadoop-config

Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-6605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840600#action_12840600 ] 

Steve Loughran commented on HADOOP-6605:
----------------------------------------

Which linux distros are we talking about here? 

> Improve JAVA_HOME detection and handling in hadoop-config
> ---------------------------------------------------------
>
>                 Key: HADOOP-6605
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6605
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.20.2
>            Reporter: Chad Metcalf
>            Assignee: Chad Metcalf
>         Attachments: HADOOP-6605.patch
>
>
> JAVA_HOME can be set in hadoop-env.sh and hadoop-config.sh should respect this. hadoop-config will source hadoop-env after it determines a config directory. If JAVA_HOME still isn't set, it will try to guess one from a list of Linux usual locations. If one still isn't set it will quit with a verbose error message.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.