hadoop-hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r995523 - in /hadoop/hive/branches/branch-0.6: CHANGES.txt bin/ext/jar.sh
Date Thu, 09 Sep 2010 18:03:46 GMT
Author: jvs
Date: Thu Sep  9 18:03:46 2010
New Revision: 995523

URL: http://svn.apache.org/viewvc?rev=995523&view=rev
Log:
HIVE-1613. hive --service jar looks for hadoop version but was not
defined
(Edward Capriolo via jvs)


Modified:
    hadoop/hive/branches/branch-0.6/CHANGES.txt
    hadoop/hive/branches/branch-0.6/bin/ext/jar.sh

Modified: hadoop/hive/branches/branch-0.6/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.6/CHANGES.txt?rev=995523&r1=995522&r2=995523&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.6/CHANGES.txt (original)
+++ hadoop/hive/branches/branch-0.6/CHANGES.txt Thu Sep  9 18:03:46 2010
@@ -596,6 +596,10 @@ Release 0.6.0 -  Unreleased
     HIVE-1594. Typo of hive.merge.size.smallfiles.avgsize prevents
     change of value. (Yun Huang Yong via namit)
 
+    HIVE-1613. hive --service jar looks for hadoop version but was not
+    defined
+    (Edward Capriolo via jvs)
+
 Release 0.5.0 -  Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/hive/branches/branch-0.6/bin/ext/jar.sh
URL: http://svn.apache.org/viewvc/hadoop/hive/branches/branch-0.6/bin/ext/jar.sh?rev=995523&r1=995522&r2=995523&view=diff
==============================================================================
--- hadoop/hive/branches/branch-0.6/bin/ext/jar.sh (original)
+++ hadoop/hive/branches/branch-0.6/bin/ext/jar.sh Thu Sep  9 18:03:46 2010
@@ -23,6 +23,27 @@ jar () {
   RUNCLASS=$1
   shift
 
+  if $cygwin; then
+    HIVE_LIB=`cygpath -w "$HIVE_LIB"`
+  fi
+
+  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 [ -z "$RUNJAR" ] ; then
     echo "RUNJAR not specified"
     exit 3



Mime
View raw message