diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java index a60d1886409..fc4b665f2dc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java @@ -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 {