[ https://issues.apache.org/jira/browse/HDFS-4185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14545937#comment-14545937 ]
Ravi Prakash commented on HDFS-4185: ------------------------------------ Rakesh! Thanks for your work. Please read what [Kihwal|https://issues.apache.org/jira/browse/HDFS-4185?focusedCommentId=14534730&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14534730] and [I|https://issues.apache.org/jira/browse/HDFS-4185?focusedCommentId=14535788&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14535788] wrote earlier. # In FSNamesystemMBean.java, please rename getNumActiveLeases to getNumFilesUnderConstruction . # {code} /** * Get the total number of active leases in the system. */ @Override // FSNamesystemMBean @Metric({ "NumActiveLeases", "Number of active leases" }) public long getNumActiveLeases() { return leaseManager.countPath(); }{code} Please change this to {code} /** * Get the number of files under construction. */ @Override // FSNamesystemMBean @Metric({ "NumFilesUnderConstruction", "Number of files under construction" }) public long getNumFilesUnderConstruction() { return leaseManager.countPath(); } {code} # Please also make the changes necessary in the Test code for these changes above > Add a metric for number of active leases > ---------------------------------------- > > Key: HDFS-4185 > URL: https://issues.apache.org/jira/browse/HDFS-4185 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode > Affects Versions: 0.23.4, 2.0.2-alpha > Reporter: Kihwal Lee > Assignee: Rakesh R > Labels: BB2015-05-TBR > Attachments: HDFS-4185-001.patch, HDFS-4185-002.patch, > HDFS-4185-003.patch, HDFS-4185-004.patch, HDFS-4185-005.patch, > HDFS-4185-006.patch > > > We have seen cases of systematic open file leaks, which could have been > detected if we have a metric that shows number of active leases. -- This message was sent by Atlassian JIRA (v6.3.4#6332)