hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-5756) CombineFileInputFormat.getSplits() including directories in its results
Date Tue, 22 Apr 2014 22:26:16 GMT

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

Jason Lowe commented on MAPREDUCE-5756:
---------------------------------------

Sorry for the delay.  As [~jdere] and I mentioned above we think the problem is caused by
MAPREDUCE-4470 generating degenerate splits for directories within the input directory.  I
haven't verified yet that reverting that patch changes CombineFileInputFormat to its original
behavior of silently skipping directories in the input directory, but if it does then I think
we should tweak that fix to distinguish directories from files without blocks.  From a quick
perusal of that patch it doesn't appear to do so, and that's why I think it could have introduced
the behavior change.

[~jdere], have you already verified that reverting MAPREDUCE-4470 fixes the Hive test issue?

> CombineFileInputFormat.getSplits() including directories in its results
> -----------------------------------------------------------------------
>
>                 Key: MAPREDUCE-5756
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5756
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>            Reporter: Jason Dere
>
> Trying to track down HIVE-6401, where we see some "is not a file" errors because getSplits()
is giving us directories.  I believe the culprit is FileInputFormat.listStatus():
> {code}
>                 if (recursive && stat.isDirectory()) {
>                   addInputPathRecursively(result, fs, stat.getPath(),
>                       inputFilter);
>                 } else {
>                   result.add(stat);
>                 }
> {code}
> Which seems to be allowing directories to be added to the results if recursive is false.
 Is this meant to return directories? If not, I think it should look like this:
> {code}
>                 if (stat.isDirectory()) {
>                  if (recursive) {
>                   addInputPathRecursively(result, fs, stat.getPath(),
>                       inputFilter);
>                  }
>                 } else {
>                   result.add(stat);
>                 }
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message