Issue Details (XML | Word | Printable)

Key: HADOOP-5688
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Tsz Wo (Nicholas), SZE
Reporter: Tsz Wo (Nicholas), SZE
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

HftpFileSystem.getChecksum(..) does not work for the paths with scheme and authority

Created: 16/Apr/09 01:02 AM   Updated: 08/Jul/09 04:43 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 0.20.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works 5688_20090415.patch 2009-04-16 01:35 AM Tsz Wo (Nicholas), SZE 2 kB

Hadoop Flags: Reviewed
Resolution Date: 22/Apr/09 07:54 PM


 Description  « Hide
If a path with scheme and authority information (e.g. hftp://hostname:50070/foo.txt) is passed to HftpFileSystem.getChecksum(..), it won't return the correct file checksum.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Tsz Wo (Nicholas), SZE added a comment - 16/Apr/09 01:33 AM - edited
The problem is that HftpFileSystem does not construct the url correctly if the path contents scheme and authority information. For example
Path p = new Path("hftp://localhost:2750/foo");
FileSystem hftpfs = p.getFileSystem(conf);
FileChecksum cs = hftpfs.getFileChecksum(p); 
/*
The url constructed above will be
  http://localhost:2750/fileChecksumhftp://localhost:2750/filechecksum/foo?ugi=...
However, the correct url is
  http://localhost:2750/fileChecksum/foo?ugi=...
*/

Tsz Wo (Nicholas), SZE added a comment - 16/Apr/09 01:35 AM
5688_20090415.patch: fix the file checksum url.

Tsz Wo (Nicholas), SZE added a comment - 20/Apr/09 08:29 PM
     [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 3 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.
     [exec] 
     [exec]     +1 release audit.  The applied patch does not increase the total number of release audit warnings.

Running unit tests locally.


Hadoop QA added a comment - 21/Apr/09 12:27 AM
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12405604/5688_20090415.patch
against trunk revision 766670.

+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 Eclipse classpath. The patch retains Eclipse classpath integrity.

+1 release audit. The applied patch does not increase the total number of release audit warnings.

+1 core tests. The patch passed core unit tests.

+1 contrib tests. The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/214/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/214/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/214/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-vesta.apache.org/214/console

This message is automatically generated.


Chris Douglas added a comment - 21/Apr/09 01:22 AM
+1

Chris Douglas added a comment - 22/Apr/09 07:54 PM
I committed this. Thanks, Nicholas

Hudson added a comment - 23/Apr/09 07:59 PM
Integrated in Hadoop-trunk #815 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/815/)
. Fix HftpFileSystem checksum path construction. Contributed by Tsz Wo (Nicholas) Sze