hive -e 包含 warn 日志

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yan88888888888888888/article/details/88815340

有时候执行会包含 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. 

解决方案:

hive -e "hive sql 语句 " |  grep -v "WARN"  >  输出文件

补充:

hive -e 导出的包含分隔符 默认为 '\t' shell 处理的时候会用得到,如:我们把这些结果导入mysql

mysql -h' ip 地址' -u'用户名' -p'密码' --default-character-set=utf8  -e"load data local infile '文件' into table 库名字.表名字 fields terminated by '\t' lines terminated by '\n'"

猜你喜欢

转载自blog.csdn.net/yan88888888888888888/article/details/88815340