HBase1.0以上版本號的API改變
阿新 • • 發佈:2017-05-06
reg hbase value col min sea ron factor valueof
HBase1.0以上版本號已經廢棄了 HTableInterface,HTable,HBaseAdmin等API的使用。新增了一些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();
HBase1.0以上版本號的API改變