[ https://issues.apache.org/jira/browse/HDFS-4090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13481545#comment-13481545 ]
Ravi Prakash commented on HDFS-4090: ------------------------------------ The only nit (and I don't care if you don't fix it), is that the comments could have taken 2 lines instead of 3. Also, when I removed the src/main part of the patch, the test fails with a NPE because zeroChecksum == null. Maybe check for null? But I'm not going to be a stickler for that either. Please feel free to check it in. +1 lgtm > getFileChecksum() result incompatible when called against zero-byte files. > -------------------------------------------------------------------------- > > Key: HDFS-4090 > URL: https://issues.apache.org/jira/browse/HDFS-4090 > Project: Hadoop HDFS > Issue Type: Bug > Components: hdfs client > Affects Versions: 0.23.4, 2.0.2-alpha > Reporter: Kihwal Lee > Assignee: Kihwal Lee > Priority: Critical > Attachments: hdfs-4090.patch > > > When getFileChecksum() is called against a zero-byte file, the branch-1 > client returns MD5MD5CRC32FileChecksum with crcPerBlock=0, bytePerCrc=0 and > md5=70bc8f4b72a86921468bf8e8441dce51, whereas a null is returned in trunk. > The null makes sense since there is no actual block checksums, but this > breaks the compatibility when doing distCp and calling getFileChecksum() via > webhdfs or hftp. > This JIRA is to make the client to return the same 'magic' value that the > branch-1 and earlier clients return. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira