Hbase2.0.5-API官网查询方式

目录

1.怎样使用HbaseAPI


1.怎样使用HbaseAPI

第一步:去官网查=>https://hbase.apache.org/=>开发文档API 2.2文档==>User API =>https://hbase.apache.org/2.0/apidocs/index.html 把2.2换成2.0就行,对应你的版本号

第二步:找到Connection

第三步:使用翻译软件进行翻译

A cluster connection encapsulating lower level individual connections to actual servers and a connection to zookeeper. 
Connections are instantiated through the ConnectionFactory class. The lifecycle of the connection is managed by the caller, who has to close() the connection to release the resources.
The connection object contains logic to find the master, locate regions out on the cluster, keeps a cache of locations and then knows how to re-calibrate after they move. 
The individual connections to servers, meta cache, zookeeper connection, etc are all shared by the Table and Admin instances obtained from this connection.

Connection creation is a heavy-weight operation. Connection implementations are thread-safe,
 so that the client can create a connection once, and share it with different threads. Table and Admin instances, on the other hand, are light-weight and are not thread-safe. 
Typically, a single connection per client application is instantiated and every thread will obtain its own Table instance. Caching or pooling of Table and Admin is not recommended.

一个集群连接封装了到实际服务器的较低级别的单个连接和到zookeeper的连接。连接是通过ConnectionFactory类实例化的。连接的生命周期由调用者管理,调用者必须关闭()连接以释放资源。

connection对象包含以下逻辑:查找主服务器、定位集群上的区域、保存位置缓存,然后知道在它们移动后如何重新校准。服务器、元缓存、zookeeper连接等的连接都是由该表和管理实例共享的。

创建连接是一个重量级操作。连接实现是线程安全的,因此客户机可以只创建一次连接,并将其共享给不同的线程。

另一方面,表和管理实例是轻量级的,并且不是线程安全的。通常,每个客户端应用程序都实例化一个连接,每个线程都将获得自己的表实例。不建议对表和管理员进行缓存或池化。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值