1. 程式人生 > >hbase increment   性能對比 get&put

hbase increment   性能對比 get&put

hbase increment

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