Details
Description
/etc/init.d/hive-metastore has this:
exec_env="HADOOP_OPTS=\"-Dhive.log.dir=`dirname $LOG_FILE` -Dhive.log.file=${DAEMON}.log -Dhive.log.threshold=INFO\"" # Autodetect JDBC drivers for metastore . /usr/lib/bigtop-utils/bigtop-detect-classpath exec_env="HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:${BIGTOP_CLASSPATH} $exec_env" su -s /bin/bash $SVC_USER -c "$exec_env nohup nice -n 0 \ $EXEC_PATH --service metastore $PORT \ > $LOG_FILE 2>&1 < /dev/null & "'echo $! '"> $PIDFILE"
If you look at this code, instead of the -D option it should be using --hiveconf, and secondly $exec_env ends up before the $EXEC_PATH which might work for environment vars, but not for command line options. The result is - hive metastore logs to /dev/null as far as I can tell.
It should be something along the lines of:
# Autodetect JDBC drivers for metastore . /usr/lib/bigtop-utils/bigtop-detect-classpath exec_env="HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:${BIGTOP_CLASSPATH} $exec_env" su -s /bin/bash $SVC_USER -c "$exec_env nohup nice -n 0 \ $EXEC_PATH --service metastore --hiveconf hive.log.dir=`dirname $LOG_FILE` --hiveconf hive.log.file=${DAEMON}.log --hiveconf hive.log.threshold=INFO $PORT \ > $LOG_FILE 2>&1 < /dev/null & "'echo $! '"> $PIDFILE"