hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haohui Mai (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-7463) Simplify FSNamesystem#getBlockLocationsUpdateTimes
Date Thu, 04 Dec 2014 22:42:12 GMT

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

Haohui Mai commented on HDFS-7463:

Thanks for the review. The v2 patch moves the {{now()}} into the write-lock.

bq.  Often it is good to have those for figuring out what exceptions to unwrap on the client
side, right?

I agree the the complete lists have some value in terms of providing some hints to the client.
My concern is that the lists are neither complete nor consistent in most cases. Take this
patch for example:

  LocatedBlocks getBlockLocations(String src, long offset, long length,
      boolean doAccessTime, boolean needBlockToken, boolean checkSafeMode)
      throws FileNotFoundException, UnresolvedLinkException, IOException {

Which miss the {{StandbyException}.

For {{GetFileInfo}} in {{NameNodeAdaptor}}:

   public static HdfsFileStatus getFileInfo(NameNode namenode, String src,
      boolean resolveLink) throws AccessControlException, UnresolvedLinkException,
        StandbyException, IOException {

Which misses {{FileNotFoundException}}.

Currently there is no effective automated mechanisms to enforce the lists are complete and
consistent. Occasionally it creates more confusions than the hints provided to the client
if you look through all operations in {{FSNamesystem}}.

> Simplify FSNamesystem#getBlockLocationsUpdateTimes
> --------------------------------------------------
>                 Key: HDFS-7463
>                 URL: https://issues.apache.org/jira/browse/HDFS-7463
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-7463.000.patch, HDFS-7463.001.patch, HDFS-7463.002.patch
> Currently {{FSNamesystem#getBlockLocationsUpdateTimes}} holds the read lock to access
the blocks. It releases the read lock and then acquires the write lock when it needs to update
the access time of the {{INode}}.
> This jira proposes to move the responsibility of the latter steps to the caller to simplify
the code.

This message was sent by Atlassian JIRA

View raw message