【问题标题】:hive output consists of these 2 warnings at the end. How do I suppress these 2 warningshive 输出最后包含这两个警告。如何抑制这两个警告
【发布时间】:2015-10-05 04:34:03
【问题描述】:

使用 UDF 的 Hive 查询输出最后包含这 2 个警告。如何抑制这两个警告。请注意,作为输出的一部分,2 个警告紧跟在输出之后。

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.

hadoop 版本

Hadoop 2.6.0-cdh5.4.0

蜂巢--版本

Hive 1.1.0-cdh5.4.0

【问题讨论】:

    标签: hadoop hive cloudera udf


    【解决方案1】:

    如果您使用 beeline 而不是 Hive,错误就会消失。不是最好的解决方案,但我打算向 CDH 用户组发帖询问相同的问题,看看它是否是可以修复的错误。

    【讨论】:

    • 您是否从 CDH 获得有关此警告问题的任何更新?我使用 Hadoop 2.6.0-cdh5.12.2 版本,问题仍然存在。
    【解决方案2】:

    此错误是由于添加了包含 icl-over-slf4j.jar(导致 stdout 消息)和 slf4j-log4j12.jar 中的类的程序集 jar。

    您可以尝试以下几种方法:

    1. 尝试移除装配罐,以备不时之需。

    2. 查看以下链接:https://issues.apache.org/jira/browse/HIVE-12179 这表明我们可以在 Hive 中触发一个标志,其中仅当 HIVE_ADD_SPARK_ASSEMBLY = "true" 时才加载 spark-assembly。

    https://community.hortonworks.com/questions/34311/warning-message-in-hive-output-after-upgrading-to.html : 虽然有一种解决方法可以避免任何结束时间更改,即使用 shell 脚本从文件末尾手动删除 2 行。

    【讨论】:

      【解决方案3】:

      已尝试设置 HIVE_ADD_SPARK_ASSEMBLY=false,但没有成功。

      最后,我在 Cloudera 社区发现了一个帖子问题。见:https://community.cloudera.com/t5/Support-Questions/Warning-message-in-Hive-output-after-upgrading-to-hive/td-p/157141

      你可以试试下面的命令,它对我有用!

      hive -S -d ns=$hiveDB -d tab=$t -d dunsCol=$c1 -d phase="$ph1" -d error=$c2 -d ts=$eColumnArray -d reporting_window=$rDate -f $dir'select_count.hsql' | grep -v "^WARN" > $gOutPut 2> /dev/null
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-06-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-12-28
        • 2022-06-26
        相关资源
        最近更新 更多