[ 
https://issues.apache.org/jira/browse/HDFS-15975?focusedWorklogId=584164&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-584164
 ]

ASF GitHub Bot logged work on HDFS-15975:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Apr/21 09:25
            Start Date: 16/Apr/21 09:25
    Worklog Time Spent: 10m 
      Work Description: tomscut commented on a change in pull request #2907:
URL: https://github.com/apache/hadoop/pull/2907#discussion_r614696047



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetCache.java
##########
@@ -607,11 +608,11 @@ public long getCacheCapacity() {
   }
 
   public long getNumBlocksFailedToCache() {
-    return numBlocksFailedToCache.get();
+    return numBlocksFailedToCache.longValue();
   }
 
   public long getNumBlocksFailedToUncache() {
-    return numBlocksFailedToUncache.get();
+    return numBlocksFailedToUncache.longValue();
   }
 
   public long getNumBlocksCached() {

Review comment:
       Thank you @tasanuma for your careful review. I will be more careful when 
I submit the code later. : )




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 584164)
    Time Spent: 2h 50m  (was: 2h 40m)

> Use LongAdder instead of AtomicLong
> -----------------------------------
>
>                 Key: HDFS-15975
>                 URL: https://issues.apache.org/jira/browse/HDFS-15975
>             Project: Hadoop HDFS
>          Issue Type: Wish
>            Reporter: tomscut
>            Assignee: tomscut
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> When counting some indicators, we can use LongAdder instead of AtomicLong to 
> improve performance. The long value is not an atomic snapshot in LongAdder, 
> but I think we can tolerate that.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to