You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by rm...@apache.org on 2009/08/09 08:20:19 UTC

svn commit: r802493 - in /hadoop/hive/trunk: CHANGES.txt bin/ext/jar.sh

Author: rmurthy
Date: Sun Aug  9 06:20:19 2009
New Revision: 802493

URL: http://svn.apache.org/viewvc?rev=802493&view=rev
Log:
HIVE-617. Add 'jar' service to hive client shell.
(Edward Capriolo via rmurthy)


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

Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=802493&r1=802492&r2=802493&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Sun Aug  9 06:20:19 2009
@@ -198,6 +198,9 @@
     HIVE-736. Provide a function in Metastore to return the schema of a table.
     (Eric Hwang via rmurthy)
 
+    HIVE-617. Add 'jar' service to hive client shell.
+    (Edward Capriolo via rmurthy)
+
   OPTIMIZATIONS
 
     HIVE-279. Predicate Pushdown support (Prasad Chakka via athusoo).

Added: hadoop/hive/trunk/bin/ext/jar.sh
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/bin/ext/jar.sh?rev=802493&view=auto
==============================================================================
--- hadoop/hive/trunk/bin/ext/jar.sh (added)
+++ hadoop/hive/trunk/bin/ext/jar.sh Sun Aug  9 06:20:19 2009
@@ -0,0 +1,42 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+THISSERVICE=jar
+export SERVICE_LIST="${SERVICE_LIST}${THISSERVICE} "
+
+jar () {
+  RUNJAR=$1
+  shift
+
+  RUNCLASS=$1
+  shift
+
+  if [ -z "$RUNJAR" ] ; then
+    echo "RUNJAR not specified"
+    exit 3
+  fi
+
+  if [ -z "$RUNCLASS" ] ; then
+    echo "RUNCLASS not specified"
+    exit 3
+  fi
+
+  exec $HADOOP jar $AUX_JARS_CMD_LINE $RUNJAR $RUNCLASS $HIVE_OPTS "$@"
+}
+
+jar_help () {
+  echo "Used for applications that require Hadoop and Hive classpath and environment."
+  echo "./hive --service jar <yourjar> <yourclass> HIVE_OPTS <your_args>"
+}