HBase1.0以上版本已经废弃了 HTableInterface,HTable,HBaseAdminAPI的使用,新增了一些API来实现之前的功能:


Connectioninterface:

Connection connection = ConnectionFactory.createConnection(config);

// ...

connection.close();


TableName class:

String tableName = "Table";

TableName tableNameObj = TableName.valueOf(tableName);


Table,BufferedMutator, and RegionLocator interfaces:

Table table = connection.getTable(tableNameObj);

BufferedMutator mutator = connection.getBufferedMutator(tableNameObj);

RegionLocator regionLocator = connection.getRegionLocator(tableNameObj);


Admin interface:

Admin admin = connection.getAdmin();

相关文章:

  • 2022-01-17
  • 2022-12-23
  • 2021-06-16
  • 2021-12-14
  • 2021-06-16
  • 2021-08-16
  • 2021-09-24
  • 2022-12-23
猜你喜欢
  • 2021-12-23
  • 2021-10-27
  • 2021-08-31
  • 2021-12-02
  • 2022-12-23
  • 2021-06-24
  • 2021-11-28
相关资源
相似解决方案