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

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

                Author: ASF GitHub Bot
            Created on: 17/Feb/21 01:43
            Start Date: 17/Feb/21 01:43
    Worklog Time Spent: 10m 
      Work Description: tomscut commented on a change in pull request #2668:
URL: https://github.com/apache/hadoop/pull/2668#discussion_r577266767



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystemLock.java
##########
@@ -182,6 +192,7 @@ public void readUnlock(String opName,
     final long readLockIntervalMs =
         TimeUnit.NANOSECONDS.toMillis(readLockIntervalNanos);
     if (needReport && readLockIntervalMs >= this.readLockReportingThresholdMs) 
{
+      numReadLockLongHold.addAndGet(1);

Review comment:
       Thank you for your review and suggestion. Using incrementAndGet is a 
better way. I fixed it.




----------------------------------------------------------------
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: 553311)
    Time Spent: 2h 50m  (was: 2h 40m)

> Add metrics for FSNamesystem read/write lock hold long time
> -----------------------------------------------------------
>
>                 Key: HDFS-15808
>                 URL: https://issues.apache.org/jira/browse/HDFS-15808
>             Project: Hadoop HDFS
>          Issue Type: Wish
>          Components: hdfs
>            Reporter: tomscut
>            Assignee: tomscut
>            Priority: Major
>              Labels: hdfs, lock, metrics, pull-request-available
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> To monitor how often read/write locks exceed thresholds, we can add two 
> metrics(ReadLockWarning/WriteLockWarning), which are exposed in JMX.



--
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