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 "Daryn Sharp (JIRA)" <ji...@apache.org> on 2011/03/22 19:34:06 UTC

[jira] [Created] (HADOOP-7205) automatically determine JAVA_HOME on OS X

automatically determine JAVA_HOME on OS X
-----------------------------------------

                 Key: HADOOP-7205
                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
             Project: Hadoop Common
          Issue Type: Improvement
    Affects Versions: 0.22.0
            Reporter: Daryn Sharp
            Assignee: Daryn Sharp
             Fix For: 0.23.0


OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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

[jira] [Commented] (HADOOP-7205) automatically determine JAVA_HOME on OS X

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

Hadoop QA commented on HADOOP-7205:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12474321/HADOOP-7205.patch
  against trunk revision 1094750.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    -1 patch.  The patch command could not apply the patch.

Console output: https://hudson.apache.org/hudson/job/PreCommit-HADOOP-Build/356//console

This message is automatically generated.

> automatically determine JAVA_HOME on OS X
> -----------------------------------------
>
>                 Key: HADOOP-7205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>            Priority: Trivial
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7205.patch
>
>
> OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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

[jira] [Commented] (HADOOP-7205) automatically determine JAVA_HOME on OS X

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

Daryn Sharp commented on HADOOP-7205:
-------------------------------------

Point taken, I understand the concern, and I was not aware of this policy.  I was following the motto "when in Rome, do as the Romans do".  It's a standard practice on OS X to use java_home to get the user's selected jvm.  The release notes that announce the deprecation of apple's jvms recommends the use of java_home so it's unlikely to disappear(*).  If the command did disappear, nothing would break with this patch.

Since I'm not aware of history of this policy, may I suggest that the env script sources another env script (only if it exists) that is determined based on uname?  That will compartmentalize os specific logic while retaining certain luxuries expected on each OS.

(*)http://developer.apple.com/library/mac/#releasenotes/Java/JavaSnowLeopardUpdate3LeopardUpdate8RN/NewandNoteworthy/NewandNoteworthy.html



> automatically determine JAVA_HOME on OS X
> -----------------------------------------
>
>                 Key: HADOOP-7205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>            Priority: Trivial
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7205.patch
>
>
> OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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

[jira] [Updated] (HADOOP-7205) automatically determine JAVA_HOME on OS X

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

Daryn Sharp updated HADOOP-7205:
--------------------------------

    Status: Patch Available  (was: Open)

> automatically determine JAVA_HOME on OS X
> -----------------------------------------
>
>                 Key: HADOOP-7205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7205.patch
>
>
> OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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

[jira] [Updated] (HADOOP-7205) automatically determine JAVA_HOME on OS X

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

Eli Collins updated HADOOP-7205:
--------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

This dupes HADOOP-6605, which handles java detection via looking for specific, standard java home's for various versions of Java (which may be used across OS types) rather than use an os-specific detection method (java_home in OSX). 

Agree with Allen that we avoid OS-specific changes when possible. There are places which care about host-specific and java-specific issues and these may require some host-specific/java-specific changes.

> automatically determine JAVA_HOME on OS X
> -----------------------------------------
>
>                 Key: HADOOP-7205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>            Priority: Trivial
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7205.patch
>
>
> OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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

[jira] [Commented] (HADOOP-7205) automatically determine JAVA_HOME on OS X

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

Allen Wittenauer commented on HADOOP-7205:
------------------------------------------

-1

a) We've been avoiding OS-specific changes in the shells for a very long time, including one to autodetect Java on various Linux distributions.  I see no reason to reverse this now.  I've said it before and I'll say it again:  stuff like this should really go into an installer that modifies hadoop-env.sh, not part of the base executable.

b) Given that Java is moving from Apple controlled to Oracle controlled on OS X, there is a very good chance this command will disappear in a future release.

> automatically determine JAVA_HOME on OS X
> -----------------------------------------
>
>                 Key: HADOOP-7205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7205.patch
>
>
> OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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

[jira] [Updated] (HADOOP-7205) automatically determine JAVA_HOME on OS X

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

Daryn Sharp updated HADOOP-7205:
--------------------------------

    Attachment:     (was: HADOOP-7205.patch)

> automatically determine JAVA_HOME on OS X
> -----------------------------------------
>
>                 Key: HADOOP-7205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7205.patch
>
>
> OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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

[jira] [Closed] (HADOOP-7205) automatically determine JAVA_HOME on OS X

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

Eli Collins closed HADOOP-7205.
-------------------------------


> automatically determine JAVA_HOME on OS X
> -----------------------------------------
>
>                 Key: HADOOP-7205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>            Priority: Trivial
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7205.patch
>
>
> OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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

[jira] [Updated] (HADOOP-7205) automatically determine JAVA_HOME on OS X

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

Daryn Sharp updated HADOOP-7205:
--------------------------------

    Attachment: HADOOP-7205.patch

> automatically determine JAVA_HOME on OS X
> -----------------------------------------
>
>                 Key: HADOOP-7205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7205.patch
>
>
> OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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

[jira] [Updated] (HADOOP-7205) automatically determine JAVA_HOME on OS X

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

Daryn Sharp updated HADOOP-7205:
--------------------------------

    Attachment: HADOOP-7205.patch

> automatically determine JAVA_HOME on OS X
> -----------------------------------------
>
>                 Key: HADOOP-7205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7205.patch
>
>
> OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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

[jira] [Updated] (HADOOP-7205) automatically determine JAVA_HOME on OS X

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

Allen Wittenauer updated HADOOP-7205:
-------------------------------------

    Priority: Trivial  (was: Major)

> automatically determine JAVA_HOME on OS X
> -----------------------------------------
>
>                 Key: HADOOP-7205
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7205
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 0.22.0
>            Reporter: Daryn Sharp
>            Assignee: Daryn Sharp
>            Priority: Trivial
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7205.patch
>
>
> OS X provides a java_home command that will return the user's selected jvm.  The hadoop-env.sh should use this command if JAVA_HOME is not set.

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