You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by nz...@apache.org on 2010/08/09 05:46:38 UTC
svn commit: r983517 - in /hadoop/hive/trunk: CHANGES.txt
bin/ext/util/execHiveCmd.sh bin/hive build.xml conf/hive-env.sh.template
Author: nzhang
Date: Mon Aug 9 03:46:38 2010
New Revision: 983517
URL: http://svn.apache.org/viewvc?rev=983517&view=rev
Log:
HIVE-1513. hive starter scripts should load admin/user supplied script for configurability (Joydeep Sen Sarma via Ning Zhang)
Added:
hadoop/hive/trunk/conf/hive-env.sh.template
Modified:
hadoop/hive/trunk/CHANGES.txt
hadoop/hive/trunk/bin/ext/util/execHiveCmd.sh
hadoop/hive/trunk/bin/hive
hadoop/hive/trunk/build.xml
Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=983517&r1=983516&r2=983517&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Mon Aug 9 03:46:38 2010
@@ -61,6 +61,10 @@ Trunk - Unreleased
HIVE-1229. Replace dependencies on HBase deprecated API.
(Basab Maulik via jvs)
+ HIVE-1513. hive starter scripts should load admin/user supplied script for
+ configurability
+ (Joydeep Sen Sarma via Ning Zhang)
+
OPTIMIZATIONS
BUG FIXES
Modified: hadoop/hive/trunk/bin/ext/util/execHiveCmd.sh
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/bin/ext/util/execHiveCmd.sh?rev=983517&r1=983516&r2=983517&view=diff
==============================================================================
--- hadoop/hive/trunk/bin/ext/util/execHiveCmd.sh (original)
+++ hadoop/hive/trunk/bin/ext/util/execHiveCmd.sh Mon Aug 9 03:46:38 2010
@@ -29,10 +29,6 @@ execHiveCmd () {
exit 6
fi
- # increase the threashold for large queries
- HADOOP_HEAPSIZE=4096
- HADOOP_OPTS="$HADOOP_OPTS -XX:-UseGCOverheadLimit"
-
if [ $minor_ver -lt 20 ]; then
exec $HADOOP jar $AUX_JARS_CMD_LINE ${HIVE_LIB}/hive-cli-*.jar $CLASS $HIVE_OPTS "$@"
else
Modified: hadoop/hive/trunk/bin/hive
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/bin/hive?rev=983517&r1=983516&r2=983517&view=diff
==============================================================================
--- hadoop/hive/trunk/bin/hive (original)
+++ hadoop/hive/trunk/bin/hive Mon Aug 9 03:46:38 2010
@@ -25,6 +25,41 @@ bin=`cd "$bin"; pwd`
. "$bin"/hive-config.sh
+SERVICE=""
+HELP=""
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --service)
+ shift
+ SERVICE=$1
+ shift
+ ;;
+ --rcfilecat)
+ SERVICE=rcfilecat
+ shift
+ ;;
+ --help)
+ HELP=_help
+ shift
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
+if [ "$SERVICE" = "" ] ; then
+ if [ "$HELP" = "_help" ] ; then
+ SERVICE="help"
+ else
+ SERVICE="cli"
+ fi
+fi
+
+if [ -f "${HIVE_CONF_DIR}/hive-env.sh" ]; then
+ . "${HIVE_CONF_DIR}/hive-env.sh"
+fi
+
CLASSPATH="${HIVE_CONF_DIR}"
HIVE_LIB=${HIVE_HOME}/lib
@@ -135,37 +170,6 @@ for i in "$bin"/ext/util/*.sh ; do
. $i
done
-SERVICE=""
-HELP=""
-while [ $# -gt 0 ]; do
- case "$1" in
- --service)
- shift
- SERVICE=$1
- shift
- ;;
- --rcfilecat)
- SERVICE=rcfilecat
- shift
- ;;
- --help)
- HELP=_help
- shift
- ;;
- *)
- break
- ;;
- esac
-done
-
-if [ "$SERVICE" = "" ] ; then
- if [ "$HELP" = "_help" ] ; then
- SERVICE="help"
- else
- SERVICE="cli"
- fi
-fi
-
TORUN=""
for j in $SERVICE_LIST ; do
if [ "$j" = "$SERVICE" ] ; then
Modified: hadoop/hive/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/build.xml?rev=983517&r1=983516&r2=983517&view=diff
==============================================================================
--- hadoop/hive/trunk/build.xml (original)
+++ hadoop/hive/trunk/build.xml Mon Aug 9 03:46:38 2010
@@ -256,7 +256,10 @@
</filterset>
</copy>
<copy todir="${target.conf.dir}">
- <fileset dir="${basedir}/conf" includes="*.properties"/>
+ <fileset dir="${basedir}/conf">
+ <include name="*.properties"/>
+ <include name="*.template"/>
+ </fileset>
</copy>
<!-- Create php thrift package -->
<copy todir="${target.lib.dir}/php">
Added: hadoop/hive/trunk/conf/hive-env.sh.template
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/conf/hive-env.sh.template?rev=983517&view=auto
==============================================================================
--- hadoop/hive/trunk/conf/hive-env.sh.template (added)
+++ hadoop/hive/trunk/conf/hive-env.sh.template Mon Aug 9 03:46:38 2010
@@ -0,0 +1,34 @@
+# Set Hive and Hadoop environment variables here. These variables can be used
+# to control the execution of Hive. It should be used by admins to configure
+# the Hive installation (so that users do not have to set environment variables
+# or set command line parameters to get correct behavior).
+#
+# The hive service being invoked (CLI/HWI etc.) is available via the environment
+# variable SERVICE
+
+
+# Hive Client memory usage can be an issue if a large number of clients
+# are running at the same time. The flags below have been useful in
+# reducing memory usage:
+#
+# if [ "$SERVICE" = "cli" ]; then
+# export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:+UseParNewGC -XX:-UseGCOverheadLimit"
+# fi
+
+# The heap size of the jvm stared by hive shell script can be controlled via:
+#
+# export HADOOP_HEAPSIZE=1024
+#
+# Larger heap size may be required when running queries over large number of files or partitions.
+# By default hive shell scripts use a heap size of 256 (MB). Larger heap size would also be
+# appropriate for hive server (hwi etc).
+
+
+# Set HADOOP_HOME to point to a specific hadoop install directory
+# HADOOP_HOME=${bin}/../../hadoop
+
+# Hive Configuration Directory can be controlled by:
+# export HIVE_CONF_DIR=
+
+# Folder containing extra ibraries required for hive compilation/execution can be controlled by:
+# export HIVE_AUX_JARS_PATH=