问题现象:
hive -f “hsql.sql” > /tmp/hsql.log
hive -e “select * from tmp.table limit 10” > /tmp/hsql.log
备注:hive -f与hive -e 作用是相同的。-f 是指定hsql文件。-e 是指定要执行的sql
HIVE执行重定向之后数据最后多了两行日志。
WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
WARN: Please see http://www.slf4j.org/codes.html release for an explanation.
解决办法:
添加“export HIVE_SKIP_SPARK_ASSEMBLY=true;” 到 /etc/profile
echo “export HIVE_SKIP_SPARK_ASSEMBLY=true;” >> /etc/profile
source /etc/profile