[ 
https://issues.apache.org/jira/browse/HBASE-18772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16158143#comment-16158143
 ] 

Yechao Chen edited comment on HBASE-18772 at 9/8/17 5:30 AM:
-------------------------------------------------------------

bq. Looking at the LongAdder class, seems the Heap requirement for it is much 
more compared to AtomicLong. The fields in BucketCache#BucketEntry should be 
carefully selected considering the heap overhead also. 

[~anoop.hbase] Thanks for the reply。
Yes sir,LongAdder  need more heap memory than AtomicLong, I see the a lot of 
Stats Code has been changed to LongAdder .
considering the frequency of access by multi-thread ,  It seems necessary to 
change AtomicLong to LongAdder here,what do you think,sir?


was (Author: chenyechao):
bq. Looking at the LongAdder class, seems the Heap requirement for it is much 
more compared to AtomicLong. The fields in BucketCache#BucketEntry should be 
carefully selected considering the heap overhead also. 

Yes sir,LongAdder  need more heap memory than AtomicLong, I see the a lot of 
Stats Code has been changed to LongAdder .
considering the frequency of access by multi-thread ,  It seems necessary to 
change AtomicLong to LongAdder here,what do you think,sir?

> [JDK8]  Replace AtomicLong with LongAdder
> -----------------------------------------
>
>                 Key: HBASE-18772
>                 URL: https://issues.apache.org/jira/browse/HBASE-18772
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 2.0.0-alpha-2
>            Reporter: Yechao Chen
>            Assignee: Yechao Chen
>            Priority: Trivial
>             Fix For: 2.0.0-beta-1
>
>
> RCurrently we use many AtomicLong in HBase Region Code ,such as BucketCache 
> calss realCacheSize,heapSize,blockNumber,accessCount  and HRegion calss  
> compactionNumBytesCompacted etc .
> In JDK8 LongAdder  is faster than AtomicLong ,should use this replace  
> AtomicLong 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to