Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0416B77D4 for ; Tue, 23 Aug 2011 22:37:53 +0000 (UTC) Received: (qmail 98323 invoked by uid 500); 23 Aug 2011 22:37:52 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 98301 invoked by uid 500); 23 Aug 2011 22:37:52 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 98275 invoked by uid 99); 23 Aug 2011 22:37:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2011 22:37:52 +0000 X-ASF-Spam-Status: No, hits=-2000.9 required=5.0 tests=ALL_TRUSTED,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; Tue, 23 Aug 2011 22:37:50 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 35982CC7B0 for ; Tue, 23 Aug 2011 22:37:29 +0000 (UTC) Date: Tue, 23 Aug 2011 22:37:29 +0000 (UTC) From: "Roman Shaposhnik (JIRA)" To: issues@hbase.apache.org Message-ID: <439998595.7148.1314139049216.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <533920660.6177.1314125909081.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HBASE-4243) HADOOP_HOME should be auto-detected 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/HBASE-4243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roman Shaposhnik updated HBASE-4243: ------------------------------------ Status: Patch Available (was: Open) Here's the basic code. I can always add echoing the value that we auto-discover, but wouldn't it make hbase CLI script too verbose? Please let me know. > HADOOP_HOME should be auto-detected > ----------------------------------- > > Key: HBASE-4243 > URL: https://issues.apache.org/jira/browse/HBASE-4243 > Project: HBase > Issue Type: Improvement > Reporter: Roman Shaposhnik > Priority: Minor > Attachments: HBASE-4243.patch.txt > > > Now that HBASE-3465 has been integrated, perhaps we should try to auto-detect the HADOOP_HOME setting if it is not given explicitly. Something along the lines of: > {noformat} > # check for hadoop in the path > 141 HADOOP_IN_PATH=`which hadoop 2>/dev/null` > 142 if [ -f ${HADOOP_IN_PATH} ]; then > 143 HADOOP_DIR=`dirname "$HADOOP_IN_PATH"`/.. > 144 fi > 145 # HADOOP_HOME env variable overrides hadoop in the path > 146 HADOOP_HOME=${HADOOP_HOME:-$HADOOP_DIR} > 147 if [ "$HADOOP_HOME" == "" ]; then > 148 echo "Cannot find hadoop installation: \$HADOOP_HOME must be set or hadoop must be in the path"; > 149 exit 4; > 150 fi > {noformat} > Thoughts? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira