Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTableDescriptor(table) in hbase is deprecated and alternative for that?

Tags:

hadoop

hbase

HTableDescriptor htd = new HTableDescriptor(table);

The above statement gives the htable descriptor as deprecated

I have searched so many places but unable to get alternative for this.... any help is appreciated

like image 600
Hadooplearner Avatar asked Feb 26 '16 21:02

Hadooplearner


1 Answers

I guess you are using the constructor with a string parameter i.e. your argument variable 'table' is a string:

HTableDescriptor(String name); //Deprecated

You need to construct a table descriptor specifying a TableName object as:

HTableDescriptor(TableName name);

For further details related to TableName object, you can use this link: https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/TableName.html

like image 128
ssadaqat Avatar answered Sep 22 '22 03:09

ssadaqat