Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hbase thrift2 开启log #58

Open
mattshma opened this issue Aug 16, 2016 · 1 comment
Open

hbase thrift2 开启log #58

mattshma opened this issue Aug 16, 2016 · 1 comment

Comments

@mattshma
Copy link
Owner

mattshma commented Aug 16, 2016

当前CM不支持thrift2,所以若需要启动thrift2的话,需要在命令行中启动。通过hbase-daemon.sh start thrift2hbase thrift2 start均能启动thrift2,区别在于前者会加载各种环境配置(如jdk配置,log配置等),然后再调用后者,因此推荐通过hbase-daemon.sh start thrift2来启动thrift2。

若启动过程中报错如下:

log4j:ERROR Could not find value for key log4j.appender.RFA
log4j:ERROR Could not instantiate appender named "RFA".

说明还需要配置log4j.properties文件。编辑/etc/hbase/conf/log4j.properties,添加如下行:

#  set log4j.appender.RFA
hadoop.log.maxbackupindex=15

log4j.appender.RFA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RFA.File=${hbase.log.dir}/${hbase.log.file}
log4j.appender.RFA.layout=org.apache.log4j.PatternLayout
log4j.appender.RFA.MaxBackupIndex=${hadoop.log.maxbackupindex}

# set hbase log level
log4j.logger.org.apache.hadoop.hbase=DEBUG

参考:

@mattshma
Copy link
Owner Author

UPDATE: 这么设置后,貌似CDH中关于log的设置就不生效了?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant