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

Yechao Chen edited comment on HBASE-18772 at 9/12/17 1:24 AM:
--------------------------------------------------------------

bq. There are some fields we should consider changing to LongAdder
CacheStats#failedInserts
LruBlockCache#dataBlockSize
LruBlockCache#dataBlockElements
AdaptiveLifoCoDelCallQueue#numLifoModeSwitches
AdaptiveLifoCoDelCallQueue#numGeneralCallsDropped
Chunk#allocCount

Thanks for review and reply. [~chia7712],[~Apache9].

LruBlockCache&AdaptiveLifoCoDelCallQueue i will change it to LongAdder

CacheStats needs AtomicLong#incrementAndGet method makes it atomic,LongAdder 
has no such a method .
Chunk#allocCount now uses the AtomicInteger, seems not need to change to 
LongAdder .
Looking forward to your suggest,thanks.


was (Author: chenyechao):
bq. There are some fields we should consider changing to LongAdder
    CacheStats#failedInserts
    LruBlockCache#dataBlockSize
    LruBlockCache#dataBlockElements
    AdaptiveLifoCoDelCallQueue#numLifoModeSwitches
    AdaptiveLifoCoDelCallQueue#numGeneralCallsDropped
    Chunk#allocCount
Thanks for review and reply. [~chia7712],[~Apache9].

LruBlockCache&AdaptiveLifoCoDelCallQueue i will change it to LongAdder

CacheStats needs AtomicLong#incrementAndGet method makes it atomic,LongAdder 
has no such a method .
Chunk#allocCount now uses the AtomicInteger, seems not need to change to 
LongAdder .
Looking forward to your suggest,thanks.

> [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
>
>         Attachments: HBASE-18772.master.patch, HBASE-18772.master-v2.patch
>
>
> 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