[
https://issues.apache.org/jira/browse/HDFS-8856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14658799#comment-14658799
]
Haohui Mai commented on HDFS-8856:
----------------------------------
{code}
+ private Collection<Long> getFiles() {
+ return Collections.unmodifiableCollection(files);
+ }
{code}
Just wondering whether it is necessary?
{code}
- @Test (timeout=1000)
+ @Test (timeout=300000)
{code}
Are you seeing timeouts? I would be surprised as the tests operate on mocked
objects and should be really quick.
> Make LeaseManager#countPath O(1)
> --------------------------------
>
> Key: HDFS-8856
> URL: https://issues.apache.org/jira/browse/HDFS-8856
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Affects Versions: 2.7.2
> Reporter: Arpit Agarwal
> Assignee: Arpit Agarwal
> Attachments: HDFS-8856.01.patch, HDFS-8856.02.patch
>
>
> {{LeaseManager#countPath}} loops over all existing lease holders to compute
> the pending lease count. We can just track the pending leased files so it
> runs in constant time.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)