HDFS-10667. Report more accurate info about data corruption location. (Yuanbo Liu via Yongjun Zhang)
This commit is contained in:
parent
54fe17a607
commit
eb7ff0c992
|
@ -470,7 +470,13 @@ class BlockReceiver implements Closeable {
|
|||
try {
|
||||
clientChecksum.verifyChunkedSums(dataBuf, checksumBuf, clientname, 0);
|
||||
} catch (ChecksumException ce) {
|
||||
LOG.warn("Checksum error in block " + block + " from " + inAddr, ce);
|
||||
PacketHeader header = packetReceiver.getHeader();
|
||||
String specificOffset = "specific offsets are:"
|
||||
+ " offsetInBlock = " + header.getOffsetInBlock()
|
||||
+ " offsetInPacket = " + ce.getPos();
|
||||
LOG.warn("Checksum error in block "
|
||||
+ block + " from " + inAddr
|
||||
+ ", " + specificOffset, ce);
|
||||
// No need to report to namenode when client is writing.
|
||||
if (srcDataNode != null && isDatanode) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue