|
[
Permlink
| « Hide
]
Tom White added a comment - 05/Jun/08 12:47 PM
Here's a test that exposes the issue. The problem is that the testing is done per path component, so since the parent directory /a doesn't match the filter the whole path /a/b is rejected.
Tom, nice change! Two comments:
1. I think the checking if paths are accepted by the filter or not (lines 932-936 in Filesystem.java) should be performed no matter last component of the path pattern has a pattern or not. Your patch does the checking only when last component does not have a pattern. 2. This patch probably should be marked as an incompatible change. The trunk implements a wrong semantics. +1. The patch looks good to me.
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12388141/hadoop-3497-v2.patch against trunk revision 686420. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. -1 javadoc. The javadoc tool appears to have generated 1 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3064/testReport/ This message is automatically generated. -1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12388141/hadoop-3497-v2.patch against trunk revision 689380. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/3122/testReport/ This message is automatically generated. The test that is failing is TestFileInputFormatPathFilter#testWithPathFilterWithoutGlob. This creates files named a, b, aa, bb in a directory, then uses an input format with a filter that only accepts files whose last component is 1 character long. Only files a and b should match. The input path is the directory, not a glob path, and to work it relies on the following following behaviour of FileSystem#globStatus.
If you call FileSystem#globStatus(Path pathPattern, PathFilter filter) with a pathPattern that has a fixed (non-globbing) final component, then the status for that path will always be returned, regardless of the filter. So, for a path /a which exists fs.globStatus(new Path("/a"), new PathFilter() { @Override public boolean accept(Path path) { return false; }}) will return the status for /a, even though the filter rejects every path! This seems wrong, and should really be changed. It has a potential impact on applications however, since a filter is now being applied that previously wasn't. Does this seem the right thing to do? I've attached a patch which fixes the test. +1 on the change. Tom, could you please put the above semantic change in the release note?
Successfully ran the unit tests and test-patch
[exec] +1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] +1 tests included. The patch appears to include 6 new or modified tests.
[exec]
[exec] +1 javadoc. The javadoc tool did not generate any warning messages.
[exec]
[exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
[exec]
[exec] +1 Eclipse classpath. The patch retains Eclipse classpath integrity.
Integrated in Hadoop-trunk #680 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/680/
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||