HTableDescriptor(table) in hbase is deprecated and alternative for that?
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
HTableDescriptor As of release 2.0.0, this will be removed in HBase 3.0.0. * Use {@link TableDescriptorBuilder} to build {@link HTableDescriptor}.
TableName tname = TableName.valueOf(fullTableName); TableDescriptorBuilder tableDescBuilder = TableDescriptorBuilder.newBuilder(tname); ColumnFamilyDescriptorBuilder columnDescBuilder = ColumnFamilyDescriptorBuilder .newBuilder(Bytes.toBytes(family)).setBlocksize(32 * 1024) .setCompressionType(Compression.Algorithm.SNAPPY).setDataBlockEncoding(DataBlockEncoding.NONE); tableDescBuilder.setColumnFamily(columnDescBuilder.build()); tableDescBuilder.build();