hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Li (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-4340) Update addBlock() to inculde inode id as additional argument
Date Mon, 14 Jan 2013 20:02:12 GMT

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

Brandon Li commented on HDFS-4340:

Thanks, Nicholas.

{quote}    The DFSOutputStream constructor for append does not set fileId. It would be great
if we can change fileId to final. However, it may need some refactoring of the constructors.{quote}
Refactored the constructors and changed fileId to final.

{quote}    The DFSOutputStream constructor for create should not have an additional RPC call
to namenode.getFileInfo(src). Change create(..) to return fileId (or HdfsFileStatus.){quote}
Modified create() to return HdfsFileStatus.

{quote}    With fileId, the source path is no longer needed for ClientProtocol.addBlock(..).
Howw about using the src String parameter to pass fileId? The server side can determine whether
it is a path or file id by the leading "/". This may be a wild suggestion. Please see if you
think it is a good idea.{quote}
Overloading a parameter can be tricky. Using only fileId in addBlock() sounds better but currently
we don't have the fileId to path mapping on NN. For now, let's keep both path and fileId,
and consider removing path once we have the fileId->path map on NN. Does this sound ok
to you? 

{quote}    Need to change WebHDFS to support file ID. This may be done in a separated JIRA.{quote}
Filed JIRA HDFS-4398 for the WebHDFS changes.

 {quote}   Before changing WebHDFS, add file_id to the other HdfsFileStatus constructor and
then pass GRANDFATHER_INODE_ID in the caller.{quote}

{quote}    Similarly, add file_id to HdfsLocatedFileStatus constructor. Then you don't have
to add a new constructor.{quote}

{quote}    It should not pass GRANDFATHER_INODE_ID in checkLease(..). The file id should be
availabe for all cases. We need to add fileId to other RPC methods such as abandonBlock(..),
complete(..), etc. Are you plan to do it separately?{quote}
Passing GRANDFATHER_INODE_ID in checkLease() only when the client is old client using obsolete
addBlock() call. 
I plan to modify other rpc calls(except create) in a different JIRA.

{quote}    Why change SequentialNumber to public?{quote}
Class SequentialNumber is not changed. INodeId changed to public so protobuf classes can use

> Update addBlock() to inculde inode id as additional argument
> ------------------------------------------------------------
>                 Key: HDFS-4340
>                 URL: https://issues.apache.org/jira/browse/HDFS-4340
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs-client, namenode
>    Affects Versions: 3.0.0
>            Reporter: Brandon Li
>            Assignee: Brandon Li
>         Attachments: HDFS-4340.patch, HDFS-4340.patch, HDFS-4340.patch

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message