hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6757) Simplify lease manager with INodeID
Date Mon, 28 Jul 2014 18:02:41 GMT

    [ https://issues.apache.org/jira/browse/HDFS-6757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14076485#comment-14076485
] 

Colin Patrick McCabe commented on HDFS-6757:
--------------------------------------------

This JIRA seems like a good simplification.

{code}
     /** Does this lease contain any path? */
-    boolean hasPath() {return !paths.isEmpty();}
+    boolean hasPath() {return !files.isEmpty();}
{code}

Seems like this should be renamed to 'hasFile' or something like that, now that class Lease
no longer contains paths.

Also, Lease no longer needs to implement Comparable since we're using hash sets now, right?

{code}
+      // need to create a copy of the oldest lease files, becuase
{code}
typo

{code}
+          boolean completed = fsnamesystem.internalReleaseLease(oldest,
+                  fsnamesystem.getFSDirectory().getInode(id).getFullPathName(),
{code}
Here we're taking an inode ID and then translating it to an INode, then translating that INode
to a path, then passing it to a function which will need to do a lookup on that path to get
the INode ID back.  Perhaps we should just make {{internalReleaseLease}} take an INode ID?

> Simplify lease manager with INodeID
> -----------------------------------
>
>                 Key: HDFS-6757
>                 URL: https://issues.apache.org/jira/browse/HDFS-6757
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-6757.000.patch
>
>
> Currently the lease manager records leases based on path instead of inode ids. Therefore,
the lease manager needs to carefully keep track of the path of active leases during renames
and deletes. This can be a non-trivial task.
> This jira proposes to simplify the logic by tracking leases using inodeids instead of
paths.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message