[
https://issues.apache.org/jira/browse/HDFS-4185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14536498#comment-14536498
]
Rakesh R commented on HDFS-4185:
--------------------------------
Thank you [~raviprak] for your time and review comments. Could you please give
some more insight on the following statement:
bq. So your getNumActiveLeases() is actually returning number of files open for
write (which is >= number of active leases)
{{LeaseManager}} has the data structure {{private final Collection<String>
paths = new TreeSet<String>();}}. IIUC during the write/append operation the
client who owns the file will get a unique lease from NN and maintains by
adding a path entry in this list. Could you please tell me in which case
{{files open for write (which is >= number of active leases)}}, am I missing
any case?
Here, the metric {{NumActiveLeases}} count shows the cumulative of all the
unique file paths which will be the number of leases granted by the NN at that
point of time.
> 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
>
>
> 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)