From hcatalog-commits-return-608-apmail-incubator-hcatalog-commits-archive=incubator.apache.org@incubator.apache.org Mon Jan 16 20:12:34 2012 Return-Path: X-Original-To: apmail-incubator-hcatalog-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-hcatalog-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 599BFB200 for ; Mon, 16 Jan 2012 20:12:34 +0000 (UTC) Received: (qmail 93545 invoked by uid 500); 16 Jan 2012 20:12:34 -0000 Delivered-To: apmail-incubator-hcatalog-commits-archive@incubator.apache.org Received: (qmail 93519 invoked by uid 500); 16 Jan 2012 20:12:33 -0000 Mailing-List: contact hcatalog-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hcatalog-dev@incubator.apache.org Delivered-To: mailing list hcatalog-commits@incubator.apache.org Received: (qmail 93512 invoked by uid 99); 16 Jan 2012 20:12:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2012 20:12:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2012 20:12:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A57532388860; Mon, 16 Jan 2012 20:12:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1232139 - in /incubator/hcatalog/trunk: CHANGES.txt bin/hive-config.sh Date: Mon, 16 Jan 2012 20:12:12 -0000 To: hcatalog-commits@incubator.apache.org From: khorgath@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120116201212.A57532388860@eris.apache.org> Author: khorgath Date: Mon Jan 16 20:12:12 2012 New Revision: 1232139 URL: http://svn.apache.org/viewvc?rev=1232139&view=rev Log: HCATALOG-213 determine HIVE_CONF_DIR in hive-config.sh based on rpm or tar ball installs (arpitgupta via khorgath) Modified: incubator/hcatalog/trunk/CHANGES.txt incubator/hcatalog/trunk/bin/hive-config.sh Modified: incubator/hcatalog/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1232139&r1=1232138&r2=1232139&view=diff ============================================================================== --- incubator/hcatalog/trunk/CHANGES.txt (original) +++ incubator/hcatalog/trunk/CHANGES.txt Mon Jan 16 20:12:12 2012 @@ -99,6 +99,8 @@ Trunk (unreleased changes) OPTIMIZATIONS BUG FIXES + HCAT-213. determine HIVE_CONF_DIR in hive-config.sh based on rpm or tar ball installs (arpitgupta via khorgath) + HCAT-214. HCat commandline does not set location for config dir correctly (khorgath) HCAT-197. data generator for e2e assumes hadoop tarball installation (arpitgupta via khorgath) Modified: incubator/hcatalog/trunk/bin/hive-config.sh URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/bin/hive-config.sh?rev=1232139&r1=1232138&r2=1232139&view=diff ============================================================================== --- incubator/hcatalog/trunk/bin/hive-config.sh (original) +++ incubator/hcatalog/trunk/bin/hive-config.sh Mon Jan 16 20:12:12 2012 @@ -59,14 +59,19 @@ while [ $# -gt 0 ]; do # Until you ru esac done +#check if /etc/hcatalog/hcat-env.sh file exists in case of rpm installs +if [ -f "/etc/hcatalog/hcat-env.sh" ]; then + DEFAULT_CONF_DIR="/etc/hcatalog" +else + #assume that conf is in HIVE_HOME + DEFAULT_CONF_DIR="${HIVE_HOME}/conf" +fi # Allow alternate conf dir location. -HIVE_CONF_DIR="${HIVE_CONF_DIR:-$HIVE_HOME/conf}" +HIVE_CONF_DIR="${HIVE_CONF_DIR:-$DEFAULT_CONF_DIR}" export HIVE_CONF_DIR=$HIVE_CONF_DIR export HIVE_AUX_JARS_PATH=$HIVE_AUX_JARS_PATH # Default to use 256MB export HADOOP_HEAPSIZE=${HADOOP_HEAPSIZE:-256} - -