有时候执行会包含 WARN 开头的日志
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.
方式一: grep -v
hive -e "hive sql 语句 " | grep -v "WARN" > 输出文件
【注意】
hive -f与hive -e 作用是相同的。-f 是指定hsql文件。-e 是指定要执行的sql
方式二:配置环境变量
添加“export HIVE_SKIP_SPARK_ASSEMBLY=true;” 到 /etc/profile
echo "export HIVE_SKIP_SPARK_ASSEMBLY=true;" >> /etc/profile
source /etc/profile