HADOOP-6558. Return null in HarFileSystem.getFileChecksum(..) since no checksum algorithm is implemented.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@911646 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tsz-wo Sze 2010-02-18 23:22:52 +00:00
parent 4b4e9d741e
commit 50dcc335be
3 changed files with 17 additions and 0 deletions

View File

@ -210,6 +210,9 @@ Trunk (unreleased changes)
HADOOP-6570. RPC#stopProxy throws NPE if getProxyEngine(proxy) returns
null. (hairong)
HADOOP-6558. Return null in HarFileSystem.getFileChecksum(..) since no
checksum algorithm is implemented. (szetszwo)
Release 0.21.0 - Unreleased
INCOMPATIBLE CHANGES

View File

@ -539,6 +539,13 @@ public class HarFileSystem extends FilterFileSystem {
makeRelative(this.uri.toString(), new Path(hstatus.name)));
}
/**
* @return null since no checksum algorithm is implemented.
*/
public FileChecksum getFileChecksum(Path f) {
return null;
}
/**
* Returns a har input stream which fakes end of
* file. It reads the index files to get the part

View File

@ -45,4 +45,11 @@ public class TestHarFileSystem {
e.printStackTrace(System.out);
}
}
@Test
public void testFileChecksum() {
final Path p = new Path("har://file-localhost/foo.har/file1");
final HarFileSystem harfs = new HarFileSystem();
Assert.assertEquals(null, harfs.getFileChecksum(p));
}
}