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 68A2B952A for ; Sat, 3 Mar 2012 17:00:19 +0000 (UTC) Received: (qmail 13681 invoked by uid 500); 3 Mar 2012 17:00:19 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 13641 invoked by uid 500); 3 Mar 2012 17:00:19 -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 13633 invoked by uid 99); 3 Mar 2012 17:00:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Mar 2012 17:00:19 +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; Sat, 03 Mar 2012 17:00:18 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 07623604B for ; Sat, 3 Mar 2012 16:59:58 +0000 (UTC) Date: Sat, 3 Mar 2012 16:59:58 +0000 (UTC) From: "stack (Resolved) (JIRA)" To: issues@hbase.apache.org Message-ID: <1470965794.18404.1330793998031.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1288163559.82229.1327604022070.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (HBASE-5286) bin/hbase's logic of adding Hadoop jar files to the classpath is fragile when presented with split packaged Hadoop 0.23 installation 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-5286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] stack resolved HBASE-5286. -------------------------- Resolution: Fixed Fix Version/s: 0.94.0 0.92.1 Hadoop Flags: Reviewed I tried it. Works. Default codepath unaffected. Committed to 0.94, 0.92, and trunk. Thanks for the patch Roman. > bin/hbase's logic of adding Hadoop jar files to the classpath is fragile when presented with split packaged Hadoop 0.23 installation > ------------------------------------------------------------------------------------------------------------------------------------ > > Key: HBASE-5286 > URL: https://issues.apache.org/jira/browse/HBASE-5286 > Project: HBase > Issue Type: Bug > Components: scripts > Affects Versions: 0.92.0 > Reporter: Roman Shaposhnik > Assignee: Roman Shaposhnik > Fix For: 0.92.1, 0.94.0 > > Attachments: HBASE-5286.patch.txt > > > Here's the bit from bin/hbase that might need TLC now that Hadoop can be spotted in the wild in split-package configuration: > {noformat} > #If avail, add Hadoop to the CLASSPATH and to the JAVA_LIBRARY_PATH > if [ ! -z $HADOOP_HOME ]; then > HADOOPCPPATH="" > if [ -z $HADOOP_CONF_DIR ]; then > HADOOPCPPATH=$(append_path "${HADOOPCPPATH}" "${HADOOP_HOME}/conf") > else > HADOOPCPPATH=$(append_path "${HADOOPCPPATH}" "${HADOOP_CONF_DIR}") > fi > if [ "`echo ${HADOOP_HOME}/hadoop-core*.jar`" != "${HADOOP_HOME}/hadoop-core*.jar" ] ; then > HADOOPCPPATH=$(append_path "${HADOOPCPPATH}" `ls ${HADOOP_HOME}/hadoop-core*.jar | head -1`) > else > HADOOPCPPATH=$(append_path "${HADOOPCPPATH}" `ls ${HADOOP_HOME}/hadoop-common*.jar | head -1`) > HADOOPCPPATH=$(append_path "${HADOOPCPPATH}" `ls ${HADOOP_HOME}/hadoop-hdfs*.jar | head -1`) > HADOOPCPPATH=$(append_path "${HADOOPCPPATH}" `ls ${HADOOP_HOME}/hadoop-mapred*.jar | head -1`) > fi > {noformat} > There's a couple of issues with the above code: > 0. HADOOP_HOME is now deprecated in Hadoop 0.23 > 1. the list of jar files added to the class-path should be revised > 2. we need to figure out a more robust way to get the jar files that are needed to the classpath (things like hadoop-mapred*.jar tend to match src/test jars as well) > Better yet, it would be useful to look into whether we can transition HBase's bin/hbase onto using bin/hadoop as a launcher script instead of direct JAVA invocations (Pig, Hive, Sqoop and Mahout already do that) -- 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