crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Nelson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CRUNCH-513) HFileSource not calculating size correctly for nested pathes
Date Tue, 28 Apr 2015 20:39:06 GMT

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

Andy Nelson commented on CRUNCH-513:
------------------------------------

Upon further investigation, I understand the issue now.

The change here[1] shifted from using listStatus to globStatus. However, FileSystem#globStatus
does not return child folders like DistributedFileSystem#listStatus does. FileSystem#globStatus
always returns the parent directory that was passed to it as a FileStatus array of length
1. The documentation for globStatus is not very clear either so I am not sure what it is supposed
to be doing. This could be a defect with Hadoop or it could be working as intended.

I know the change[2] was made to account for compatibility differences between hadoop 1 and
hadoop 2 but I am not sure what those were. Perhaps you can shed additional light on that,
although it was almost a year ago so maybe not.

If we want to continue using globStatus in its current state, we can add the recursion to
traverse the child directories ourselves. I will attach a different patch that addresses that
concern.

[1] https://github.com/apache/crunch/compare/apache-crunch-0.8.2...apache-crunch-0.8.4#diff-ebb16d4834e18a2988cfe2f4de1ea9f2R116
[2] https://github.com/apache/crunch/commit/9a0c9e99546eff051033274b773a6c0925f30177

> HFileSource not calculating size correctly for nested pathes
> ------------------------------------------------------------
>
>                 Key: CRUNCH-513
>                 URL: https://issues.apache.org/jira/browse/CRUNCH-513
>             Project: Crunch
>          Issue Type: Bug
>    Affects Versions: 0.10.0, 0.8.3
>            Reporter: Andy Nelson
>         Attachments: Crunch-513.patch
>
>
> The cause of this is that getInternalSize[1] does not traverse the child paths to determine
the size. 
> I have the fix in a patch that I will attach but I have not been able to successfully
append to the integration tests to see this failure. This issue only appears to be a problem
when using the DistributedFileSystem but the tests for HFileSource use RawLocalFileSystem.
I see there are additional tests that use the hadoop mini cluster, but I was not able to implement
correctly.
> [1] https://github.com/apache/crunch/blob/apache-crunch-0.8.3/crunch-hbase/src/main/java/org/apache/crunch/io/hbase/HFileSource.java#L116



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

Mime
View raw message