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}
-
-