问题现象:
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
本文解决了一个在使用Hive on Spark时遇到的问题,即执行SQL语句后日志中出现多余警告信息。通过在配置文件中添加特定环境变量,可以消除这些警告,确保日志的整洁。
24

被折叠的 条评论
为什么被折叠?



