HDFS-10667. Report more accurate info about data corruption location. (Yuanbo Liu via Yongjun Zhang)
(cherry picked from commit eb7ff0c992
)
This commit is contained in:
parent
5dc29ab0f2
commit
71c49b1786
|
@ -462,7 +462,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