HDFS-15733. Add seqno in log when BlockReceiver receive packet. Contributed by Haibin Huang.

This commit is contained in:
Ayush Saxena 2020-12-20 15:18:25 +05:30
parent 70789fc6b9
commit 3ecd3628d4
1 changed files with 3 additions and 5 deletions

View File

@ -537,10 +537,9 @@ class BlockReceiver implements Closeable {
packetReceiver.receiveNextPacket(in);
PacketHeader header = packetReceiver.getHeader();
if (LOG.isDebugEnabled()){
LOG.debug("Receiving one packet for block " + block +
": " + header);
}
long seqno = header.getSeqno();
LOG.debug("Receiving one packet for block {} seqno:{} header:{} ", block,
seqno, header);
// Sanity check the header
if (header.getOffsetInBlock() > replicaInfo.getNumBytes()) {
@ -556,7 +555,6 @@ class BlockReceiver implements Closeable {
}
long offsetInBlock = header.getOffsetInBlock();
long seqno = header.getSeqno();
boolean lastPacketInBlock = header.isLastPacketInBlock();
final int len = header.getDataLen();
boolean syncBlock = header.getSyncBlock();