HDFS-10935. TestFileChecksum fails in some cases. Contributed by Sammi Chen
This commit is contained in:
parent
9dce9011ad
commit
287effff93
@ -132,6 +132,7 @@ private long checksumWithTargetOutput(byte[] outputData, int toReconstructLen,
|
||||
// case-2) length of data bytes which is less than bytesPerCRC
|
||||
if (partialLength > 0) {
|
||||
byte[] partialCrc = new byte[getChecksum().getChecksumSize()];
|
||||
getChecksum().reset();
|
||||
getChecksum().update(outputData, dataOffset, partialLength);
|
||||
getChecksum().writeValue(partialCrc, 0, true);
|
||||
digester.update(partialCrc);
|
||||
|
Loading…
Reference in New Issue
Block a user