开发者

getting rid of Hbase configuration deprecated warning

开发者 https://www.devze.com 2023-01-19 02:10 出处:网络
I\'mgetting this error message in my log file 开发者_如何转开发WARN hbase.HBaseConfiguration: instantiating HBaseConfiguration() is deprecated. Please use HBaseConfiguration#create() to construct a pl

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

精彩评论

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