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

View File

@ -537,10 +537,9 @@ private int receivePacket() throws IOException {
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 @@ private int receivePacket() throws IOException {
}
long offsetInBlock = header.getOffsetInBlock();
long seqno = header.getSeqno();
boolean lastPacketInBlock = header.isLastPacketInBlock();
final int len = header.getDataLen();
boolean syncBlock = header.getSyncBlock();