Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E8426E84 for ; Wed, 18 May 2011 18:15:30 +0000 (UTC) Received: (qmail 22069 invoked by uid 500); 18 May 2011 18:15:30 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 22019 invoked by uid 500); 18 May 2011 18:15:30 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 21909 invoked by uid 99); 18 May 2011 18:15:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2011 18:15:30 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2011 18:15:27 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 90D1ACFE49 for ; Wed, 18 May 2011 18:14:47 +0000 (UTC) Date: Wed, 18 May 2011 18:14:47 +0000 (UTC) From: "Eli Collins (JIRA)" To: common-issues@hadoop.apache.org Message-ID: <1977164801.23117.1305742487589.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HADOOP-6605) Add JAVA_HOME detection to hadoop-config MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-6605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035537#comment-13035537 ] Eli Collins commented on HADOOP-6605: ------------------------------------- Allen raised some good questions earlier... bq. Why doesn't this try the java that is the path? I assume you mean that if java is in the path it could infer JAVA_HOME by looking at the parent of the containing directory. That's reasonable, think it would make sense to do this in addition to looking in standard locations (since we do care about the java we're looking for). If you feel strongly I can incorporate that into this change. bq. Why doesn't this verify that $JAVA_HOME/bin/java actually works? I think it's OK to assume that the java installed in java home works. bq. Shouldn't it verify that it found JDK6 or better? That would be a good improvement, it also needs to check for Sun-compatible Java since Hadoop currently depends on Sun-specific classes. Let's handle this in a separate jira. bq. Why is the error message RH-based specific? Heck, why have the "please download" message at all? You're right, it shouldn't be. The latest patch is just a sligh modification to the current error message. > 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