hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r981005 - in /hadoop/hive/trunk: CHANGES.txt bin/ext/hwi.sh
Date Sat, 31 Jul 2010 05:16:13 GMT
Author: jvs
Date: Sat Jul 31 05:16:13 2010
New Revision: 981005

URL: http://svn.apache.org/viewvc?rev=981005&view=rev
Log:
HIVE-1294. HIVE_AUX_JARS_PATH interferes with startup of Hive Web
Interface
(Edward Capriolo via jvs)


Modified:
    hadoop/hive/trunk/CHANGES.txt
    hadoop/hive/trunk/bin/ext/hwi.sh

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=981005&r1=981004&r2=981005&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Sat Jul 31 05:16:13 2010
@@ -687,6 +687,10 @@ Release 0.6.0 -  Unreleased
     appears more than once on CLASSPATH
     (Carl Steinbach via jvs)
 
+    HIVE-1294. HIVE_AUX_JARS_PATH interferes with startup of Hive Web
+    Interface
+    (Edward Capriolo via jvs)
+
 Release 0.5.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/trunk/bin/ext/hwi.sh
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/bin/ext/hwi.sh?rev=981005&r1=981004&r2=981005&view=diff
==============================================================================
--- hadoop/hive/trunk/bin/ext/hwi.sh (original)
+++ hadoop/hive/trunk/bin/ext/hwi.sh Sat Jul 31 05:16:13 2010
@@ -24,8 +24,30 @@ hwi() {
     HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:$f
   done
 
+  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
+
   export HADOOP_CLASSPATH
-  exec $HADOOP jar $AUX_JARS_CMD_LINE ${HWI_JAR_FILE} $CLASS $HIVE_OPTS "$@"
+  
+  if [ $minor_ver -lt 20 ]; then
+    exec $HADOOP jar $AUX_JARS_CMD_LINE ${HWI_JAR_FILE} $CLASS $HIVE_OPTS "$@"
+  else
+    # hadoop 20 or newer - skip the aux_jars option and hiveconf
+    exec $HADOOP jar ${HWI_JAR_FILE} $CLASS $HIVE_OPTS "$@"
+  fi
   #nohup $HADOOP jar $AUX_JARS_CMD_LINE ${HWI_JAR_FILE} $CLASS $HIVE_OPTS "$@" >/dev/null
2>/dev/null &
 
 }



Mime
View raw message