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 2011/03/11 03:45:14 UTC

svn commit: r1080430 - /hive/trunk/bin/hive

Author: nzhang
Date: Fri Mar 11 02:45:13 2011
New Revision: 1080430

URL: http://svn.apache.org/viewvc?rev=1080430&view=rev
Log:
HIVE-2039. remove hadoop version check from hive cli shell script (Joydeep Sen Sarma via Ning Zhang)

Modified:
    hive/trunk/bin/hive

Modified: hive/trunk/bin/hive
URL: http://svn.apache.org/viewvc/hive/trunk/bin/hive?rev=1080430&r1=1080429&r2=1080430&view=diff
==============================================================================
--- hive/trunk/bin/hive (original)
+++ hive/trunk/bin/hive Fri Mar 11 02:45:13 2011
@@ -156,13 +156,15 @@ if [ ! -f ${HADOOP} ]; then
 fi
 
 # Make sure we're using a compatible version of Hadoop
-hadoop_version=$($HADOOP version | awk '{if (NR == 1) {print $2;}}');
+if [ "x$HADOOP_VERSION" == "x" ]; then
+    HADOOP_VERSION=$($HADOOP version | awk '{if (NR == 1) {print $2;}}');
+fi
 
 # Save the regex to a var to workaround quoting incompatabilities
 # between Bash 3.1 and 3.2
 hadoop_version_re="^([[:digit:]]+)\.([[:digit:]]+)(\.([[:digit:]]+))?.*$"
 
-if [[ "$hadoop_version" =~ $hadoop_version_re ]]; then
+if [[ "$HADOOP_VERSION" =~ $hadoop_version_re ]]; then
     hadoop_major_ver=${BASH_REMATCH[1]}
     hadoop_minor_ver=${BASH_REMATCH[2]}
     hadoop_patch_ver=${BASH_REMATCH[4]}