diff --git a/bin/ext/version.sh b/bin/ext/version.sh index b6a237b..92fee3d 100644 --- a/bin/ext/version.sh +++ b/bin/ext/version.sh @@ -27,7 +27,7 @@ version () { # hadoop 20 or newer - skip the aux_jars option and hiveconf CLASS=org.apache.hive.common.util.HiveVersionInfo - exec $HADOOP jar $JAR $CLASS 2>> ${STDERR} + exec $HADOOP jar $JAR $CLASS 2>&2 } version_help () { diff --git a/bin/hive b/bin/hive index a7671c3..4a908e1 100755 --- a/bin/hive +++ b/bin/hive @@ -25,8 +25,6 @@ bin=`cd "$bin"; pwd` . "$bin"/hive-config.sh -TMP_USER_DIR="/tmp/${USER}" -STDERR="${TMP_USER_DIR}/stderr" SERVICE="" HELP="" SKIP_HBASECP=false @@ -227,24 +225,10 @@ if [ ! -f ${HADOOP} ]; then exit 4; fi -if [ ! -d ${TMP_USER_DIR} ]; then - mkdir -p ${TMP_USER_DIR} 2> /dev/null - if [ $? -ne 0 ]; then - STDERR="/dev/tty" - fi -fi - -if [ "${STDERR}" != "/dev/null" ] && [ ! -f ${STDERR} ]; then - touch ${STDERR} 2> /dev/null - if [ $? -ne 0 ]; then - STDERR="/dev/tty" - fi -fi - if [ "$SKIP_HADOOPVERSION" = false ]; then # Make sure we're using a compatible version of Hadoop if [ "x$HADOOP_VERSION" == "x" ]; then - HADOOP_VERSION=$($HADOOP version 2>> ${STDERR} | awk -F"\t" '/Hadoop/ {print $0}' | cut -d' ' -f 2); + HADOOP_VERSION=$($HADOOP version 2>&2 | awk -F"\t" '/Hadoop/ {print $0}' | cut -d' ' -f 2); fi # Save the regex to a var to workaround quoting incompatabilities @@ -295,7 +279,7 @@ if [ "$SKIP_HBASECP" = false ]; then if [[ -n $HBASE_BIN ]] ; then # exclude ZK, PB, and Guava (See HIVE-2055) # depends on HBASE-8438 (hbase-0.94.14+, hbase-0.96.1+) for `hbase mapredcp` command - for x in $($HBASE_BIN mapredcp 2>> ${STDERR} | tr ':' '\n') ; do + for x in $($HBASE_BIN mapredcp 2>&2 | tr ':' '\n') ; do if [[ $x == *zookeeper* || $x == *protobuf-java* || $x == *guava* ]] ; then continue fi