You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Ari Pollak (Commented) (JIRA)" <ji...@apache.org> on 2011/12/13 19:10:31 UTC

[jira] [Commented] (HADOOP-2120) dfs -getMerge does not do what it says it does

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

Ari Pollak commented on HADOOP-2120:
------------------------------------

Even if the copyMerge comment is somewhat correct, the documentation for fs -getMerge is still confusing, so I think that this bug should be reopened; from copyCommands.java:
    public static final String DESCRIPTION =
      "Get all the files in the directories that\n" +
      "match the source file pattern and merge and sort them to only\n" +
      "one file on local fs. <src> is kept.";

The command neither sorts nor merges the actual source files according to the traditional definition (e.g. sort and sort -m commands), it merely concatenates them, in order of the filenames. It should look more like this:

Concatenate all the files in the directories that match the pattern in <src> and output to only one file on local fs. <src> is kept.
                
> dfs -getMerge does not do what it says it does
> ----------------------------------------------
>
>                 Key: HADOOP-2120
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2120
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: documentation, fs
>    Affects Versions: 0.14.3
>         Environment: All
>            Reporter: Milind Bhandarkar
>              Labels: newbie
>
> dfs -getMerge, which calls FileUtil.CopyMerge, contains this javadoc:
> {code}
> Get all the files in the directories that match the source file pattern
>    * and merge and sort them to only one file on local fs 
>    * srcf is kept.
> {code}
> However, it only concatenates the set of input files, rather than merging them in sorted order.
> Ideally, the copyMerge should be equivalent to a map-reduce job with IdentityMapper and IdentityReducer with numReducers = 1. However, not having to run this as a map-reduce job has some advantages, since it increases cluster utilization during reduce phase.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira