blob: 08dd8c77d7a3b3dc4f60da0058f9adb32cfbcbe4 [file] [log] [blame]
Till Westmann276bbc22013-06-05 18:56:27 -07001#/*
2# Copyright 2009-2013 by The Regents of the University of California
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# you may obtain a copy of the License from
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#*/
buyingyic73348c2012-11-02 00:31:31 +000015# Licensed to the Apache Software Foundation (ASF) under one or more
16# contributor license agreements. See the NOTICE file distributed with
17# this work for additional information regarding copyright ownership.
18# The ASF licenses this file to You under the Apache License, Version 2.0
19# (the "License"); you may not use this file except in compliance with
20# the License. You may obtain a copy of the License at
21#
22# http://www.apache.org/licenses/LICENSE-2.0
23#
24# Unless required by applicable law or agreed to in writing, software
25# distributed under the License is distributed on an "AS IS" BASIS,
26# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27# See the License for the specific language governing permissions and
28# limitations under the License.
29
30THISSERVICE=jar
31export SERVICE_LIST="${SERVICE_LIST}${THISSERVICE} "
32
33jar () {
34 RUNJAR=$1
35 shift
36
37 RUNCLASS=$1
38 shift
39
40 if $cygwin; then
41 HIVE_LIB=`cygpath -w "$HIVE_LIB"`
42 fi
43
44 if [ -z "$RUNJAR" ] ; then
45 echo "RUNJAR not specified"
46 exit 3
47 fi
48
49 if [ -z "$RUNCLASS" ] ; then
50 echo "RUNCLASS not specified"
51 exit 3
52 fi
53
54 # hadoop 20 or newer - skip the aux_jars option and hiveconf
55 exec $HADOOP jar $RUNJAR $RUNCLASS $HIVE_OPTS "$@"
56}
57
58jar_help () {
59 echo "Used for applications that require Hadoop and Hive classpath and environment."
60 echo "./hive --service jar <yourjar> <yourclass> HIVE_OPTS <your_args>"
61}