以下为编码过程中出现的一些api的改变,将持续更新。
Admin
/**
* 0.X edition
* */
// HBaseAdmin admin = new HBaseAdmin(conf);
// HTableDescriptor descriptor = new HTableDescriptor();
/**
* 1.X edition
* */
Connection connection = ConnectionFactory.createConnection(conf);
Admin admin2 = connection.getAdmin();
HTableDescriptor
0.9X版本
HTableDescriptor tableDesc=new HTableDescriptor(tableName);
新的写法
HTableDescriptor table = new HTableDescriptor(TableName.valueOf("tableName"));
Htable改动
HTable hTable = new HTable(config, "tableName");
-------------------------------------------------------
Table hTable = connection.getTable(TableName.valueOf(tableName));