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

Leslin (Hong Xiang Lin) edited comment on FLUME-1154 at 6/22/12 3:16 PM:
-------------------------------------------------------------------------

Hi, Will

Thanks so much for giving me such a good chance! 
I updated with your comments. and add patch in review board: 
https://reviews.apache.org/r/5466/diff/4/
I have already used --no-prefix in previous patches. My command like: 
git diff --no-prefix trunk > /home/leslin/flume-patch/FLUME-1154_4.patch

Please feel free to let me know if any more update. Thank you!

Regards
Leslin
                
      was (Author: leslin123):
    Hi, Will

Thanks so much for giving me such a good chance! 
I updated with your comments. and add patch in review board: 
I have already used --no-prefix in previous patches. My command like: 
git diff --no-prefix trunk > /home/leslin/flume-patch/FLUME-1154_4.patch

Please feel free to let me know if any more update. Thank you!

Regards
Leslin
                  
> flume-ng script should first try finding java from PATH and then try using 
> bigtop, instead of vice-versa
> --------------------------------------------------------------------------------------------------------
>
>                 Key: FLUME-1154
>                 URL: https://issues.apache.org/jira/browse/FLUME-1154
>             Project: Flume
>          Issue Type: Bug
>          Components: Shell
>    Affects Versions: v1.2.0
>            Reporter: Will McQueen
>            Assignee: Leslin (Hong Xiang Lin)
>             Fix For: v1.2.0
>
>         Attachments: FLUME-1154.patch, FLUME-1154_1.patch, 
> FLUME-1154_2.patch, FLUME-1154_3.patch, FLUME-1154_4.patch
>
>
> Please see bin/flume-ng script, under the "#find java" section.
> It says:
> # find java
> if [ -z "${JAVA_HOME}" ] ; then
>   echo "Warning: JAVA_HOME not set!"
>   # Try to use Bigtop to autodetect JAVA_HOME if it's available
>   if [ -e /usr/libexec/bigtop-detect-javahome ]; then
>     . /usr/libexec/bigtop-detect-javahome
>   elif [ -e /usr/lib/bigtop-utils/bigtop-detect-javahome ]; then
>     . /usr/lib/bigtop-utils/bigtop-detect-javahome
>   else
>     JAVA_DEFAULT=`type -p java`
>     [ -n "$JAVA_DEFAULT" ] || error "Unable to find java executable. Is it in 
> your PATH?" 1
>     JAVA_HOME=$(cd $(dirname $JAVA_DEFAULT)/..; pwd)
>   fi
> fi
> [ -n "${JAVA_HOME}" ] || error "Unable to find a suitable JAVA_HOME" 1
> ...and this means that if bigtop-detect-javahome was unable to located a java 
> executable. This could happen if the user stores the JDK under his/her own 
> dir in something like /home/<user>/tools/jdk1.6.0_26. The user could have the 
> JDK bin dir in his/her path, but may not necessarily have set JAVA_HOME. If 
> there are no other JDK's available for bigtop-utils to detect, then the 
> current flume-ng script will fail with error saying "Unable to find a 
> suitable JAVA_HOME", even though the java executable was in the PATH.
> So, I recommend doing the "type -p java" check first, and if that results in 
> no match then try bigtop-detect-javahome.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to