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

Steve Loughran commented on BIGTOP-25:
--------------------------------------

This is surprisingly hard, especially if you want to find a full JDK, rather 
than just a JRE. It is a painful bootstrapping problem, along with that of 
deciding which is the JDK to use.

As it's pre-Java-boot-phase, it ends up being shell script, and then you fall 
into the differences between bash, Unix sh, cygwin, OS/X.

What might be good would be to say "use Python" (or similar) for all 
shell-level operations, so we have a language for the shell-level code that is 
both standard across platforms and human-readable. The java_home detection 
could be moved to a python class, and others added, along with tests. 

Another thing to consider is having some RPMs/Debs that explicitly bond to 
openjdk, oraclejdk or others; people install the one they want. The problem 
with this approach is that you end up creating two exclusive packages, and that 
complicates package deployment testing

> Standardize JAVA_HOME detection
> -------------------------------
>
>                 Key: BIGTOP-25
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-25
>             Project: Bigtop
>          Issue Type: Bug
>            Reporter: Roman Shaposhnik
>            Assignee: Roman Shaposhnik
>            Priority: Minor
>
> The Hadoop packages go through some effort (see 
> /usr/lib/hadoop-0.20/bin/hadoop-config.sh) to guess at a good JVM to use if 
> JAVA_HOME isn't set. For example, if both OpenJDK and Oracle JDK are 
> installed, hadoop-config.sh will choose Oracle every time. Other packages 
> that Bigtop integrates, don't follow the same practice (ZK, Pig, etc.). It 
> would be nice to have this common code shared.

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

        

Reply via email to