HBase1.0以上版本的API改变
2015-08-12 18:28
369 查看
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();
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();
相关文章推荐
- *+html功能
- 批量添加删除EC2资源的TAG
- iOS安全系列之 HTTPS
- word2vec剖析,资料整理备存
- 使用Genymotion来运行Android Studio开发的程序
- 简易动态验证码生成
- 0000001_java学习之路
- Linux学习笔记---目录处理命令---删除文件或目录
- Linux下更改转移mysql数据库目录
- rest-work-eat-study-rest-work-eat or rest-rest-work-work-eat-eat..
- ES5 object方法整理
- 数据库神器:Navicat Premium
- c# 根据文件流查看文件真实格式
- 详解CSS中视窗单位和百分比单位的使用
- Kernel那些事儿之内存管理(13) --- 内核映射(下)
- 单例对象
- PHP常用功能
- C++对象模型——构造,解构,拷贝语意学(第五章)
- hadoop eclipse 插件
- java, Hello World