hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-894) dfs client protocol should allow asking for parts of the block map
Date Mon, 07 May 2007 17:59:17 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494094
] 

Doug Cutting commented on HADOOP-894:
-------------------------------------

When we open a file we don't need anything in return except the length, since we can call
getBlockLocations() afterwards.  If we want some block locations returned from open(), as
an optimization, then we should pass a start and length, giving the range of the file whose
blocks we'd initially like, and return those with the length.  HADOOP-1298 will add more fields
to DFSFileInfo, things we don't need when opening.  So HADOOP-1298 argues that we should not
return a DFSFileInfo at open.  Also, other users of DFSFileInfo don't need a LocatedBlockList,
so I really don't think it belongs there.


> dfs client protocol should allow asking for parts of the block map
> ------------------------------------------------------------------
>
>                 Key: HADOOP-894
>                 URL: https://issues.apache.org/jira/browse/HADOOP-894
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: dfs
>            Reporter: Owen O'Malley
>         Assigned To: Konstantin Shvachko
>             Fix For: 0.13.0
>
>         Attachments: partialBlockList.patch, partialBlockList2.patch
>
>
> I think that the HDFS client protocol should change like:
> /** The meta-data about a file that was opened. */
> class OpenFileInfo {
>   /** the info for the first block */
>   public LocatedBlockInfo getBlockInfo();
>   public long getBlockSize();
>   public long getLength();
> }
> interface ClientProtocol extends VersionedProtocol {
>   public OpenFileInfo open(String name) throws IOException;
>   /** get block info for any range of blocks */
>   public LocatedBlockInfo[] getBlockInfo(String name, int blockOffset, int blockLength)
throws IOException;
> }
> so that the client can decide how much block info to request and when. Currently, when
the file is opened or an error occurs, the entire block list is requested and sent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message