开发者

getting rid of Hbase configuration deprecated warning

I'm getting this error message in my log file 开发者_如何转开发WARN hbase.HBaseConfiguration: instantiating HBaseConfiguration() is deprecated. Please use HBaseConfiguration#create() to construct a plain Configuration how can I get rid of this?

My class extends Configured.class , and I'm instantiating configuration like this :

HBaseConfiguration hBaseConfiguration = new HBaseConfiguration(getConf());

Did anyone have the similar issue? how to fix it ?

EDIT

How can I get this version of HbaseConfiguration :

http://hbase.apache.org/docs/r0.89.20100726/xref/org/apache/hadoop/hbase/HBaseConfiguration.html

I downloaded the latest version from hbase web site(version 0.20.6) but the class is different from this one, its missing create() method and some other too.


Quoting the Javadoc:

Instantinating HBaseConfiguration() is deprecated. Please use HBaseConfiguration#create(conf) to construct a plain Configuration

Instead of doing:

HBaseConfiguration hBaseConfiguration = new HBaseConfiguration(getConf());

You should do:

Configuration configuration = HBaseConfiguration.create(getConf());
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜