You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by xu...@apache.org on 2015/10/28 13:11:29 UTC

[36/55] [abbrv] hive git commit: HIVE-12246: Orc FileDump fails with Missing CLI jar (Prasanth Jayachandran reviewed by Ferdinand Xu)

HIVE-12246: Orc FileDump fails with Missing CLI jar (Prasanth Jayachandran reviewed by Ferdinand Xu)


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

Branch: refs/heads/spark
Commit: 383d1ccc8343168189e8aca97b7e247bdb000cd3
Parents: 2a0ea58
Author: Prasanth Jayachandran <j....@gmail.com>
Authored: Mon Oct 26 11:37:27 2015 -0500
Committer: Prasanth Jayachandran <j....@gmail.com>
Committed: Mon Oct 26 11:37:27 2015 -0500

----------------------------------------------------------------------
 bin/ext/util/execHiveCmd.sh | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/383d1ccc/bin/ext/util/execHiveCmd.sh
----------------------------------------------------------------------
diff --git a/bin/ext/util/execHiveCmd.sh b/bin/ext/util/execHiveCmd.sh
index e46ec3c..9a06ce0 100644
--- a/bin/ext/util/execHiveCmd.sh
+++ b/bin/ext/util/execHiveCmd.sh
@@ -13,15 +13,28 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+CLI_JAR="hive-cli-*.jar"
+BEELINE_JAR="hive-beeline-*.jar"
+
 execHiveCmd () {
   CLASS=$1;
   shift;
-  JAR=$1
-  shift;
+
+  # if jar is not passed as parameter use corresponding cli jar
+  if [ "$1" == "$CLI_JAR" ] || [ "$1" == "$BEELINE_JAR" ]; then
+    JAR="$1"
+    shift;
+  else
+    if [ "$USE_DEPRECATED_CLI" == "true" ]; then
+      JAR="$CLI_JAR"
+    else
+      JAR="$BEELINE_JAR"
+    fi
+  fi
 
   # cli specific code
   if [ ! -f ${HIVE_LIB}/$JAR ]; then
-    echo "Missing Hive CLI Jar"
+    echo "Missing $JAR Jar"
     exit 3;
   fi