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