", origLen=" + origLen +
", len=" + len +
", length=" + length +
", checksumSize=" + checksumSize;
LOG.info(mesg);
throw new ChecksumException("Checksum Error: " + mesg, 0);
}
checksum(b, off, bytesRead);
currentOffset += bytesRead;
if (disableChecksumValidation) {
return bytesRead;
}
if (currentOffset == dataLength) {
// The last four bytes are checksum. Strip them and verify
sum.update(buffer, 0, offset);
csum = new byte[checksumSize];
IOUtils.readFully(in, csum, 0, checksumSize);
if (!sum.compare(csum, 0)) {
String mesg = "CurrentOffset=" + currentOffset +
", off=" + offset +
", dataLength=" + dataLength +
", origLen=" + origLen +
", len=" + len +
", length=" + length +
", checksumSize=" + checksumSize+
", csum=" + csum +
", sum=" + sum;
LOG.info(mesg);
throw new ChecksumException("Checksum Error: " + mesg, 0);
}
}
return bytesRead;
}