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

Doug Cutting commented on HDFS-202:
-----------------------------------

> Is the optimization for sending only partial block reports really necessary?

It may help the append-savvy distcp use case, but is not in the mapred job 
submission use case.  Even in the append-savvy distcp use case, it's not clear 
that it's required.  Maybe we should punt that until someone develops an 
append-savvy distcp?

> Why not create a class called DetailedFileStatus which contains both the file 
> status and block locations:

Why is DetailedFileStatus[] better than Map<FileStatus,BlockLocation[]>?  The 
latter seems more transparent.

> DetailedFileStatus[] = getBlockLocations(Path[] paths); // 1:1 mapping 
> between the two arrays as Doug suggested.

That was intended for the append-savvy distcp use case.  The original use case 
was for mapred job submission, where we typically have a list of directories.  
With directories there is not a 1:1 mapping.



> Add a bulk FIleSystem.getFileBlockLocations
> -------------------------------------------
>
>                 Key: HDFS-202
>                 URL: https://issues.apache.org/jira/browse/HDFS-202
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>            Reporter: Arun C Murthy
>            Assignee: Jakob Homan
>
> Currently map-reduce applications (specifically file-based input-formats) use 
> FileSystem.getFileBlockLocations to compute splits. However they are forced 
> to call it once per file.
> The downsides are multiple:
>    # Even with a few thousand files to process the number of RPCs quickly 
> starts getting noticeable
>    # The current implementation of getFileBlockLocations is too slow since 
> each call results in 'search' in the namesystem. Assuming a few thousand 
> input files it results in that many RPCs and 'searches'.
> It would be nice to have a FileSystem.getFileBlockLocations which can take in 
> a directory, and return the block-locations for all files in that directory. 
> We could eliminate both the per-file RPC and also the 'search' by a 'scan'.
> When I tested this for terasort, a moderate job with 8000 input files the 
> runtime halved from the current 8s to 4s. Clearly this is much more important 
> for latency-sensitive applications...

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

Reply via email to