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

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

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



##########
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:
       > nit: you could use incrementAndGet. Don't have to fix it for me to 
commit it, just flagging for your consideration.
   > 
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicLong.html#incrementAndGet--
   
   Hi @anuengineer , I fixed the problem. And I invited you to join the 
discussion on JIRA.
   https://issues.apache.org/jira/browse/HDFS-15808




----------------------------------------------------------------
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: 555567)
    Time Spent: 5h  (was: 4h 50m)

> 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
>         Attachments: ExpiredHeartbeat.png, lockLongHoldCount
>
>          Time Spent: 5h
>  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