首页 > 代码库 > hbase increment   性能对比 get&put

hbase increment   性能对比 get&put

hbase increment 可以作为计数器使用,并且是线程安全的,如果在不考虑线程安全情况下,单线程操作性能会比get & put性能高么?带着这个疑问我做了以下测试。


Increment

Htable.batch(incrementList)无缓存批量提交

技术分享


Htable.get (getList)&Htable.put(putList)

技术分享

Hbase increment由于客户端没有缓存,所以无法批量提交,导致性能不是很理想,同样500条数据做累加,increment大概需要2.5s;用批量get出来再批量put的方式大概需要0.4s,性能是increment6倍。

本文出自 “技术分享” 博客,请务必保留此出处http://hkwang.blog.51cto.com/12307738/1924949

hbase increment   性能对比 get&put