Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15217

Add more information to longest write/read lock held log

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • namenode
    • None
    • Reviewed

    Description

      Currently, we can see the stack trace in the longest write/read lock held log, but sometimes we need more information, for example, a target path of deletion:

      2020-03-10 21:51:21,116 [main] INFO  namenode.FSNamesystem (FSNamesystemLock.java:writeUnlock(276)) - 	Number of suppressed write-lock reports: 0
      	Longest write-lock held at 2020-03-10 21:51:21,107+0900 for 6ms via java.lang.Thread.getStackTrace(Thread.java:1559)
      org.apache.hadoop.util.StringUtils.getStackTrace(StringUtils.java:1058)
      org.apache.hadoop.hdfs.server.namenode.FSNamesystemLock.writeUnlock(FSNamesystemLock.java:257)
      org.apache.hadoop.hdfs.server.namenode.FSNamesystemLock.writeUnlock(FSNamesystemLock.java:233)
      org.apache.hadoop.hdfs.server.namenode.FSNamesystem.writeUnlock(FSNamesystem.java:1706)
      org.apache.hadoop.hdfs.server.namenode.FSNamesystem.delete(FSNamesystem.java:3188)
      ...
      

      Adding more information (opName, path, etc.) to the log is useful to troubleshoot.

      Attachments

        Issue Links

          Activity

            People

              brfrn169 Toshihiro Suzuki
              brfrn169 Toshihiro Suzuki
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: