You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by zs...@apache.org on 2010/01/29 00:34:12 UTC
svn commit: r904303 - in /hadoop/hive/trunk: CHANGES.txt bin/ext/help.sh
bin/ext/metastore.sh
Author: zshao
Date: Thu Jan 28 23:34:11 2010
New Revision: 904303
URL: http://svn.apache.org/viewvc?rev=904303&view=rev
Log:
HIVE-1105. Add service script for starting metastore server. (John Sichi via zshao)
Added:
hadoop/hive/trunk/bin/ext/metastore.sh
Modified:
hadoop/hive/trunk/CHANGES.txt
hadoop/hive/trunk/bin/ext/help.sh
Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=904303&r1=904302&r2=904303&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Thu Jan 28 23:34:11 2010
@@ -34,6 +34,9 @@
HIVE-1112. Replace instances of StringBuffer and Vector with StringBuilder
and ArrayList. (Carl Steinbach via zshao)
+ HIVE-1105. Add service script for starting metastore server.
+ (John Sichi via zshao)
+
OPTIMIZATIONS
BUG FIXES
Modified: hadoop/hive/trunk/bin/ext/help.sh
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/bin/ext/help.sh?rev=904303&r1=904302&r2=904303&view=diff
==============================================================================
--- hadoop/hive/trunk/bin/ext/help.sh (original)
+++ hadoop/hive/trunk/bin/ext/help.sh Thu Jan 28 23:34:11 2010
@@ -3,11 +3,11 @@
help() {
echo "Usage ./hive <parameters> --service serviceName <service parameters>"
- echo "Service List: $SERVICE_LIST"
+ echo "Service List: $SERVICE_LIST"
echo "Parameters parsed:"
- echo " --auxpath : Auxillary jars "
+ echo " --auxpath : Auxillary jars "
echo " --config : Hive configuration directory"
- echo " --serivce : Starts specific service/component. cli is default"
+ echo " --service : Starts specific service/component. cli is default"
echo "Parameters used:"
echo " HADOOP_HOME : Hadoop install directory"
echo " HIVE_OPT : Hive options"
Added: hadoop/hive/trunk/bin/ext/metastore.sh
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/bin/ext/metastore.sh?rev=904303&view=auto
==============================================================================
--- hadoop/hive/trunk/bin/ext/metastore.sh (added)
+++ hadoop/hive/trunk/bin/ext/metastore.sh Thu Jan 28 23:34:11 2010
@@ -0,0 +1,41 @@
+THISSERVICE=metastore
+export SERVICE_LIST="${SERVICE_LIST}${THISSERVICE} "
+
+metastore() {
+ echo "Starting Hive Metastore Server"
+ CLASS=org.apache.hadoop.hive.metastore.HiveMetaStore
+ if $cygwin; then
+ HIVE_LIB=`cygpath -w "$HIVE_LIB"`
+ fi
+ JAR=${HIVE_LIB}/hive-service-*.jar
+
+ version=$($HADOOP version | awk '{if (NR == 1) {print $2;}}');
+
+ # Save the regex to a var to workaround quoting incompatabilities
+ # between Bash 3.1 and 3.2
+ version_re="^([[:digit:]]+)\.([[:digit:]]+)(\.([[:digit:]]+))?.*$"
+
+ if [[ "$version" =~ $version_re ]]; then
+ major_ver=${BASH_REMATCH[1]}
+ minor_ver=${BASH_REMATCH[2]}
+ patch_ver=${BASH_REMATCH[4]}
+ else
+ echo "Unable to determine Hadoop version information."
+ echo "'hadoop version' returned:"
+ echo `$HADOOP version`
+ exit 6
+ fi
+
+ if [ $minor_ver -lt 20 ]; then
+ exec $HADOOP jar $AUX_JARS_CMD_LINE $JAR $CLASS $METASTORE_PORT "$@"
+ else
+ # hadoop 20 or newer - skip the aux_jars option and hiveconf
+ exec $HADOOP jar $JAR $CLASS $METASTORE_PORT "$@"
+ fi
+}
+
+metastore_help() {
+ echo "usage METASTORE_PORT=xxxx ./hive --service metastore"
+ echo " METASTORE_PORT : Specify the metastore server port"
+}
+