diff --git a/bin/ext/version.sh b/bin/ext/version.sh index bb6449d..7c0dadd 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 + exec $HADOOP jar $JAR $CLASS 2> /dev/null } version_help () { diff --git a/bin/hive b/bin/hive index 47d99f7..303b20e 100755 --- a/bin/hive +++ b/bin/hive @@ -193,9 +193,6 @@ if [ "$HADOOP_HOME" == "" ]; then exit 4; fi -# to avoid errors from log4j2 automatic configuration loading -export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dlog4j.configurationFile=hive-log4j2.xml " - HADOOP=$HADOOP_HOME/bin/hadoop if [ ! -f ${HADOOP} ]; then echo "Cannot find hadoop installation: \$HADOOP_HOME or \$HADOOP_PREFIX must be set or hadoop must be in the path"; @@ -204,7 +201,7 @@ fi # Make sure we're using a compatible version of Hadoop if [ "x$HADOOP_VERSION" == "x" ]; then - HADOOP_VERSION=$($HADOOP version | awk -F"\t" '/Hadoop/ {print $0}' | cut -d' ' -f 2); + HADOOP_VERSION=$($HADOOP version 2> /dev/null | awk -F"\t" '/Hadoop/ {print $0}' | cut -d' ' -f 2); fi # Save the regex to a var to workaround quoting incompatabilities @@ -253,7 +250,7 @@ HBASE_BIN=${HBASE_BIN:-"$(which hbase)"} 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 | tr ':' '\n') ; do + for x in $($HBASE_BIN mapredcp 2> /dev/null | tr ':' '\n') ; do if [[ $x == *zookeeper* || $x == *protobuf-java* || $x == *guava* ]] ; then continue fi