hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khorg...@apache.org
Subject hive git commit: HIVE-10610 : hive command fails to get hadoop version (Shwetha G S via Sushanth Sowmyan)
Date Wed, 06 May 2015 17:58:54 GMT
Repository: hive
Updated Branches:
  refs/heads/master a9d70a039 -> 377ba4ba1


HIVE-10610 : hive command fails to get hadoop version (Shwetha G S via Sushanth Sowmyan)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/377ba4ba
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/377ba4ba
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/377ba4ba

Branch: refs/heads/master
Commit: 377ba4ba164d46ca91390d7d38c13e4e2fcda383
Parents: a9d70a0
Author: Sushanth Sowmyan <khorgath@gmail.com>
Authored: Wed May 6 10:58:08 2015 -0700
Committer: Sushanth Sowmyan <khorgath@gmail.com>
Committed: Wed May 6 10:58:50 2015 -0700

----------------------------------------------------------------------
 bin/hive | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/377ba4ba/bin/hive
----------------------------------------------------------------------
diff --git a/bin/hive b/bin/hive
index 50bd726..5dc93fb 100755
--- a/bin/hive
+++ b/bin/hive
@@ -201,7 +201,7 @@ fi
 
 # Make sure we're using a compatible version of Hadoop
 if [ "x$HADOOP_VERSION" == "x" ]; then
-    HADOOP_VERSION=$($HADOOP version | awk '{if (NR == 1) {print $2;}}');
+    HADOOP_VERSION=$($HADOOP version | awk -F"\t" '/Hadoop/ {print $0}' | cut -d' ' -f 2);
 fi
 
 # Save the regex to a var to workaround quoting incompatabilities


Mime
View raw message