2

What can I use instead of doInTable(HTableInterface table) which is deprecated.

Below is the code.

hbaseTemplate.execute(tableName, new TableCallback<User>() {

    public User doInTable(HTableInterface  table) throws Throwable {

        Put p = new Put(Bytes.toBytes(KEY),timestamp);
        p.addColumn(FAMILY, XXX, Bytes.toBytes(user.getUserId()));

    table.put(p);
    }
});

I am using Spring Boot with Hbase.

Thank you in advance.

Bharat
  • 2,441
  • 3
  • 24
  • 36

1 Answers1

1

The source code mentioned using org.apache.hadoop.hbase.client.Table instead of HTableInterface.

/**
* Used to communicate with a single HBase table.
* Obtain an instance from an {@link HConnection}.
*
* @since 0.21.0
* @deprecated use {@link org.apache.hadoop.hbase.client.Table} instead
*/
@Deprecated
@InterfaceAudience.Private
@InterfaceStability.Stable
public interface HTableInterface extends Table ...
derek.z
  • 907
  • 11
  • 19