【问题标题】:How to mute apache zookeeper debug messages (AWS EMR)?如何静音 apache zookeeper 调试消息(AWS EMR)?
【发布时间】:2014-12-18 14:34:01
【问题描述】:

如何在 AWS Elastic MapReduce 主节点上静音 DEBUG 消息?

hbase(main):003:0> list
TABLE                                                                                                               
mydb                                                                                                                
1 row(s) in 0.0510 seconds

hbase(main):004:0> 00:25:17.104 [main-SendThread(ip-172-31-14-206.ec2.internal:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x1493a5c3b78001b after 1ms

hbase(main):005:0* 00:26:17.165 [main-SendThread(ip-172-31-14-206.ec2.internal:2181)] DEBUG org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x1493a5c3b78001b after 1ms

【问题讨论】:

  • 穆拉特,你找到解决办法了吗?

标签: hadoop amazon-web-services apache-zookeeper elastic-map-reduce mute


【解决方案1】:

this question 的已接受答案有助于抑制调试日志消息,不仅适用于 hbase shell,而且适用于所有其他运行 hbase 的守护进程(例如区域服务器、zookeeper)。您只需添加:

<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
        <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
    </appender>
    <root level="error">
        <appender-ref ref="STDOUT" />
    </root>
</configuration>

进入~/hbase/conf/logback.xml并重新启动所有服务或hbase shell。

【讨论】:

    【解决方案2】:

    我不知道 Web UI 中是否有更改日志详细程度的选项。 但必须有一个 Zookeeper(使用 Log4j)配置文件夹 ${ZOOKEEPER_HOME}/conf,您可以在其中编辑文件 logj4.properties 并指定:

    zookeeper.console.threshold=WARN
    

    但我认为那些改动一定不能直接在Zookeeper中进行,而是在HBase的日志配置中-${HBASE_HOME}/conf(HBase也使用Log4j),因为HBase可以管理Zookeeper。 那里可以编辑的参数很少:

    # Define some default values that can be overridden by system properties
    hbase.root.logger=INFO,console
    hbase.security.logger=INFO,console
    
    # Main log level
    log4j.threshold=ALL
    
    # Zookeeper log level
    log4j.logger.org.apache.zookeeper=INFO
    

    要找到这个文件,你可以尝试下一个命令:

    $ find /* -name "log4j.properties" | grep -E "zookeeper|hbase"
    /hadoop/zookeeper/conf/log4j.properties
    /hadoop/hbase/conf/log4j.properties
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-03
      • 1970-01-01
      • 2016-07-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-13
      相关资源
      最近更新 更多