Index: src/packages/update-hcatalog-env.sh =================================================================== --- src/packages/update-hcatalog-env.sh (revision 0) +++ src/packages/update-hcatalog-env.sh (revision 0) @@ -0,0 +1,168 @@ +#!/usr/bin/env bash + +# 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. + +# This script configures hcatalog-env.sh and symlinkis directories for +# relocating RPM locations. + +usage() { + echo " +usage: $0 + Required parameters: + --prefix=PREFIX path to install into + + Optional parameters: + --arch=i386 OS Architecture + --bin-dir=PREFIX/bin Executable directory + --conf-dir=/etc/hcatalog Configuration directory + --log-dir=/var/log/hcatalog Log directory + --pid-dir=/var/run PID file location + --sbin-dir=PREFIX/sbin System executable directory + " + exit 1 +} + +template_generator() { + REGEX='(\$\{[a-zA-Z_][a-zA-Z_0-9]*\})' + cat $1 | + while read line ; do + while [[ "$line" =~ $REGEX ]] ; do + LHS=${BASH_REMATCH[1]} + RHS="$(eval echo "\"$LHS\"")" + line=${line//$LHS/$RHS} + done + echo $line >> $2 + done +} + +OPTS=$(getopt \ + -n $0 \ + -o '' \ + -l 'arch:' \ + -l 'prefix:' \ + -l 'bin-dir:' \ + -l 'conf-dir:' \ + -l 'lib-dir:' \ + -l 'log-dir:' \ + -l 'pid-dir:' \ + -l 'sbin-dir:' \ + -l 'uninstall' \ + -- "$@") + +if [ $? != 0 ] ; then + usage +fi + +eval set -- "${OPTS}" +while true ; do + case "$1" in + --arch) + ARCH=$2 ; shift 2 + ;; + --prefix) + PREFIX=$2 ; shift 2 + ;; + --bin-dir) + BIN_DIR=$2 ; shift 2 + ;; + --log-dir) + LOG_DIR=$2 ; shift 2 + ;; + --lib-dir) + LIB_DIR=$2 ; shift 2 + ;; + --conf-dir) + CONF_DIR=$2 ; shift 2 + ;; + --pid-dir) + PID_DIR=$2 ; shift 2 + ;; + --sbin-dir) + SBIN_DIR=$2 ; shift 2 + ;; + --uninstall) + UNINSTALL=1; shift + ;; + --) + shift ; break + ;; + *) + echo "Unknown option: $1" + usage + exit 1 + ;; + esac +done + +for var in PREFIX; do + if [ -z "$(eval "echo \$$var")" ]; then + echo Missing param: $var + usage + fi +done + +ARCH=${ARCH:-i386} +HCATALOG_PREFIX=$PREFIX +HCATALOG_BIN_DIR=${BIN_DIR:-$PREFIX/bin} +HCATALOG_CONF_DIR=${CONF_DIR:-$PREFIX/etc/hcatalog} +HCATALOG_LIB_DIR=${LIB_DIR:-$PREFIX/lib} +HCATALOG_LOG_DIR=${LOG_DIR:-$PREFIX/var/log} +HCATALOG_PID_DIR=${PID_DIR:-$PREFIX/var/run} +HCATALOG_SBIN_DIR=${SBIN_DIR:-$PREFIX/sbin} +UNINSTALL=${UNINSTALL:-0} + +if [ "${ARCH}" != "i386" ]; then + HCATALOG_LIB_DIR=${HCATALOG_LIB_DIR}64 +fi + +if [ "${UNINSTALL}" -eq "1" ]; then + # Remove symlinks + if [ "${HCATALOG_CONF_DIR}" != "${HCATALOG_PREFIX}/etc/hcatalog" ]; then + rm -rf ${HCATALOG_PREFIX}/etc/hcatalog + fi + rm -f /etc/default/hcatalog-env.sh + rm -f /etc/profile.d/hcatalog-env.sh +else + # Create symlinks + if [ "${HCATALOG_CONF_DIR}" != "${HCATALOG_PREFIX}/etc/hcatalog" ]; then + mkdir -p ${HCATALOG_PREFIX}/etc + ln -sf ${HCATALOG_CONF_DIR} ${HCATALOG_PREFIX}/etc/hcatalog + fi + ln -sf ${HCATALOG_CONF_DIR}/hcatalog-env.sh /etc/default/hcatalog-env.sh + ln -sf ${HCATALOG_CONF_DIR}/hcatalog-env.sh /etc/profile.d/hcatalog-env.sh + + mkdir -p ${HCATALOG_LOG_DIR} + chown root:hadoop ${HCATALOG_LOG_DIR} + chmod 775 ${HCATALOG_LOG_DIR} + + if [ ! -d ${HCATALOG_PID_DIR} ]; then + mkdir -p ${HCATALOG_PID_DIR} + chown root:hadoop ${HCATALOG_PID_DIR} + chmod 775 ${HCATALOG_PID_DIR} + fi + + TFILE="/tmp/$(basename $0).$$.tmp" + if [ -z "${JAVA_HOME}" ]; then + if [ -e /etc/debian_version ]; then + JAVA_HOME=`update-alternatives --config java | grep java | cut -f2 -d':' | cut -f2 -d' ' | sed -e 's/\/bin\/java//'` + else + JAVA_HOME=/usr/java/default + fi + fi + template_generator ${HCATALOG_PREFIX}/share/hcatalog/templates/conf/hcatalog-env.sh.template $TFILE + cp ${TFILE} ${CONF_DIR}/hcatalog-env.sh + rm -f ${TFILE} +fi Index: src/packages/deb/hcatalog.control/control =================================================================== --- src/packages/deb/hcatalog.control/control (revision 0) +++ src/packages/deb/hcatalog.control/control (revision 0) @@ -0,0 +1,24 @@ +# 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. +Package: hcatalog +Version: @version@ +Section: misc +Priority: optional +Provides: hcatalog +Architecture: all +Depends: openjdk-6-jre-headless, hadoop +Maintainer: Apache Software Foundation +Description: The Apache HCatalog is a table and storage management service for data created using Apache Hadoop. +Distribution: development Index: src/packages/deb/hcatalog.control/postinst =================================================================== --- src/packages/deb/hcatalog.control/postinst (revision 0) +++ src/packages/deb/hcatalog.control/postinst (revision 0) @@ -0,0 +1,24 @@ +#!/bin/sh + +# 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. + +bash /usr/sbin/update-hcatalog-env.sh \ + --prefix=/usr \ + --bin-dir=/usr/bin \ + --sbin-dir=/usr/sbin \ + --conf-dir=/etc/hcatalog \ + --log-dir=/var/log/hcatalog \ + --pid-dir=/var/run/hcatalog Property changes on: src/packages/deb/hcatalog.control/postinst ___________________________________________________________________ Added: svn:executable + * Index: src/packages/deb/hcatalog.control/postrm =================================================================== --- src/packages/deb/hcatalog.control/postrm (revision 0) +++ src/packages/deb/hcatalog.control/postrm (revision 0) @@ -0,0 +1,18 @@ +#!/bin/sh + +# 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. + +exit 0 Property changes on: src/packages/deb/hcatalog.control/postrm ___________________________________________________________________ Added: svn:executable + * Index: src/packages/deb/hcatalog.control/preinst =================================================================== --- src/packages/deb/hcatalog.control/preinst (revision 0) +++ src/packages/deb/hcatalog.control/preinst (revision 0) @@ -0,0 +1,17 @@ +#!/bin/sh + +# 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. + Property changes on: src/packages/deb/hcatalog.control/preinst ___________________________________________________________________ Added: svn:executable + * Index: src/packages/deb/hcatalog.control/conffile =================================================================== --- src/packages/deb/hcatalog.control/conffile (revision 0) +++ src/packages/deb/hcatalog.control/conffile (revision 0) @@ -0,0 +1,15 @@ +# 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. +/etc/hcatalog Index: src/packages/deb/hcatalog.control/prerm =================================================================== --- src/packages/deb/hcatalog.control/prerm (revision 0) +++ src/packages/deb/hcatalog.control/prerm (revision 0) @@ -0,0 +1,26 @@ +#!/bin/sh + +# 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. + +bash /usr/sbin/update-hcatalog-env.sh \ + --prefix=/usr \ + --bin-dir=/usr/bin \ + --sbin-dir=/usr/sbin \ + --conf-dir=/etc/hcatalog \ + --log-dir=/var/log/hcatalog \ + --pid-dir=/var/run/hcatalog \ + --uninstall + Property changes on: src/packages/deb/hcatalog.control/prerm ___________________________________________________________________ Added: svn:executable + * Index: src/packages/rpm/spec/hcatalog.spec =================================================================== --- src/packages/rpm/spec/hcatalog.spec (revision 0) +++ src/packages/rpm/spec/hcatalog.spec (revision 0) @@ -0,0 +1,147 @@ +# 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. + +# +# RPM Spec file for Hcatalog version @version@ +# + +%define name hcatalog +%define version @version@ +%define release @package.release@ + +# Installation Locations +%define _prefix @package.prefix@ +%define _bin_dir %{_prefix}/bin +%define _conf_dir @package.conf.dir@ +%define _lib_dir %{_prefix}/lib +%define _lib64_dir %{_prefix}/lib64 +%define _libexec_dir %{_prefix}/libexec +%define _log_dir @package.log.dir@ +%define _pid_dir @package.pid.dir@ +%define _sbin_dir %{_prefix}/sbin +%define _share_dir %{_prefix}/share +%define _var_dir @package.var.dir@ + +# Build time settings +%define _build_dir @package.build.dir@ +%define _final_name @final.name@ +%define debug_package %{nil} + +# Disable brp-java-repack-jars +%define __os_install_post \ + /usr/lib/rpm/redhat/brp-compress \ + %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \ + /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \ + /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \ + /usr/lib/rpm/brp-python-bytecompile %{nil} + +# RPM searches perl files for dependancies and this breaks for non packaged perl lib +# like thrift so disable this +%define _use_internal_dependency_generator 0 + +Summary: The Apache HCatalog is a table and storage management service for data created using Apache Hadoop. +License: Apache License, Version 2.0 +URL: http://incubator.apache.org/hcatalog +Vendor: Apache Software Foundation +Group: Development/Libraries +Name: %{name} +Version: %{version} +Release: %{release} +Source0: %{_final_name}.tar.gz +Prefix: %{_prefix} +Prefix: %{_conf_dir} +Prefix: %{_log_dir} +Prefix: %{_pid_dir} +Buildroot: %{_build_dir} +Requires: sh-utils, textutils, /usr/sbin/useradd, /usr/sbin/usermod, /sbin/chkconfig, /sbin/service, /usr/bin/hadoop +AutoReqProv: no +Provides: hcatalog + +%description +The Apache HCatalog is a table and storage management service for data created using Apache Hadoop. + +%prep +%setup -n %{_final_name} + +%build +if [ -d ${RPM_BUILD_DIR}%{_prefix} ]; then + rm -rf ${RPM_BUILD_DIR}%{_prefix} +fi + +if [ -d ${RPM_BUILD_DIR}%{_log_dir} ]; then + rm -rf ${RPM_BUILD_DIR}%{_log_dir} +fi + +if [ -d ${RPM_BUILD_DIR}%{_conf_dir} ]; then + rm -rf ${RPM_BUILD_DIR}%{_conf_dir} +fi + +if [ -d ${RPM_BUILD_DIR}%{_pid_dir} ]; then + rm -rf ${RPM_BUILD_DIR}%{_pid_dir} +fi + +mkdir -p ${RPM_BUILD_DIR}%{_prefix} +mkdir -p ${RPM_BUILD_DIR}%{_bin_dir} +mkdir -p ${RPM_BUILD_DIR}%{_lib_dir} +%ifarch amd64 x86_64 +mkdir -p ${RPM_BUILD_DIR}%{_lib64_dir} +%endif +mkdir -p ${RPM_BUILD_DIR}%{_libexec_dir} +mkdir -p ${RPM_BUILD_DIR}%{_log_dir} +mkdir -p ${RPM_BUILD_DIR}%{_conf_dir} +mkdir -p ${RPM_BUILD_DIR}%{_pid_dir} +mkdir -p ${RPM_BUILD_DIR}%{_sbin_dir} +mkdir -p ${RPM_BUILD_DIR}%{_share_dir} +mkdir -p ${RPM_BUILD_DIR}%{_var_dir} + +######################### +#### INSTALL SECTION #### +######################### +%install +mv ${RPM_BUILD_DIR}/%{_final_name}/bin/* ${RPM_BUILD_DIR}%{_bin_dir} +mv ${RPM_BUILD_DIR}/%{_final_name}/sbin/* ${RPM_BUILD_DIR}%{_sbin_dir} +mv ${RPM_BUILD_DIR}/%{_final_name}/etc/hcatalog/* ${RPM_BUILD_DIR}%{_conf_dir} +mv ${RPM_BUILD_DIR}/%{_final_name}/share/* ${RPM_BUILD_DIR}%{_share_dir} +rm -rf ${RPM_BUILD_DIR}/%{_final_name} + +%pre +getent group hadoop 2>/dev/null >/dev/null || /usr/sbin/groupadd -r hadoop + +%post +bash ${RPM_INSTALL_PREFIX0}/sbin/update-hcatalog-env.sh \ + --prefix=${RPM_INSTALL_PREFIX0} \ + --bin-dir=${RPM_INSTALL_PREFIX0}/bin \ + --sbin-dir=${RPM_INSTALL_PREFIX0}/sbin \ + --conf-dir=${RPM_INSTALL_PREFIX1} \ + --log-dir=${RPM_INSTALL_PREFIX2} \ + --pid-dir=${RPM_INSTALL_PREFIX3} + +%preun +bash ${RPM_INSTALL_PREFIX0}/sbin/update-hcatalog-env.sh \ + --prefix=${RPM_INSTALL_PREFIX0} \ + --bin-dir=${RPM_INSTALL_PREFIX0}/bin \ + --sbin-dir=${RPM_INSTALL_PREFIX0}/sbin \ + --conf-dir=${RPM_INSTALL_PREFIX1} \ + --log-dir=${RPM_INSTALL_PREFIX2} \ + --pid-dir=${RPM_INSTALL_PREFIX3} \ + --uninstall + +%files +%defattr(-,root,root) +%attr(0755,root,hadoop) %{_log_dir} +%attr(0775,root,hadoop) %{_pid_dir} +%config(noreplace) %{_conf_dir} +%{_prefix} + Index: src/packages/templates/conf/hcatalog-env.sh.template =================================================================== --- src/packages/templates/conf/hcatalog-env.sh.template (revision 0) +++ src/packages/templates/conf/hcatalog-env.sh.template (revision 0) @@ -0,0 +1,17 @@ +# 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. + +JAVA_HOME=${JAVA_HOME} Index: build.xml =================================================================== --- build.xml (revision 1148045) +++ build.xml (working copy) @@ -26,9 +26,11 @@ ================================================================================ --> - + + - + + @@ -36,6 +38,7 @@ + @@ -84,6 +87,17 @@ + + + + + + + + + + + @@ -197,6 +211,14 @@ + + + + + + - + @@ -246,7 +268,7 @@ --> - @@ -371,20 +393,22 @@ --> - - + + - - - - - - - + + + + + + + + + - + @@ -452,10 +476,6 @@ - - - - @@ -464,6 +484,14 @@ + + + + + + + + @@ -472,23 +500,29 @@ - + - + - + + + + + + + - + @@ -501,28 +535,26 @@ - - - - + - + - + + @@ -537,6 +569,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -545,11 +602,99 @@ + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: ivy.xml =================================================================== --- ivy.xml (revision 1148045) +++ ivy.xml (working copy) @@ -33,6 +33,7 @@ extends="runtime" description="artifacts needed to compile/test the application"/> + @@ -48,5 +49,6 @@ - + + Index: ivy/libraries.properties =================================================================== --- ivy/libraries.properties (revision 1148045) +++ ivy/libraries.properties (working copy) @@ -22,3 +22,4 @@ activemq.version=5.5.0 javax-mgmt.version=1.1-rev-1 rats-lib.version=0.5.1 +jdeb.version=0.8 Index: bin/hcat.sh =================================================================== --- bin/hcat.sh (revision 1148045) +++ bin/hcat.sh (working copy) @@ -36,8 +36,21 @@ this="$bin/$script" # the root of the HCatalog installation -export HCAT_HOME=`dirname "$this"`/.. +export HCAT_PREFIX=`dirname "$this"`/.. +if [ -e $HCAT_PREFIX/etc/hcatalog/hcatalog-env.sh ]; then + . $HCAT_PREFIX/etc/hcatalog/hcatalog-env.sh +fi + +if [ -e $HCAT_PREFIX/bin/hadoop ]; then + HADOOP_PREFIX=$HCAT_PREFIX +elif [ -e $HADOOP_HOME/bin/hadoop]; then + HADOOP_PREFIX=$HADOOP_HOME +else + echo "Hadoop not found." + exit 1 +fi + # filter debug command line parameter debug=false @@ -50,15 +63,15 @@ done # Find our hcatalog jar -HCAT_JAR=$HCAT_HOME/lib/hcatalog-*.jar +HCAT_JAR=`ls $HCAT_PREFIX/share/hcatalog/lib/hcatalog-*.jar |grep -v server-extensions` # Add all of the other jars to our classpath -for jar in $HCAT_HOME/lib/*.jar ; do +for jar in $HCAT_PREFIX/share/hcatalog/lib/*.jar ; do HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$jar done # Put our config file in the classpath -HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:${HCAT_HOME}/conf/hive-site.xml +HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:${HCAT_PREFIX}/etc/hcatalog/hive-site.xml export HADOOP_CLASSPATH=$HADOOP_CLASSPATH @@ -66,14 +79,14 @@ THRIFT=`sed -n '/hive.metastore.uris<\/name>/ { n s/.*\(.*\)<\/value>.*/\1/p - }' $HCAT_HOME/conf/hive-site.xml` + }' $HCAT_PREFIX/etc/hcatalog/hive-site.xml` HADOOP_OPTS="$HADOOP_OPTS -Dhive.metastore.uris=$THRIFT " # Find our Warehouse dir from the config file WAREHOUSE_DIR=`sed -n '/hive.metastore.warehouse.dir<\/name>/ { n s/.*\(.*\)<\/value>.*/\1/p - }' $HCAT_HOME/conf/hive-site.xml` + }' $HCAT_PREFIX/etc/hcatalog/hive-site.xml` HADOOP_OPTS="$HADOOP_OPTS -Dhive.metastore.warehouse.dir=$WAREHOUSE_DIR " @@ -82,11 +95,11 @@ # run it if [ "$debug" == "true" ]; then echo "Would run:" - echo "exec $HADOOP_HOME/bin/hadoop jar $HCAT_JAR org.apache.hcatalog.cli.HCatCli $remaining" + echo "exec $HADOOP_PREFIX/bin/hadoop jar $HCAT_JAR org.apache.hcatalog.cli.HCatCli $remaining" echo "with HADOOP_CLASSPATH set to ($HADOOP_CLASSPATH)" echo "and HADOOP_OPTS set to ($HADOOP_OPTS)" else - exec $HADOOP_HOME/bin/hadoop jar $HCAT_JAR org.apache.hcatalog.cli.HCatCli "$@" + exec $HADOOP_PREFIX/bin/hadoop jar $HCAT_JAR org.apache.hcatalog.cli.HCatCli "$@" fi # Above is the recommended way to launch hcatalog cli. If it doesnt work, you can try the following: