You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Jason Lowe (JIRA)" <ji...@apache.org> on 2014/09/29 23:39:35 UTC

[jira] [Commented] (MAPREDUCE-6099) Adding getSplits(JobContext job, List stats) to mapreduce CombineFileInputFormat

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

Jason Lowe commented on MAPREDUCE-6099:
---------------------------------------

The FileInputFormat.listStatus method is already intended to be overridden for purposes like this.  From it's javadoc:

{code}
  /** List input directories.
   * Subclasses may override to, e.g., select only files matching a regular
   * expression. 
{code}

Rather than propose another API for CombineFileInputFormat, it should be straightforward to create a deriviation of CombineFileInputFormat that overrides the listStatus method.  That listStatus method can return a list of FileStatus entries handed to it by client code (via another method called earlier or via its constructor) rather than calling FileSystem.listStatus itself.  I believe that approach accomplishes the same goal without requiring any changes to the FileInputFormat or CombineFileInputFormat APIs.

> Adding  getSplits(JobContext job, List<FileStatus> stats) to mapreduce CombineFileInputFormat
> ---------------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6099
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6099
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: client
>    Affects Versions: 2.4.1
>            Reporter: Pankit Thapar
>            Priority: Critical
>             Fix For: 2.4.1
>
>         Attachments: MAPREDUCE-6099.patch
>
>
> Currently we have getSplits(JobContext job) in CombineFileInputFormat. 
> This api does not give freedom to the client to create a list if file status it self and then create splits on the resultant List<FileStatus> stats.
> The client might be able to perform some filtering on its end on the File sets in the input paths. For the reasons, above it would be a good idea to have getSplits(JobContext, List<FileStatus>).
> Please let me know what you think about this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)